Manually adding the Method Call Activity

First, we need to add a method call activity to the task flow, and give it a name:

This Method Call Activity does not have a binding definition file yet. When we open the expression editor for the Method attribute, there is no “bindings” section available below the “ADF Bindings” node:

So the next step is to create a page definition file for the Method Call Activity. This is done by selecting the activity in the task flow and choosing “Create Page Definition” from the context menu:

This will create a page definition file for the Method Call Activity (where the name “Page Definition File” sounds misleading – since it is not a definition file for a page (View Activity), but for a method call. Probably a better name for these files would have been something like “Activity Definition”, since they are not restricted to pages or page fragments). Anyway, the binding editor for the page definition file opens automatically and we can add the method binding there:

After pressing “Ok”, we can select the method which we want to bind in this binding. We select the updateData() method which we implemented in the Application Module at the very beginning:

Lets re-open the expression editor for the Method attribute on the Method Call Activity. We now see that there is an additional “bindings” section below “ADF Bindings”, where we also find the updateData() operation which we bound to the updateData() method from the Application Module. When selecting the operation, it is crucial to choose the execute function – the resulting EL expression must be #{bindings.updateData.execute}. If we select the operation updateData itself, the resulting EL expression would become #{bindings.updateData}, and this would lead to a runtime exception saying that the method updateData could not be found.

We can now complete the task flow as shown in the next section: Completing the task flow.