Recently I have faced a problem, when was trying to navigate to ADF Task Flow Call activity. The problem was, that I was initiating navigation from inside the region and navigation flow was defined not in bounded region ADF Task Flow, but inside parent bounded page ADF Task Flow. This means, navigation outcome from parent ADF Task Flow was simply invisible for button I have created inside region. But as usual in most of the cases, ADF provides very elegant solution to solve problem of external navigation from inside the region. I will describe it in this post.
The problem is, that I have bounded ADF Task Flow, however main page is using region and this region can't see declared navigations from this ADF Task Flow:
Region is used on main page, this region provides table of Countries, user can select any country and navigate to Location ADF Task Flow:
And here is the answer for described problem - in order to navigate from region using navigation rule from parent ADF Task Flow, you can use Parent Action activity inside region ADF Task Flow:
Only one thing you need to do is to define parent-outcome property, or in other words - navigation outcome from parent ADF Task Flow you want to use. In my case it is child navigation outcome:
Defined parent outcome will navigate to ADF Task Flow call activity and will open locations page.
On runtime, when user will press Location button implemented in region component, navigation from parent ADF Task Flow will be triggered:
Correct list of locations is returned:
You can download sample application for this post - ADFRegionNavigation.zip.
Useful hint, when user will return to Countries table, in order to show previously selected record, set DisplayRow = selected for af:table component:
Hi,
ReplyDeleteThanks for this example. In your example, you do not need to pass any parameters from the region taskflow to the child task flow (i.e from Countries region to the locations as there is a view link between countries and locations VO). How do we achieve the same if Locations TF requires the selected countryID as the parameter?
Thanks
Hi,
ReplyDeleteHere is the asnwer: http://andrejusb.blogspot.com/2010/03/passing-parameters-from-adf-task-flow.html
Andrejus
Hi ,
ReplyDeleteIn my case I have alogin page in undounded task flow which calls dounded task flow.
My bounded task flow uses dynamic tab shell.And if login is successfull user will be directed to welcome page where default welcome tab shell is open.
When i run my application i m receving tabConetxt null pointer excetion.
As per my knowledeg i know how to pass tab context reference from 1 task flow to other.But not sure how should i pass tab context from Login View activity to welcom taskflow
It might be, you need to install UI Shell update - http://andrejusb.blogspot.com/2010/04/oracle-ui-shell-update-available-102.html
ReplyDeleteRegards,
Andrejus
Hi,
ReplyDeleteIs there a way to customize the train stop icons, to display my own icons on each stop...
please point me there...
The example provided does not work with j developer version :
ReplyDeleteStudio Edition Version 11.1.1.4.0
Build JDEVADF_11.1.1.4.0_GENERIC_101227.1736.5923
Kindly provide an example to check the use case for the ParentAction of the taskflow.
It works for me with 11.1.1.4.0
ReplyDeleteWhat error you are getting?
Andrejus
on selecting a country and clicking locations.. no action is performed.
ReplyDeleteSir my basic requirement is -- there is a parent taskflow and an embeded child taskflow in it. I have initializer/method call activity method for both, After parent initializer is executed, it come to the child initiaizer.
How will I get to know the parent taskflow id, from the child method call activity ?
Usual way to fetch the taskflow id is :ControllerContext.getInstance().getCurrentViewPort().getTaskFlowContext().getTaskFlowId();
Sample works fine - I have tested once again.
ReplyDeleteAndrejus
Hi,
ReplyDeleteI am new to Jdeveloper,
I have a 3 tables department, courses, sections
as you know each department suggest many courses and each course have one or more sections.
I want to implement an application that contains a page that contains all the departments the department number is surrounded by a link component when I click on it It will direct to a page that allow me to update this department information and view all the courses of the department and courses numbers in that page are surrounded by links also and navigates to a page that allow me to update courses and view sections for the selected course
how can I implement this using task flow for each part department-course, course-section, or I must implement these in one task flow?
I want to call a bounded task flow that contains fragments from unbounded task flow that contains pages in adf.
ReplyDeleteI have a pop up in main page and want to call a fragment of other bounded task flow on button click.
Hi,
ReplyDeleteHow can I return to a view after a Task Flow Return Activity?
For example:
"After commit, the user is redirected to another view activity..." But I can`t put a Control Flow Case from a Return to a view...
I'm waiting to hear from you Andrejus.
Thanks, Take Care!
Regards.
User will be returned to the call Task Flow. In calling Task Flow you can redirect to another view activity.
ReplyDeleteAndrejus
Great! It works!
ReplyDeleteLooks it like a "sub-"task-flow? Or this nomenclature doesn't exists?
After my application is 100% working, I've to build another one to communicate with it. Could you recommend a way to do that communication? When I "portletize" my task flow, can I communicate my 2 applications like "Portlets"?
Sorry for the simple questions, (I've many others), but I'm newbie in ADF Task Flow trying to improve my knowledge on it.
Thank you! =)
Thanks Andrejus for your helpful post as always!!!!
ReplyDeleteHello Andrejus,
ReplyDeleteI am inside a BTF and navigate to another BTF from the parent (via parentAction).
How can I set parameters to the child TF ?
If i set the param. on pageFlowScope it's empty in the destination TF because it's navigating through the parent (parentAction).
I want to avoid using sessionScope.
Thanks
You need to pass the value through Task Flow parameters, copy it into Page Flow Scope of target task flow.
ReplyDeleteRegards,
Andrejus
Hello,
ReplyDeleteDoes this work with return activity in the parent taskflow? So basically I used contextual event to redisplay my parent TF from a region (within the same parent main page). The in my region/child TF, I have a return activity that refers to the retun activity of the parent TF. However for the contextual event that I mentioned, return activty does not redisplay the parent TF from previous data/display.
Thanks,
Cathy
Hi Andrejus,
ReplyDeleteIn regards to your previous comment from 14 May.
The problem is not with params passed to a child TF using TF Params, my problem is with sending the parameters from the child TF to the parent (so that I can send them afterwards to the other TF).
I use a parentAction from a child TF and wish to pass parameters from the child TF to the parent so that I can pass them to another TF from the parent.
I have an alternative method using a referenced ManagedBean that i set on the child TF as a parameter referenced from the parent TF. I then call from the child TF (using the ManagedBean set as a param to the TF) a method from the ManagedBean to pass a map of params. This references the instance of the ManagedBean from the parent TF and allows me to send params.
I just wish it were simpler to pass parameters from a child TF to to a parent TF using parentAction...
Hi Andrejus,
ReplyDeleteI have problem with similar situation.
Return to calling task flow is performed using parent action activity.
That activity needs to call commit task flow activity on calling task flow.
Commit is performed correctly but this error is raised during refresh:
<[3755] DCUtil, RETURNING: for pageFlowScope.listDoc.dynamicTaskFlowId>
<>
oracle.adf.controller.ControllerException: ADFC-06003: TaskFlowId for a child view port must be specified.
at oracle.adf.controller.internal.binding.RegionUtils.getTaskFlowId(RegionUtils.java:596)
at oracle.adf.controller.internal.binding.TaskFlowRegionModelLocal.getTaskFlowId(TaskFlowRegionModelLocal.java:28)
at oracle.adf.controller.internal.binding.DCTaskFlowBinding.getTaskFlowId(DCTaskFlowBinding.java:689)
at oracle.adf.controller.internal.binding.DCTaskFlowBinding.shouldRefreshRegion(DCTaskFlowBinding.java:723)
...
Any clue?
Best regards
Marjan
Hi Marjan,
ReplyDeleteJust as an idea, keep in mind that when you navigate "upwards" in the taskflow structure, you may find yourself with different instances of the beans if they have less than or equal scope to pageFlow.
By the looks of it you are trying do display a Taskflow but lack the TFId. The Id comes from a bean which may have a different instance than the one you're expecting.
You can:
1 - put the scope higher - sessionScope maybe ? (Although not recommended, you could do it as a test)
2 - hold the value (the tfId) somewhere else or pass the value as parameter to the calling Taskflow.
I would go for the latter - you should use taskflow parameters as much as possible.
Cheers,
Andrei
Hi Andrejus,
ReplyDeleteI have a taskflow from which i'm calling another taskflow as an inline-popup and if i click on a commandbutton in that popup i should return back to the parent taskflow. I am able to open the taskflow in popup. I'm unable to come back from the taskflow eventhough i used parent activity wit an outcome.
Could you please help me?
Regards
Mani