Saturday, February 9, 2013

Pass Parameters inside an ADF Bounded Taskflow

So there is a 'home' page which is displaying the list of locations. User can either click on the location ID to update the record, or create a location by clicking Create button.

First define an input parameter 'Action' in the 'child' taskflow. Set its value as #{pageFlowScope.Action}.

Drag the CreateInsert operation to the task flow diagram to create a method call activity. Change fixed-outcome of the CreateInsert method call activity to done.

Add an expression to the router: #{pageFlowScope.Action == 'New'}

Now in the 'main' taskflow, click on the 'child' taskflow call and in the Property Inspector, set the value of the parameter as #{requestScope.Action}

Add a setPropertyListener property to the Create button. Set the From property to #{'New'}, To property to #{requestScope.Action} and Type as 'action'.

Download the sample application from File Cabinet: PassParaBoundTskflow.rar

No comments:

Post a Comment