How to pass a paramter to a router in a bounded task flow

When working on the sample application for my book, I came across the following use case which I expect many of you will experience.

The use case is that I have a bounded task flow, manage-orderitem which I am using for both edit and create.  Which means the first element in the bounded task flow is a router.

blog1.png

This router will decide if the task flow show create a new order item or just edit an order item
First of all, I create a parameter in the bounded task flow as follows:

blog4.png


And then refer to that parameter in the router like this:

blog5.png


So what I need to do now, is ensure that when this bounded task flow is called from unbounded task flow, as shown, I need to set this parameter.

blog2.png


So, the trick is on pressing the button that initiates the newOrderItem and the editOrderItem, we need set a flag to indicate "new" or "edit", and then set the bounded task flow parameter to point to this flag.

 To do this, each button should have a setPropertyListener JSF component drag and dropped onto it.  The properties are then set as:
blog3.png


So, on pressing the CREATE button we set the pageFlowScope.action "flag" to "new" (and of course set it to "edit" for the edit button.

The next step is to select the task flow instance and define that its parameter should be set to point to this "flag" called action.

blog6.png



So now when you press the Edit or Create button, the setProperty listener will set the value of the action "flag", and the task flow parameter references this flag.

Job done!
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Tips, Tricks, Events and Information around Oracle JDeveloper, ADF, and Oracle Forms

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today