Call bounded task flow from managed bean

Hi experts,
can we call a bounded task flow from a managed bean?
if yes , please explain.....
Thankz in advance
PMS

Hi john,
Thankz for ur reply........sorry if im asking stupid questions.
this is my tree selection handler
public void treeSelectionHandler(SelectionEvent selectionEvent) {
RichTree tree1 = (RichTree) selectionEvent.getSource();
RowKeySet rks2 = selectionEvent.getAddedSet();
Iterator rksIterator = rks2.iterator();
if (rksIterator.hasNext())
List key = (List)rksIterator.next();
JUCtrlHierBinding treeBinding = null;
treeBinding = (JUCtrlHierBinding) ((CollectionModel)tree1.getValue()).getWrappedData();
JUCtrlHierNodeBinding nodeBinding = nodeBinding = treeBinding.findNodeByKeyPath(key);
DCIteratorBinding _treeIteratorBinding = null;
_treeIteratorBinding = treeBinding.getDCIteratorBinding();
JUIteratorBinding iterator = nodeBinding.getIteratorBinding();
String keyStr = nodeBinding.getRowKey().toStringFormat(true);
iterator.setCurrentRowWithKey(keyStr);
JUCtrlHierTypeBinding typeBinding = nodeBinding.getHierTypeBinding();
String targetIteratorSpelString = typeBinding.getTargetIterator();
if (targetIteratorSpelString.equals("${bindings.Iascat1View1Iterator}"))
System.out.println("Tree Selected*************"+targetIteratorSpelString);*
else
if(targetIteratorSpelString.equals("${bindings.Iascat2View1Iterator}"))
*System.out.println("Tree Selected**************"+targetIteratorSpelString);*
else
*System.out.println("Tree Selected**************"+targetIteratorSpelString);*
I hav bounded task flow for each iterator for creating new record......i hav to replace code for calling bounded task flow instead of printing statement
PMS

Similar Messages

  • Can we call a task-flow from a bean in adf?

    Sir,
    Can we call a task-flow from a bean in adf?
    Regards

    you can do this using taskflow call activity
    check - Oracle ADF World: ADF Task Flow Call Activities
    http://docs.oracle.com/cd/E24382_01/web.1112/e16182/taskflows_activities.htm#ADFFD21945
    you can pass input parameter map and dynamic taskflow reference from managed bean
    check -https://blogs.oracle.com/DavidGiammona/entry/dynamically_assign_task_flow_c
    Or if you want to use dynamic region to swich between taskflows
    see- Zeeshan Baig's Blog: Working with Dynamic Regions in Oracle ADF
    Ashish

  • Passing Parameters to Bounded Task Flow from JSPX

    Hi All,
    1. Created a JSPX page using UIShell template.  This page contains 4 UI Components (InputComboBoxListOfValues) in SingleObjectContextArea.  Created a Managed Bean for this page and capture the selected value in ValueChangeListner and added the value to pageFlowScope.
    2. Created Unbounded Task Flow, dragged the JSPX page.
    3. Have a existing Bounded Task Flow with page fragments, it has MethodCall activity which is expecting inputParameter values from JSPX.
    4. To call the Bounded Task Flow from Unbounded Task Flow (has JSPX page) created 2nd JSPX page using UIShell template.
    5. Dragged the existing Bounded Task Flow into 2nd JSPX page, in context menu selected Region.  This Region is created in SingleObjectContextArea of UIShell.
    6. When dragged its asking about inputParameter mapping of Bound Task Flow.
    7. Configured the inputParameter value which are coming from pageFlowScope.
    8. Dragged the controlFlow from 1st JSPX to 2nd JSPX page to complete the Navigation.
    9. When running the Unbounded Task Flow, it showing 1st JSPX with LOV.
    10. Selected the values and clicked on Submit Action.
    11. Its now showing 2nd JSPX which contains Bounded Task Flow.
    12. But its displaying empty records table.  (Note: I am passing parameters to MethodCall inputParameters as pageFlowScope, My DB has displaying records based on inputParameters when tested it from OrcleSQLDeveloper)
    Could any body help me on this issue.
    My Code Snippets of Data Binding of 2nd JSPX page which has Bound Task Flow as a regionModel.:
    <taskFlow id="TaskFlow1"
                  taskFlowId="/WEB-INF/oracle/apps/TaskFlow1.xml#TaskFlow1"
                  activation="deferred"
                  xmlns="http://xmlns.oracle.com/adf/controller/binding">
          <parameters>
            <parameter id="PartnerKeyType" value="#{pageFlowScope.PartnerKeyType}"/>
            <parameter id="PartnerKey1" value="#{pageFlowScope.PartnerKey1}"/>
            <parameter id="InteractionPartnerRole"
                       value="#{pageFlowScope.InteractionPartnerRole}"/>
            <parameter id="BusinessProcessName"
                       value="#{pageFlowScope.BusinessProcessName}"/>
          </parameters>

    Hi
    first of all Can you get the pageFlow scope variable in taskflow?which you are passing from jspx page?
    if you are able to get the Lov value in Taskflow try refresh taskflow on changing the LOV.
    you need to add input parameter type as boolean,change the parameter from false to true when the LOV value changed.
    now use refreshifNeeded property in pagedef bindings file

  • Call bounded task flow

    hello,
    how can unbounded task flow call bounded task flow.
    thank you.

    Hi,
    Not exactly sure what you want to achieve, other than the obvious.
    So, here are some links that might help you;
    http://www.oracle.com/technetwork/developer-tools/jdev/adf-task-flow-design-132904.pdf
    http://docs.oracle.com/cd/E15586_01/web.1111/b31974/taskflows.htm
    Regards,
    Dimitris.

  • Calling a bounded task flow from  an unbounded task flow

    How can I navigate from an unbounded task flow to a bounded task flow....
    My situation is as follows:
    In the adfc-config.xml, I have a view activity ADMhome, Wildcard as well as a task-flow-call, admTaskFlow.  A control flow goes from the wildcard to ADMhome while another control flow goes from the wildcard to task-flow-call.
    I have a bounded task-flow "adm-task-flow" with two view actitivies: AdmListView and AdmPageView with AdmListView as the default activity. A Control flow goes from the AdmListView to AdmPageView, all pointing the page fragments
    I created another page ADMregion which is a  (jsf) where I dragged the adm-task-flow onto.
    When I ran the application, the home page displayed properly but when I clicked on a command button to invoke the "adm-task-flow", the application will not responded.
    When I looked at the log message, It gave this message:
    <TaskFlowCallXmlImpl> <parse> ADFc: /WEB-INF/adfc-config.xml:
    <TaskFlowCallXmlImpl> <parse> ADFc: Failed to parse element 'task-flow-reference'.
    <ActivityXmlImpl> <parse> ADFc: /WEB-INF/adfc-config.xml:
    <ActivityXmlImpl> <parse> ADFc: Activity metadata could not be parsed. [Activity Type, ID] = ['task-flow-call', ' admTaskFlow '].

    Thanks for this clarifications...
    I created a view activity in the adfc-config-xml and called the page (ADMregion) where the task flow was embedded. It worked well..
    Another clarification I want is this, when do I use a task flow call to call a task flow?  My thinking and my understanding was that when you create a task flow, you use a task flow call to invoke the task flow.
    Pls another aspect I want you to guide me is on calling a java class from jsf and jsff pages. Being new in these technologies, I have having some difficulties navigating and putting all of them together. My problem is this:
    I created a java class under the view package of Application Sources in the View Controller of my Application. The java class returns a value. I designed a jsff form with input fields and and command buttons. I want when I clicked on a command button to take a parameter from the input field and pass it to the java class, the after processing, the java class returns a value which I will place inside one of the input fields in my jsff form.

  • Call a bounded task flow from within another bounded task flow

    Hello
    I am using Jdev 11g Release 1 and need help with the following issue...
    Here's an outline of my application..:
    1. There is a main .jspx page with icons to choose different paths.
    2. Each icon denotes a bounded task flow with TRAIN.
    3. Upon clicking on any icon, you get into a series of TRAIN STOPS.
    4. On one of the TRAIN STOP there is a button to ADD NEW which shows a popup that is tied to another bounded task flow with TRAIN STOPS.
    5. This taskflow 2 calls a method as its default activity.
    The issue is when I click on ADD NEW, the popup displays empty. I even put break points on the method and it doesn't even go to the method. The input parameters on the method have been checked so I know that is not an issue. Any clues as to why it won't open the popup..?
    Any help will be greatly appreciated.

    vinod_t_krishnan wrote:
    i guess there is something corrupted in the definition file that is created for the method action in your taskflow.. can u cross check that..What do you mean? How do I cross check this...? Please help
    and also check if the DataBindings.cpx has the correct reference of the method definiiton file..Did this..all references point correctly
    or otherwise can u drag and drop the method again on to the taskflow and try.. if this time it had created all entries correctly.?Tried it ...doesn't work =(

  • Invoke task flow from backing bean?

    Hi,
    Is there a way to invoke task flow from a backing bean? If yes, how?
    Thanks in advance

    Thanks Frank. I am not an expert with ADF so please bear with me if my questions doesn't make sense. Basically what I am trying to achieve is this.
    I have a taskflow and I am currently in a ui page which displays a page fragment inside this task flow. In this page, on click of a button, I need to call another task flow and show it in a adf popup. Is this the case referred in the pdf document that you pointed out?
    Thanks

  • Calling bounded task flows imported as ADF libraries

    Hello,
    I have a main application referencing many bounded task flows included in ADF libraries.
    Is there a way to make the application not throwing exceptions if one of these libraries including the called task flow is not found?
    The first question is how to catch the exception "Caused by: oracle.adf.controller.ControllerException: ADFC-02001"
    The second problem is that once an exception is thrown , the only way to make the application work again with that task flow is to redeploy the whole application with the missing library in the proper place.
    It seems it is not possible to just add the library at run-time.
    Redoplying an application also seems to invalidate all the current open sessions.
    Could you give me suggestions or best practice on making the main application more indipendent from the libraries?
    Thanks.

    Hello Frank,
    It seems there's no way to catch the exception thrown when dinamically calling a bounded task flow in a (missing) library. In facts, I added the single page of the main application as default exception handler activity. I also tried to catch ALL exceptions in the Launcher class below, but I had no luck at all. Task flows are called dinamically from this common piece of code (appropriate for the UI Shell template):
    try {
    if (newTab) {
    TabContext.getCurrentInstance().addTab(title, taskflowId);
    } else {
    TabContext.getCurrentInstance().addOrSelectTab(title,
    taskflowId);
    } catch (TabContext.TabOverflowException toe) {
    toe.handleDefault();
    } catch (ControllerException ce) {
    System.out.println("The flow arrives here " + title + ": " + taskflowId);
    } catch (RuntimeException re) {
    System.out.println("The flow arrives here " + title + ": " + taskflowId);
    } catch (Exception e) {
    System.out.println("The flow arrives here " + title + ": " + taskflowId);
    I also tried to call the task flow in a remote application, but TabContext.getCurrentInstance().addTab(title, taskflowId) expects the taskflowid to be part of the main application, not of the remote app, since addTab() always add a "/" before the taskflowid String passes as parameter.
    So again my question: is there a way to profit by the dynamic features coming along with the UI Shell template, where task flows can be really referenced and called each time at run-time, no matter if libraries containing these task flows are present or not when deploying the caller application?
    I also repeat that from the tests I have done it looks like I can deploy the caller application without the referenced ADF libraries in their place (containing taskflows that should be called at run-time on user actions), but the problem in this case is that after that moment there's no way to fix the problem by just adding the missing library, that is you cannot place the library where it is expected to be and expect the caller to work after next call; this will just not work until next deploy of the calling application when libraries are in place . We also don't want completely separate web applications. We need task flows integration with the chance to modify and deploy these taskflows as ADF libraries at run time, separately from the caller of the taskflow, without needing to restart/deploy the caller application everytime a libraries changes or a missing library is added.

  • How to invoke different pages/bounded task flows from Radio Group faces control ?

    Hi,
    I am quite new to JDeveloper and Java. Trying to call three different pages/bounded taskflows depending upon the each selection of radio buttons in Radio Group of 3 Radio buttons.
    Advance appreciation for hints/guide line for doing the same.

    Hi,
    I can't code it for you, but the way it works is that you create navigation cases to the pages and task flows. Then you set autosubmit=true for the radio group component and define a value change listener. The value change listener then would do the navigation following the navigation case names determined by the radio settings.
    To implement this I suggest to
    1. create a hidden command button with its action property pointing to the same managed bean handling the value change event (just double click the button to create the managed bean method)
    2. In the value change listener, change the navigation case returned by the action method
    3. In the value change listener you call
      ActionEvent ae = new ActionEvent(   (RichCommandButton)valueChangeEvent.getUIComponent().findComponent("button_id"));
      ae.queue()
    Frank

  • Can we call two task flow from another task flow

    Hi everyone,
    i have a issue. I have a tab(p1),under that tab i have created two tab(p1 and p2).i have to create task flow for p1 and p2 .In both ,p1 and p2, i am doing some operations. then i have to call both the task flow under another task flow(p1).what should be the steps i have to take to do that.
    My version is 11.1.1.6
    please respond as soon as possible.
    Thanks in advance....

    hi
    sorry to say this
    i have not much time to play 20-20 chat. please elaborate you usecase. you can get you answer within a post
    but we will use router when we have some condition.if you are using router. you should use some "condition" what is that?
    but in both the child tab,i just have to fill the form.ok. i hope that you are using af:table in parent TF. in child tab you are using af:form
    before commiting or at the time if commiting you should get the data's in af:form. if am right means you should have association/viewlink between those eo's/vo's
    if you have means while commiting the parent table iterate over the rows show in child tab - af:form
    it will show the both the child panel.go to panettab render poerpty rendered say as condition {yourparenttableiteratoecount ge 0 ? true : false}
    or else as you said, make router condition {yourparenttableiteratoecount ge 0} show the child TF.
    from the answer you may understood.(just a hope)

  • How to call page in adfc-config from bounded-task-flow return?

    Hello everybody, I am using JDeveloper 11.1.2.3.0
    I have in my adfc-config some pages and one bounded-task-flow (with pages, not page fragments). I call the bounded task flow from one of my pages but I want that when I return from the bounded-task-flow to redirect the page to another page rather than the page that called it. I dont know if this can be done, but do you have any idea on how to achieve something like this?
    Thank you

    Here is your sample http://tompeez.wordpress.com/2013/06/18/jdeveloper-navigation-after-return-from-bounded-task-flow/
    Timo

  • Calling a bounded task flow (that uses fragments) from another application

    Hello,
    I'm currently having difficulties calling a task flow located inside another application.
    I have application Console which is my main application in which I would like to run other applications within. Inside this Console I have it divided into splitter windows and inside them I have regions. My goal is to be able to call a task flow from another application inside one of these regions but so far I'm having no luck.
    My first problem occurred when I created a 'local' task flow to make a call to another application's task flow. When I set the properties to the task flow call, it gave me an error that it could not find the .XML file for that task flow when I ran the Console application. I then proceeded to copy that .XML from the remote application into the Console's WEB-INF directory and I seemed to get a bit farther. The error I get now is saying that I cannot run a task-flow that uses fragments. It's essentially trying to run that task flow as an entirely new page instead of inside the region that it's bound to. It's NOT a dynamic region (although that's the end goal here). So I then changed the other application's task flow to simply display an entire page rather than fragments inside a region and voila, it works..... kind of.
    To recap how I was able to call another application's task flow inside the Console:
    - I had to manually copy the task flow xml file into the Console WEB-INF directory
    - I had to change the task flow so that it didn't use fragments
    - I have called the task flow but I lose my console page entirely, no more regions or splitters so I'm back to square one.
    If anybody has any suggestions, hints, tips or anything, send them this way and I will be forever greateful.
    Thanks,
    Mark

    Thanks for your response Frank.
    Unfortunately the problem seems to be greater than that. I've been able to package task-flows into a jar library and tried importing them that way with no luck.
    I'm simple trying to call an external task-flow to run inside a region which is inside a splitter panel that I call my console.
    Any other ideas ?

  • Pass parameter from one jsff to other in bounded task flow

    Hi All,
    I'm using 11g adf.
    I have a requiement to get parameters value from one jsff to another jsff .
    In bounded taskflow , the trans.jff has parameters which i have to carry to couple of detaill.jsff (5 jsff).
    In between trans.jsff and detail.jsff am using router to validate the path to call particular detail.jsff.
    Issue now i need some parameter value to send from trans.jsff to detail.jsff.
    i have used below in trans.jsff :
    <af:commandToolbarButton text="update ''}" id="ctb_update"
    action="callingPages"
    actionListener="#{RTACorrespondanceQry.SignatureActListionar}">
    <af:setActionListener from="#{bindings.TransBatchNo.inputValue }" to="#{requestScope.batchNo}"/>
    </af:commandToolbarButton>
    I have created batchNo parameter in bounded task flow parameter
    In bean i try to retrieve value like dis JsfUtils.resolveExpression("#{pageFlowScope.batchNo}")
    In detail.jsff -- #{pageFlowScope.batchNo} in value output text component.
    Getting null value.
    thanks in advance

    Hello user9010551 ,
    you are set a value in requestScope
    <af:commandToolbarButton text="update ''}" id="ctb_update"
    action="callingPages"
    actionListener="#{RTACorrespondanceQry.SignatureActListionar}">
    <af:setActionListener from="#{bindings.TransBatchNo.inputValue }" to="#{requestScope.batchNo}"/>
    </af:commandToolbarButton>and read a value in pageFlowScope !!!!
    JsfUtils.resolveExpression("#{pageFlowScope.batchNo}")

  • 11gR2 error: call a bounded task flow with method call as default activity

    hi all,
    We migrated several applications to the JDev 11g R2.
    There are 2 applications that contain a bounded task flow where we define Method Call as default activity.
    We need invoke specific actions before opening the page.
    They run well with 11gR1.
    But with *11G R2*, I can’t call directly this task flow with the following URL:
    http://127.0.0.1:7101/MyAPP/faces/adf.task-flow?adf.tfId=my-flow-def&adf.tfDoc=/WEB-INF/flows/my-flow-def.xml
    Message:
    *<SecurityUtils><invokeURLAllowed> ADFc : impossible to call directly the task flow '/WEB-INF/flows/ my-flow-def.xml #my-flow-def' with the help of URL*
    (original message: <SecurityUtils><invokeURLAllowed> ADFc : impossible d'appeler directement le flux de tâches '/WEB-INF/flows/ my-flow-def.xml #my-flow-def' à l'aide de l'URL.)
    Any idea?
    Thanks for you help

    Hi,
    Have a look at the task flow properties, in PatchSet1, a new feature "invokeURLAllowed" is added that prevents bounded task flows from being URL accessible for security reasons. You can swithc this feature on and off
    Frank
    Ps.: I though that bounded task flows that you call from a URL generally needed to have a viewActivity as the default activity

  • How to call a AM method with parameters from Managed Bean?

    Hi Everyone,
    I have a situation where I need to call AM method (setDefaultSubInv) from Managed bean, under Value change Listner method. Here is what I am doing, I have added AM method on to the page bindings, then in bean calling this
    Class[] paramTypes = { };
    Object[] params = { } ;
    invokeEL("#{bindings.setDefaultSubInv.execute}", paramTypes, params);
    This works and able to call this method if there are no parameters. Say I have to pass a parameter to AM method setDefaultSubInv(String a), i tried calling this from the bean but throws an error
    String aVal = "test";
    Class[] paramTypes = {String.class };
    Object[] params = {aVal } ;
    invokeEL("#{bindings.setDefaultSubInv.execute}", paramTypes, params);
    I am not sure this is the right way to call the method with parameters. Can anyone tell how to call a AM method with parameters from Manage bean
    Thanks,
    San.

    Simply do the following
    1- Make your Method in Client Interface.
    2- Add it to Page Def.
    3- Customize your Script Like the below one to Achieve your goal.
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("GetUserRoles");
    operationBinding.getParamsMap().put("username", "oracle");
    operationBinding.getParamsMap().put("role", "F1211");
    operationBinding.getParamsMap().put("Connection", "JDBC");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    return null;
    i hope it help you
    thanks

Maybe you are looking for