Navigation/Control Flow Rule in Unbounded and Bounded Task Flow:
Preamble : In this post i would like to explain how to use navigation rule in faces-config.xml and control flow rule in adfc-config.xml.
Navigation Rule /Control Flow Rule is use to transfer control from one view activity to another activity. Following type of view activity combination are possible
1-jspx to jspx
2-jspx to bounded task flow(which has jspx)
3-jspx to bounded task flow (which has jsff)
4-jsff to jsff
5-bounded task flow to bounded task flow
Explanation :In any Fusion Middleware there should be one or many bounded and one or many unbounded task flow.
When you create any fusion middleware application by default there two unbounded task flow will created in project.
1-faces-config.xml
2-adfc-config.xml
Following point will explain the clear way to use navigation and control rule in task flow.
1-Navigation Rule in faces-cong.xml:
Let us start with faces-config.xml.The following table will explain what we can use or not in the faces-config.xml as view activity.
S.No. |
jspx page |
Bounded task flow |
jsff page (As a separate unit ) |
jsff page (Inside in Bounded task flow) |
1- |
Yes |
NO |
NO |
NO |
Here jsff /bounded task flow page are belong to adf perhaps we can not use this in faces-config.xml .Although you can drag and drop jsff pages but if you run the page it will give the following error.
And we can not drag and drop bounded task flow on faces-config.xml.
2-Control Flow Rule in adf-config.xml:
The following table explain the possibility of view activities.
S.No. |
jspx page |
Bounded task flow |
jsff page (As a separate unit ) |
jsff page (Inside in Bounded task flow) |
1- |
Yes |
Yes |
NO |
Yes |
One things is conman in both that is we can not use individual jsff page.
In Java server faces we have navigation rule.but in adf we have control flow which is same as navigation rule with more and more feature.
Example :Navigation rule in possible jspx to jspx but control rule is possible in jspx ,method and task flow to task flow .
1-Control Flow Rule in jspx to jspx page :We can use navigation rule between jspx to jspx,
2-Control flow rule in jspx to bounded task :We have option to navigation from jspx to bounded task flow.Moreover bounded task flow further divided into following two part.Bounded task flow contains either jspx or jsff at a time.But both are not allow same time.
1-Boudned task flow with jspx
2-Bounded task flow with jsff
i)Boudned task flow with jspx :you can use this bounded with in faces-config.xml.It is work as usual.They is no magic behind this scenario.
ii)Bounded task flow with jsff:In any FMW application frequently we will have this type of bounded task flow however one more importance thing which we need to remember that we can not direct used this type of bounded task flow in adfc-config.xml .
If you will used then if will show you following error message on bounded task flow
"An unbounded task flow refers to pages ,and therefore can not call bounded task flow "task-flow-definition" that refers to page
fragments "
For using this type of bounded task flow we require Region.So Drag and drop this task flow as Region into jspx page and then can use this jspx in adfc-config.xml .
Till here i explained possible way to use control flow rule. But one vital part is still left that is control flow rule in bounded task flow to bounded task flow.
Again I am saying that in unbounded task we can use bounded task either the bounded task has jspx page inside or it is inside a jspx page as a region.
Bounded task has one property called task flow return which automatic return control back to callee task flow.But if you want to navigate from bounded task flow to any jspx page or other bounded task flow then in this case the task flow return activity name should be same as control flow rule between them.
Above task flow have one jspx page,two bounded task flow.The following point will depict task flow
i-The jspx page has one button which has GO as action.Click on button it will navigate to task-flow-defination1 (bounded task flow )and that has follow elements
ii-The page contains one Default activity which is a jspx page and one task flow return.Here task flow return name is GO1 which is same as action value of command button which is inside in second page(jspx).Here if user click on command button of the second page it will go to task flow return and return to callee task flow where it will check ,is there any control flow with GO1 name if it is present then it will navigate to that page.Here it is present then it will navigate to task-flow-defination which is bounded task flow.
3-Control Flow Rule in Bounded Task Flow (task-flow-defination ):
S.No. |
jspx page |
Bounded task flow |
jsff page (As a separate unit ) |
jsff page (Inside in Bounded task flow) |
1- |
Yes |
Yes |
Yes |
Yes |
*Bounded task flow also called as task-flow-defination.
*At a single time either jspx or jsff will present.
*Bounded task flow to Bounded task flow navigation is possible.
*Using task flow return we can navigate from BTF to BTF
*Other things same as adfc-config.xml
Thanks
Prateek