ADFc: No outcome metadata specified for method call activity 'null' !

While defining task flow method activities by EL binding to a method in managed bean, there are certain things you need to be aware of. These points are well documented in Fusion Developer's Guide under 15.5 Using Method Call Activities.

I'm explaining a very common mistake when you EL bind a manged bean method as method activity for a task flow. In this case, if your method return some status message and you want to control navigation cases based on this outcome, its required to specify 'toString()'[displayed under Outcome group] as 'true' from the drop down list, as shown in the following screen shot.


 <method-call id="someMethodCall">  
  <method>#{backingBeanScope.managedBean1.doSomething}</method>  
  <outcome id="__16">  
   <to-string/>  
  </outcome>  
 </method-call>  

to-string: If specified as true, the outcome is based on calling the toString() method on the Java object returned by the method.

If you miss the above step(setting 'to-string'), then ADF run time may not invoke your method as its incomplete, and may result in unexpected result as well. If you see the log, you may notice a warning message as shown below.

ADFc: /WEB-INF/task-flow-definition.xml#task-flow-definition:
ADFc: No outcome metadata specified for method call activity 'null'.
ADFc: /WEB-INF/task-flow-definition.xml#task-flow-definition:
ADFc: Activity metadata could not be parsed. [Activity Type, ID] = ['method-call', 'someMethodCall'].

Comments

  1. Your post is really awesome. It is very helpful for me to develop my skills in a right way.keep sharing such a worthy information
    salesforce Training in Bangalore
    uipath Training in Bangalore
    blueprism Training in Bangalore

    ReplyDelete
  2. Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's.

    salesforce Training in Bangalore
    uipath Training in Bangalore
    blueprism Training in Bangalore

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete

Post a Comment

Disclaimer

The views expressed on this blog are my own and do not necessarily reflect the views of my employer.