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

Similar Messages

  • 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

  • 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 can i call a taskflow methode from backing bean ??

    Build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660
    i like to call a Methode (taskflow) from backing bean!
    my bean code :
        public void imageLinkActionListner(ActionEvent actionEvent) {
            String              id      = actionEvent.getComponent().getId();
            int                 linkID  = Integer.parseInt(id.substring(4));
            DCBindingContainer  bc      = (DCBindingContainer)ADFUtils.getBindingContainer();
            DCTaskFlowBinding   tf      = null;
            System.out.println("Region Change...."+id+" INT "+linkID);
            switch (linkID) {
                case LINK_CALENDAR_REGION:
                    tf = (DCTaskFlowBinding)bc.findExecutableBinding("calendartaskflowPage");                   
                break;
                case LINK_MAIL_REGION:
                    tf = (DCTaskFlowBinding)bc.findExecutableBinding("mailtaskflowPage");                   
                break;
              case LINK_ADDRESS_REGION:
                  tf = (DCTaskFlowBinding)bc.findExecutableBinding("addresstaskflowPage");                   
              break;
              case LINK_BLOGS_REGION:
                  tf = (DCTaskFlowBinding)bc.findExecutableBinding("blogstaskflowPage");                   
              break;
              case LINK_MAPS_REGION:
                  tf = (DCTaskFlowBinding)bc.findExecutableBinding("mapstaskflowPage");                   
              break;
            default:
                return;
            if (tf != null){
                uiMainRegion.setRegionModel(tf.getRegionModel());
                uiMainRegion.setValue(tf.getRegionModel());
                tf.getExecutableBindings();
                AdfFacesContext.getCurrentInstance().addPartialTarget(uiMainRegion);
        }i like to call *#{backingBeanScope.mapBean.initMap}*
    my taskflow source
    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
      <task-flow-definition id="map-task-flow">
        <default-activity id="__1">map</default-activity>
        <view id="map">
          <page>/map/map.jsff</page>
        </view>
        <method-call id="initMap">
          <method>#{backingBeanScope.mapBean.initMap}</method>
          <outcome id="__7">
            <fixed-outcome>init</fixed-outcome>
          </outcome>
        </method-call>
        <control-flow-rule id="__2">
          <from-activity-id id="__3">initMap</from-activity-id>
          <control-flow-case id="__5">
            <from-outcome id="__6">init</from-outcome>
            <to-activity-id id="__4">map</to-activity-id>
          </control-flow-case>
        </control-flow-rule>
        <use-page-fragments/>
      </task-flow-definition>
    </adfc-config>

    Hi,
    to call the bean, use the EL in Java and reference #{backingBeanScope.mapBean.initMap} as a method expression. If you try and access the bean directly then chances are that the instance is not available. Using EL from Java always guarantees this
    Frank

  • 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

  • Can we call a javascript function from backing bean class?

    I have a requirement. In a multiselect table, when users selects some rows and clicks a button. Depending upon some condition, an alert box should appear with 2 buttons 'Yes' and 'No'. On clicking yes, certain field values in the selected rows of table should change. On clicking no, the alert box should close. As far as i know alert box can be done only in JS.
    Please help me, if a javascript function can be called in backing bean method or suggest some way where alert boxes can appear through ADF.

    I need to go back to the backing bean as i need to iterate through each selected row of the table in a method( method written for command button) and then if atleast one of the selected rows has job field='Manager', then an alert box needs to be displayed. If none of the rows have job field as 'manager', alert box should not be displayed.
    If I write the function for onclick, i cannot iterate through the selected rows of the table in JS function.
    Please suggest a way to do this.

  • 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.

  • How to call the task flow  one region from another region?

    I have page with 3 regions (column wise) named as start, center, end.
    currently I having task flow for middle(i.e, center) region which have panelCollection to perform view, create, & delete functions.
    Task flow:-
    From(action)To
    View(create)Create
    Create(Done)Execute (Execute is a method call)
    Execute(*)View
    View(self)Execute
    By press create button on Center page, task flow takes to the Create page(in Centre region) but all other regions(start, end) remains same.
    I have a usecase where we have a commandLink on Start region to show the View page on Center region. but it is not able to achieve when we move to Create/Edit page.
    Plz help me out to built the same.
    Thanq
    KSB
    Edited by: user641407 on Aug 28, 2008 2:22 PM
    Edited by: user641407 on Aug 28, 2008 2:23 PM

    Hi!
    First, I'm not sure that your page layout is adequate. The regions are not intended to be navigated from outside. Yet, they can send navigation action to the container (page on which the region is placed) through Parent Action taskflow element. Also, you can investigate Contextual Events that can be raised by region, but I'm also not sure that this can be easily used for cross-region navigation.
    I would suggest you to reconsider you page layout. You can use dynamic regions (which are populated by taskflow based on menu selection or click on actionLink or s button). This way, in the Start facet you place a navigation menu (links), which are connected with dynamic region in Center. If you want to reuse a navigation links (in Start), you can put all this in page template and reuse it over and over again.
    Regards,
    PaKo

  • Error while calling DYnamic shell task flow from unbounded login activity

    Hi All,
    MY problem-Hi ,
    In 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
    follwing exception occurs when i click on login link
    javax.faces.FacesException: javax.el.PropertyNotFoundException: Target Unreachable, 'tabContext' returned null
    at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:262)
    at javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:222)
    at javax.faces.webapp.UIComponentClassicTagBase.createFacet(UIComponentClassicTagBase.java:510)
    at javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:661)
    at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1142)
    Truncated. see log file for complete stacktrace
    Caused By: javax.el.PropertyNotFoundException: Target Unreachable, 'tabContext' returned null
    at com.sun.el.parser.AstValue.getTarget(AstValue.java:88)
    at com.sun.el.parser.AstValue.setValue(AstValue.java:133)
    at com.sun.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:255)
    at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:259)
    at javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:222)
    Truncated. see log file for complete stacktrace
    ANy idea about this
    Edited by: Shubhangi m on May 27, 2010 5:31 AM

    This question was answered in: Oracle UI Shell Functional Pattern
    Edited by: Richard Wright on Jun 15, 2010 8:52 AM

  • Button Actions are not working -invoking task flow from other project regio

    Hi
    I have a project using a mani.jspx file having a regions and the region is updated with different views based on a router condition in my bounded task flow. Everything working fine with in the project. I have a seperate project in my application having an index.jspx and region in it. I created the ADF lib jar file of the first project and imported to this project. I could invoke the task flow in the first project to the region in the index.jspx file in the seconed project.But none of the action managed bean method attached to the buttons in this view are working.The methods are not getting called on clicking on button and no error in the backend console of Integrated weblogic server.Any body can help what could be the issue ?
    Thanks
    Suneesh

    The issue that is happening when I refreshed the region with task flow from the project I imported.If I load the taskflow from the imported project on first time rendering all my managed bean actions are executing but if I load a different flow initially and change the taskflow Id imported from other project none of the managed actions are working.
    Thanks
    Suneesh

  • 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

  • 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.

  • Is it possible to call a task flow present in 1 ADF Mobile Application to another ADF Mobile Application?

    In ADF Mobile, I want to call a task flow present in application1 to a different application2 on click of a button. Is it possible?

    Hi,
    This is my code to call the package.
    String amDef = "model.service.DAFService";
    String config = "DAFServiceLocal";
    ApplicationModule am =
    Configuration.createRootApplicationModule(amDef, config);
         CallableStatement cstmt = null;
         String stmt = "begin call CP_DAF_PKG.DAF_PROCESS(?,?,?,?,?,?,?,?,?); end; ";
         cstmt = getDBTransaction().createCallableStatement(stmt,0);
    But in this case, I am getting
    oracle.jbo.InvalidOwnerException: JBO-25301: Application module is not a root app module but has no parent
    I understand the reason for this error. I need to call the
    createcallableStatement from the application module that I have above.
    Something like am. (call the package)
    But not sure about any method which does that..
    Please let me know if you know the way to solve it.
    Thanks,
    Venki

  • 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.

  • How can I call a plsql function from an attribute?

    I have an attribute defined in an element. I want execute a PLSQL function from the attribute, and display the returne value with an HTML template.
    I've defined the attribute's type like PLSQL, and I've put the called of the function in the value of the attribute, but it doesn't work. The only value I obtain is an URL (I think that is the URL of the function or someting like this).
    How can I call to my function from the attribute and display the returnes value in the page?
    Thanks.

    Thanks, but it doesn't work. I have an attribute called ID_BOL and I want to associate a sequence to that attribute. I've created a function, with the sequence. This function return de value of the sequence. I want taht the attribute takes the value of the sequenece dinamically.
    I've tried it, creating the type attribute like PLSQL, and calling the function from the attribute, but it doesn't work.
    How can I return the sequence value to my attribute?
    Thanks.

