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 ?

Similar Messages

  • How to pass parameter through URL to bounded task flow with page fragment

    I want to pass parameter to Bounded Task Flow With Page Fragment trough URL
    as I start this taks flow with router and according to this Param I will rout the user.
    I added input param to taks flow named direction and make the task flow called URL invoke url-invoke-allowed
      <input-parameter-definition id="__41">
          <name id="__42">direction</name>
          <value>#{pageFlowScope.direction}</value>
          <class>java.lang.String</class>
        </input-parameter-definition>but I don't know how to add this to the JSPX that I will add the bounded task flow Inside.
    and How to pass this from URL

    Hi,
    url-invoke-allowed is only required if the task flow itself is directly accessible from a browser (which is not the case at all if the task flow uses page fragments). To pass input parameters to a task flow that is embedded in a region and that has input parameters, you define the input parameters on the taskFlow Id that is created in the PageDef file of the containing page. To learn ADF task flows, have a look at the videos below. They also contain a sample for passing parameters to a region
    http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/taskflow-overview-p1/taskflow-overview-p1.html
    http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/taskflow-overview-p2/taskflow-overview-p2.html
    Frank

  • Call adf bounded task flow library programatically

    I have a master application where I have one page with a region where all the task flows are going to be aggregated as tabs. Each task flow represents a module and is in a separate application. I add the adf library to the master application for bounded task flow "Module1".
    This is my code that works if the bounded task flow is in the master application:
    TaskFlowBindingAttributes tfAttr = new TaskFlowBindingAttributes();
    tfAttr.setId("Module1");
    tfAttr.setTaskFlowId(new TaskFlowId("/WEB-INF/module1.xml","module1"));
    taskFlowList.add(0, tfAttr);
    List<UIComponent> tabs = this.getPanelTab().getChildren();
    for (int i = 0; i < tabs.size(); i++) {
    RichShowDetailItem tab = (RichShowDetailItem)tabs.get(i);
    tab.setDisclosed(false);
    RichShowDetailItem tab = (RichShowDetailItem)tabs.get(index);
    tab.setDisclosed(true);
    But if bounded tak flow is in separate application the code doesn't work, it shows a blank page and i have defined a page with some panel boxes. So how shoud i call the bounded task flow programatically??.
    I am working with Jdeveloper 11.1.2.3.0, thank you
    Edited by: Miguel Angel on 19/12/2012 05:22 PM
    Edited by: Miguel Angel on 19/12/2012 07:29 PM
    Edited by: Miguel Angel on 19/12/2012 07:43 PM

    Yes I see it in the component palette. I found the problem, I see in the task-flow-registry.xml that the path for the bounded task flow is: "module1.xml" and not "WEB-INF/module1.xml". What sould be the correct path?.

  • 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

  • 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 =(

  • Dynamic method calls in bounded task flows?

    Hi!
    I have the following scenario:
    We are developing a framework in which we would include modules as ADF libraries (as JAR files) with bounded task flows. This framework contains a bean class with bindings for some UI components in framework which I enable or disable (depends on user action). That is the main reason bean class should be present in framework application.
    I have a bounded task flow in every module which needs to call a method in bean with UI component's bindings that would enable or disable that component.
    How can I achieve that? To pass bean as a parameter into bounded task flow and then call its methods? That is dynamic method calls for bean.
    I'm using JDeveloper 11.1.2.1.0
    Thanks for your help
    Regards, Marko

    Hi,
    I explained this; +"I have a bounded task flow in every module which needs to call a method in bean with UI component's bindings that would enable or disable that component. How can I achieve that? To pass bean as a parameter into bounded task flow and then call its methods?"+ a couple of times already (not sure if it was all for you) and don't think I change my position here. I also explained how to use a ValueExpression to lookp a managed bean containing component bindings (should be in requestscope).
    Frank

  • Error when launching bounded task flows in dynamic tabs from UI Shell templ

    Hello,
    could you tell me what is wrong with launching task flows in new tabs?
    I am using the UI Shell template, the task flow is bounded with one simple page (I tried with both fragments jspf and pages jsp)
    The execption is the following:
    java.lang.ClassCastException: javax.faces.component.UIViewRoot cannot be cast to oracle.adf.view.rich.component.fragment.UIXRegion
    Here's the code I am using to launch the bounded task flow:
    private void launchActivity(String title, String taskflowId, // taskflow is something like "/WEB-INF/mytask_flow.xml"
    boolean newTab) {
    try {
    if (newTab) {
    TabContext.getCurrentInstance().addTab(title, taskflowId);
    } else {
    TabContext.getCurrentInstance().addOrSelectTab(title,
    taskflowId);
    } catch (TabContext.TabOverflowException toe) {
    toe.handleDefault();
    Root cause of ServletException.
    java.lang.ClassCastException: javax.faces.component.UIViewRoot cannot be cast to oracle.adf.view.rich.component.fragment.UIXRegion
         at oracle.adfinternal.view.faces.taglib.region.RegionTag.doStartTag(RegionTag.java:105)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:50)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         Truncated. see log file for complete stacktrace

    Hi Pramod,
    Have you tried setting the Transaction attributes of your task-flow? Open up your task flow definition then go to Overview Tab. Try changing the appropriate attributes like setting the transaction as "Always Begin New Transaction" and/or unchecking the "Share data controls with calling task- flow". Try to mix settings and find the one that suit your needs.
    Regards,
    Pino

  • Where should backing bean for bounded-task-flow be declared?

    I have a bounded-task-flow that is used inside a dynamic region.
    I declared a managed bean to be used by activities (method/view) using the "backingBean" scope managed bean.
    There are two possible places that I can register the managed bean:
    1. adfc-config.xml
    2. the bounded-task-flow-definition.xml
    What are the differences between declaring the "backingBean" scope bean in "adfc-config.xml" and in the bounded-task-flow definition?
    What is the best practice for registering "backingBean" scope bean?
    If I understand correctly, registering the bean in adfc-config.xml is for one or more bounded-task-flow that use the same Bean class for instantiating their own backing bean. If the backing bean java class is only use by specific bounded-task-flow then it should make no difference to register the bean in either xml files.
    Am I correct?

    It should be registered within the bounded task flow for a couple reasons:
    1) Help maintain the encapsulation of the bounded task flow for reuse
    2) Managed bean definition metadata residing in adfc-config.xml or bootstrap configuration file will be preloaded when the ADF application is started. The actual managed beans will be instantiated the first time they are referenced. Therefore, to avoid the preload place them in the bounded task flow.
    thanks.

  • 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

  • Bounded-Task-Flow Page Fragment Control Flow Help

    jDeveloper: 11.1.1.0.2
    I am having an issue trying to figure out the correct way to use control flow cases between a bounded-task-flow with page fragments and an unbounded-task-flow page. We have taken the approach in our application to have a few shell / container pages to host bounded-task-flows made up of page fragments to facilitate re-usability and to speed up development. There are 4 or 5 shell pages on the applications unbounded-task-flow. As of now, we have about 20 page fragments that are implemented as bounded-task-flows. These fragments don't do much now, meaning there is only a single fragment in each bounded-task-flow. The issue I am having is trying to invoke a control flow navigation action from one of the fragments to load a different shell page.
    For Example, shellPage1.jspx contains fragment-flow-1 as a region. In my adfc-config.xml I have shellPage1.jspx and shellPage2.jspx, with control flow cases "toShell1" and "toShell2" respectively connecting the two pages. I have a link's action bound to the "toShell2" within the fragment that makes up fragment-flow-1. When the application is run, shellPage1.jspx and its fragment are displayed. But clicking on the link in the fragment ("toShell2") does absolutely nothing. It does not navigate me to the shellPage2.jspx as expected. What am I doing wrong here or do not understand?
    If the fragment is included as a JSP include, and not a bounded task flow include, everything works as expected. This is not desirable as we then need to copy the fragment's pageDef into the shellPage's pageDef to get the DataControls to function.
    If the faces-config.xml is used instead, and a JSF navigation case is used, it will also work as expected. This is not desirable because we really don't want to be mixing adcf-config and faces-config.
    So I am really stumped here.... Thanks in advance!

    Hi there:
    In your case, the adfc-config.xml has the control flow case between shell pages. And the task-flow-N.xml or your-task-flow.xml for each page fragment by default doesn't inherit control flow case from their containing shell page. In your case, in the page fragment task-flow.xml, you should add a "Parent Action" to flow to shell page2 for example. The outcome of "Parent Action" would be "toShell2" if calling from ShellPage1 page fragment.
    Is this 'Correct' or 'Helpful' for you? Please mark it as so if it does.
    Good luck,
    Alex

  • How to use a managed bean in a bounded task flow without definig it in adfc-config

    Dear all
    I create a bounded task flow without page fragments (the pages are jspx), i created a jspx page with a button that its action has bounded to a managed bean function.
    i defined the managed bean on the corresponding bounded task flow, but it does not work.
    But there is no problem when i define the managed bean in adfc-config.xml.
    can anybody help me with this problem.
    is it possible to use jspx page with backing bean in bounded task flows, without defining the beans on adfc-config?
    Thank you very much

    Dear Timo
    I use jDev 11.1.1.6 and the scope is Request.Although when i use task flow page fragment and create jsff pages, there is no problem.

  • Can ADF Faces Dialog Framework be used in a Bounded Task Flow ?

    Jdev. 11.1.1.4
    I have read chapter "19 Using Dialogs in Your Application" in the Jdev documentation.
    There explains that there are mainly two methods to open dialogs in ADF:
    The first (point 19.2) is calling a bounded task flow from a view activity (for example). This system can only open modal windows.
    The other is using the ADF Faces Dialog Framework and it seems to be more general. In point "19.3.1 How to Define a JSF Navigation Rule for Opening a Dialog" it is explainied the way to achieve this but the explanation begins with "In the adfc-config.xml file, create a page flow for".
    does this mean that I can not use this technology inside a Bounded task flow ?
    I have tried and it seems that it doesn't work.
    Currently we are using af:showpopupbehaviour to open popups, but this doesn't work with task flows and I don't like this.

    does this mean that I can not use this technology inside a Bounded task flow ?ADF Faces Dialog Framework can be used in both unbounded and bounded taskflows.
    I have tried and it seems that it doesn't work.The command commponent outcome must begin with "dialog:" and the command component tag must have useWindow="true", for example:
    <tt><af:commandButton action="dialog:toEdit" useWindow="true" .../></tt>
    Currently we are using af:showpopupbehaviour to open popups<af:showPopupBehaviour> can be used to open inline popups, but it has nothing to do with the Dialog Framework. Inline popups and the dialogs of the Dialog Framework are two different things.
    Dimitar
    Edited by: Dimitar Dimitrov on Jul 27, 2012 3:33 PM

  • Trains and Fragment Based bounded task flows

    The Problem:
    I am trying to create a bounded task flow based on fragments using a train. I have created the train and it is showing up on my page. Unfortunately, when I click next on the af:trainButtonBar the UI does not update. If I navigate off the page and come back to the page containing the train the UI is on the next task in the task flow and the train is updated but it is not happening through partial page rendering. Does anyone have an idea why the UI is not updating? Here are some of the file contents:
    My first Fragment in the task flow (InputsNewBasic.jsff):
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
              xmlns:f="http://java.sun.com/jsf/core">
      <af:pageTemplate viewId="/page_templates/TrainFragment.jspx">
        <f:facet name="fragementContent">
          <af:panelFormLayout>
            <af:inputText label="Name" inlineStyle="width:100%;"/>
            <af:inputText label="Description" rows="3" inlineStyle="width:100%;"/>
            <af:selectOneChoice label="Plugin Source">
              <af:selectItem label="Plugin Number One"/>
              <af:selectItem label="Plugin Number Two"/>
              <af:selectItem label="Plugin Number Three"/>
              <af:selectItem label="selectItem 1"/>
            </af:selectOneChoice>
            <af:inputText label="Input File Mask"/>
            <f:facet name="footer"/>
          </af:panelFormLayout>
        </f:facet>
      </af:pageTemplate>
    </jsp:root>
    My TrainFragment.jspx template:
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=windows-1252"/>
      <af:pageTemplateDef var="attrs">
        <af:xmlContent>
          <component xmlns="http://xmlns.oracle.com/adf/faces/rich/component">
            <display-name>TrainFragment</display-name>
            <facet>
              <description>This is the content that will be presented for the
                           fragment</description>
              <facet-name>fragementContent</facet-name>
            </facet>
          </component>
        </af:xmlContent>
        <af:train value="#{controllerContext.currentViewPort.taskFlowContext.trainModel}" var="trainNode">
          <f:facet name="nodeStamp">
            <af:commandNavigationItem text="#{trainNode.textAndAccessKey}"
                            visited="#{trainNode.visited}"
                            action="#{trainNode.action}"
                            disabled="#{trainNode.disabled}"/>
          </f:facet>
        </af:train>
        <af:trainButtonBar value="#{controllerContext.currentViewPort.taskFlowContext.trainModel}"/>
        <af:panelGroupLayout>
          <af:facetRef facetName="fragementContent"/>
        </af:panelGroupLayout>
      </af:pageTemplateDef>
    </jsp:root>
    My Task Flow Definition:
    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller">
      <task-flow-definition id="InputsNewTrain">
        <default-activity>InputsNewBasic</default-activity>
        <view id="InputsNewBasic">
          <page>/page_fragments/inputs/InputsNewBasic.jsff</page>
          <train-stop>
            <description>
              Specify the basic information for the Input definition.
            </description>
            <display-name>Basic Information</display-name>
            <sequential>true</sequential>
          </train-stop>
        </view>
        <view id="InputsNewDefineMap">
          <page>/page_fragments/inputs/InputsNewDefineMap.jsff</page>
          <train-stop>
            <description>
              Define the Input map
            </description>
            <display-name>Map Inputs</display-name>
            <sequential>true</sequential>
          </train-stop>
        </view>
        <view id="InputsNewCommit">
          <page>/page_fragments/inputs/InputsNewCommit.jsff</page>
          <train-stop>
            <description>
              Commit the Input definition
            </description>
            <display-name>Commit Definition</display-name>
            <sequential>true</sequential>
          </train-stop>
        </view>
        <train/>
        <use-page-fragments/>
      </task-flow-definition>
    </adfc-config>Message was edited by:
    JohnJ

    Hi,
    Have you try to set Refresh and RefreshCondition for your TaskFlow on the Page Definition
    for example:
    Refresh=IfNeeded
    RefreshCondition=<isPostback>

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

Maybe you are looking for