Maybe you are looking for

  • Let down by lack of BT infinity

    I swapped back to BT from Talk Talk yesterday. Phone line is live but Infinity not connected.... I rang last night after midnight and was assured it would be live today. On ringing back today I was told it won't be before Friday. The lack of trustwor

  • Administrative installing error

    Ok for the past week I've been trying to upgrade or uninstall adobe air. I'm running on a windows vista SP2 32-bit. The error I receive when I try to upgrade,uninstall or install is "An error occurred while installing Adobe AIR. Installation may not

  • How does photostream work? Can I share photos posted there?

    I had used MobileMe gallery to share photos with my son's family. With that no longer available, can I somehow us Photostream to do a similar sharing? Where can I find detailed information about how Photostream operates? I only have a MacBook Pro and

  • How to refresh iPhoto Videos in iMovie

    Hi. I've just learned to use iPhoto for images and to put videos into iMovie via importing them to iPhoto. However, if iPhoto and iMovie are open, I have to quit iMovie to see the update of files added to iPhoto Movies.  How do I refresh iPhoto Video

  • Download files through web Dynpro

    Hai All,   Now i am working in web Dynpro2.0.9. "IWDResource" property is used to download and upload files in web Dynpro. "IWDResource" is not supported by web Dynpro2.0.9.what is the alternative way for to download files other than using "IWDResour