Clarification?: Frank & Lynn's book - task flow "shared" data control scope

I'm seeking clarification around shared data control scopes please, regarding a point made in Frank Nimphius and Lynn Munsinger's "Oracle Fusion Developer Guide" McGraw-Hill book.
On page 229 there is a note that states "The data control scope can be shared only if the transaction is also shared". Presumably this implies that only the transaction options "Always Use Existing Transaction" or "Use Existing Transaction if Possible" are applicable for a shared data control scope.
However this seems at odds with what the IDE supports, as you can also select the transaction options "<No Controller Transaction>" and "Always Begin New Transaction" when the data control scope is set to shared.
What's correct? The IDE or the book?
Your assistance appreciated.
CM.

Chris,
"The data control scope can be shared only if the transaction is also shared"
At least the book stands correct for what I could test in a simple test case:
1. no transaction - no sharing
- no master/detail synchronization. DC are bot shared
- commit in called btf does not commit caller task flow
2. "always use existing" transaction selects shared Data Control and automatically disables this field so there is no other option for this
3. Share DataControl and "Always begin transaction"
Committing transaction in called btf also commits the transaction in calling TF
So bottom line is that the transaction handling in ADFc appears to be confusing as it only is a directive for the DataControl to interpret.
Also see page 14 "Task flow "new transaction" vs. "new db connection"" of : http://www.oracle.com/technetwork/developer-tools/adf/learnmore/march2011-otn-harvest-351896.pdf
In ADF BC it seems that separated transactions only exist if you use isolated mode. If you use shared and new transaction then basically the transactions are not isolated.
Frank
Ps.: I took an action item to follow up with development about what the expected ADF BC behavior for the controller settings are.

Similar Messages

  • Shared Data Control

    Dear All,
    I often find myself reading documents regarding
    shared data control and transaction in taskflow but I often
    scratch my head what does it mean?
    I googled about it but cant find a good resource othat explains the relevance of the topic
    in ADF programming.
    Can somebody please share a link or a resource where I could read about it?
    Thanks.

    http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/taskflows_parameters.htm#ADFFD1693
    http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bclookups.htm#ADFFD1596
    "Use Existing Transaction if Possible and Shared data control scope options should be used, as, this option will reuse an existing transaction if available from the calling task flow, or, establish a new transaction if one isn't available."

  • Sharing Data control Frame

    Guys,
    I have a issue with sharing data control frame.
    I have a search page. From the search results, if the users clicks on a result row, i have to open a NEW TAB providing details of the row. So everytime the user can go back to search tab, and click on the row to open in a new tab.
    For that, I'm launching a new Taskflow everytime the user clicks on the row in the serch rsults table. That taskflow is set to Transaction : <No Controller Transaction>. so each time you gonna lauch a new tab, it gonna consume a new data control frame. (and use as many DB connections)
    But i dont want that. so i set the Transaction to 'share the data controls with the calling taskflow' and '<always use existing transaction>'. But the problem is all the tabs showing the same information, which i dont want.
    How can i overcome the issue without using multiple Data source connections(i mean holding multiple data control frame)?
    Any help appreciated...

    @shay, we can't use that configuration. When using <always use existing transaction>, we need to share data control.
    otherwise, we will endup in this error, "Existing transaction is required when calling task flow"
    @amseth -> which means it shows the data for last selected row in the search results.
    I'm working to find a solution. Any help, appreciated..

  • Shared data controls and Ctrl+N

    Hi,
    From the oracle docs page mentioned below
    http://docs.oracle.com/cd/E14571_01/web.1111/b31974/taskflows_parameters.htm#CHDIEDEH
    I have a question regarding the line "However, if an end user uses the Ctrl+N keys to open a new browser window, the two windows have the same server-side state and share data control instances." from shared data control instances topic.
    If we issue Ctrl+N, it opens a new window and the default being a blank page we would be required to navigate to our application once again. Wouldnt that create a new server session anyways?
    Under what circumstance would Ctrl+N reuse the same server session from the old window and share the same instance of data control? Can someone tell me a test case to verify if the new window is using the same data control instance?

    Hi,
    the doc basically says that you work in a separate data control frame, which means you are in the same session but a new transaction. read this for best practices and some more background information
    http://one-size-doesnt-fit-all.blogspot.com/2011/10/pageflowscope-with-unbounded-task-flows.html
    Frank

  • Data-control-scope=shared is not working

    Steve Muench said in January 2010 in that post {thread:id=1012099}
    "In order to share the connection/transaction when data-control-scope=shared, today as an implementation detail we do AM nesting for you at runtime when using task flow calls”
    From that thread I understood that: by setting *"data-control-scope"* to *"shared"* +(this is the default in 11.1.1.3.0)+ in _task flow definition file_ +(in behavior section)+, it should make the task-flow using the same database connection than the _parent’s application module_.
    *Is that true?*
    If so, it is not working for me.
    <li>I’ve created 2 _independents_ ADF Fusion Applications : *MyMainApp* and *MyTFlow* </li>
    <li>Each application has a Model and a ViewController projects.</li>
    <li>Each application has one ViewObject and one Application Module.</li>
    <li>MyMainApp/Model contains MyMainService Application Module & AllEmployeesView ViewObject </li>
    <li>MyTFlow/Model contains MyTFlowService Application Module & AllDepartmentView ViewObject</li>
    <li>MyMainService and MyTFlowService have the same JDBC Datasource (jdbc/GCCDS).</li>
    <li>_In MyTFlow/ViewController project_</li>
    <li>I’ve created one page fragment and dragged & dropped AllDepartmentView as an ADF Read-Only Table</li>
    <li>I’ve created one Task Flow (allDept-task-flow-definition) and added the pageFragment onto it.</li>
    <li>I’ve set the “data-control-scope” to “shared” (it was the default) </li>
    <li>I’ve created a new deployment profile (ADF Library Jar) and deployed the jar file </li>
    <li>_In MyMainApp/ViewController project_</li>
    <li>I’ve created a JSF Page (home.jspx)</li>
    <li>I’ve dragged & dropped AllEmployeesView as an ADF Read-Only Form. </li>
    <li>I’ve dragged & dropped the “allDept-task-flow-definition” from “Resource Palette” onto the JSF Page. It automatically put it inside an af:region and imports the jar file to the Libraries (ADF Library)</li>
    <li>I run the home.jspx page. It works fine but with *2 database connections!*</li>
    I think I’ve missed something.
    Best Regards
    Nicolas

    Hi,
    the problem is that the Application Modules are root modules and therefore open a new database connection. Only nested application modules reuse the connection of the parent AM. Andrejus Baranovski did blog about this and came up with the suggestion to build reusable projects such that the model and the view controller parts are deployed separately into ADF Libraries and then combined in a super ADF Librery. This way you can use nested application modules (a single datase connection)
    http://andrejusb.blogspot.com/2010/10/how-to-reduce-database-connections-and.html
    http://andrejusb.blogspot.com/2010/06/adf-regions-and-nested-application.html
    Note that IMO the real power of shared Data Controls comes when you use ADF Regions in an application as a mean of modularization.
    Frank

  • 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

  • The subtle use of task flow "No Controller Transaction" behavior

    I'm trying to tease out some subtle points about the Task Flow transactional behavior option "<No Controller Transaction>".
    OTN members familiar with task flows in JDev 11g and on wards would know that task flows support options for transactions and data control scope. Some scenarios based on these options:
    a) When we pick options such as "Use Existing Transaction" and shared data control scope, the called Bounded Task Flow (BTF) will join the Data Control Frame of its caller. A commit by the child does essentially nothing, a rollback of the child rolls any data changes back to when the child BTF was called (i.e. an implicit save point), while a commit of the parent commits any changes in both the child and parent, and a rollback of a parent loses changes to the child and parent.
    A key point to realize about this scenario is the shared data control scope gives both the caller and called BTF the possibility to share a db connection from the connection pool. However this is dependent on the configuration of the underlying services layer. If ADF BC Application Modules (AMs) are used, and they use separate JNDI datasources this wont happen.
    b) When we pick options such as "Always Begin New Transaction" and isolated data control scope, the called BTF essentially has its own Data Control Frame separate to that of the caller. A commit or rollback in either the parent/caller or child/called BTF are essentially isolated, or in other words separate transactions.
    Similar to the last point but the exact opposite, regardless how the underlying business services are configured, even if ADF BC AMs are used with the same JNDI data source, essentially separate database connections will be taken out assisting the isolated transactional behavior with the database.
    This brings me back to my question, of the subtle behavior of the <No Controller Transaction> option. Section 16.4.1 of the Fusion Guide (http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/taskflows_parameters.htm#CIHIDJBJ) says that when this option is set that "A new data control frame is created without an open transaction." So you could argue this mode is the same as isolated data control scope, and by implication, separate connections will be taken out by the caller/called BTF. Is this correct?
    Doesn't this in turn have implications about database read consistency? If we have one BTF participating in a transaction with the database, reading then writing data, and a separate BTF with the <No Controller Transaction> option set, it's possible it wont see the data of the first BTF unless committed before the No Controller Transaction BTF is called and queries it's own dataset correct?
    An alternative question which takes a different point of view, is why would you ever want this option, don't the other options cover all the scenarios you could possibly want to use a BTF?
    Finally as a separate question based around the same option, presumably an attempt to commit/rollback the Data Control Frame of the associated No Controller Transaction BTF will fail. However what happens if the said BTF attempts to call the Data Control's (not the Data Control Frame's) commit & rollback options? Presumably this will succeed?
    Your thoughts and assistance appreciated.
    Regards,
    CM.

    For other readers this reply is a continuation of this thread and another thread: Re: Clarification?: Frank & Lynn's book - task flow "shared" data control scope
    Hi Frank
    Thanks for your reply. Okay I get the idea that were setting the ADFc options here, that can be overridden by the implementation of data control, and in my specific case that's the ADF BC AM implementation. I've always known that, but the issue became complicated because it didn't make sense what "No Controller Transaction" actually did and when you should use it, and in turn data control frames and their implementation aren't well documented.
    I think a key point from your summation is that "No Controller Transaction" in context of ADF BC, with either data control scope option selected, is effectively (as far as we can tell) already covered by the other options. So if our understanding is correct, the recommendation for ADF BC programmers is I think, don't use this option as future programmers/maintainers wont understand the subtlety.
    However as you say for users of other data controls, such as those using web services, then it makes sense and possibly should be the only option?
    Also regarding your code harvest pg 14 entry on task flow transactions: http://www.oracle.com/technetwork/developer-tools/adf/learnmore/march2011-otn-harvest-351896.pdf
    ....and the following quote in context of setting the transaction option to Begin New Transaction:
    >
    When a bounded task flow creates a new transaction, does it also mean it creates a new database connection? No.
    >
    ....I think you need to be a little more careful in this answer, as again it depends on the underlying data control implementation as you point out in this thread. In considering ADF BC, this is correct if you assume only one root AM. However if the BTFs have separate root AMs, this should result in 2 connections and transactions..... well at least I assume it does, though I wonder what will happen if both AMs share the same JNDI data source.... is the framework smart enough to join the connections/transactions in this case?
    Also in one of your other code harvests (apologies I can't find which one at the moment) you point out sharing data control scopes is only possible if the BTF data controls have the same name. In context of an ADF BC application, with only one root AM used by multiple BTFs, this of course would be the case. Yet, the obvious implication to your summary of transaction outcomes in this thread, if the developers for whatever reason change the DC name across DataBindings.cpx files sourced from ADF Libraries containing the BTFs, then no, it wont.
    Overall the number of variables in this gets really complicated, creating multiple dimensions to the matrix.
    Going to your last point, how can the documentation be improved? I think as you say the documentation is right in context of the options for ADFc, but, as the same documentation is included in the Fusion Dev Guide which assumes ADF BC is being used, then it isn't clear enough and can be misleading. It would seem to me, that depending on the underlying data control technology used, then there needs to be documentation that talks about the effect of ADFc task flow behavior options in the context of each technology. And God knows how you describe a scenario where BTFs use DCs that span technologies.
    From context of ADF BC, one thing that I've found hard in analyzing all of this is there doesn't seem to be an easy way from the middletier to check how many connections are being taken out from a data source. The FMW Control unfortunately when sampling db connections taken out from a JNDI data source pool, doesn't sample quickly enough to see how many were consumed. Are you aware of some easy method to check the number of the db connections opened/closed?
    Finally in considering an Unbounded Task Flow as separate to BTFs, do you have any conclusions about how it participates in the transactions? From what I can determine the UTF lies in it's own data control frame, and is effectively isolated from the BTF transactions, unless, the BTF calls commit/rollback at the ADF BC data control level (as separate to commit/rollback at the data control frame level), and the data control is used both by the UTF and BTF.
    As always thanks for your time and assistance.
    CM.

  • Af:query prefill search fields on task flow enter

    Hello.
    What is given:
    Bounded task flow A with shared data control scope. Task flow contains one page fragment with two components: <af:query> and <af:table>. Table takes data from read only view object B. <af:query> is bound to search criteria within B. Also there are several bind variables in B which are used in criteria.
    Task flow A is used from other task flow via <af:region>.
    What is needed:
    When entering bounded task flow first time - show user empty search form and empty table.
    When entering bounded task flow next time and user performed no search yet (just left task flow without hitting Search first time) - show user empty search form and empty table.
    When entering bounded task flow next time and user performed some search - fill search form with latest entered values, show data in table that corresponds to search values.
    What is the best/recommended approach for implementation of such functionality?
    While debugging I can see on bounded task flow entry VO B contains latest bind variables from previous execution. But somehow they are not reflected in search form and are not applied when using Query Automatically View Criteria hint.
    I am using JDeveloper 11.1.1.5

    Hello Frank.
    Thread you mentioned contains relevant info.
    Thank you for help and quick response.
    One difference I faced with thread's code is that I could not get view criteria using JUSearchBindingCustomizer.getViewCriteria. This method always returned instance of criteria without criteria rows at all. Thus saveState() was not working.
    Instead, ViewObject.getViewCriteria("criteriaName") worked for me. Returned criteria in this case contained needed current row and filled criteria row attributes.

  • Application Module instance not found in task flow

    Hi,
    i am working on Oracle Jdeveloper 11g Release 1
    I have created a bounded task flow for with following properties:
    <transaction id="__14">
          <new-transaction/>
        </transaction>
        <data-control-scope id="__15">
          <shared/>
        </data-control-scope>
        <task-flow-reentry id="__13">
          <reentry-not-allowed/>
        </task-flow-reentry>I have declared a page flow scope bean in the task flow as:
    <managed-bean id="__5">
          <managed-bean-name id="__6">trainBean</managed-bean-name>
          <managed-bean-class id="__8">oracle.sysman.core.gccompliance.view.library.rule.patchRule.PatchRuleTrainBean</managed-bean-class>
          <managed-bean-scope id="__7">pageFlow</managed-bean-scope>
        </managed-bean>but when i am trying to access the AM Impl instance from bean methos as below:
    public static final String DATA_CONTROLLER = "ComplianceLibraryAMDataControl";
        public ComplianceLibraryAMImpl getDataControl() {
            DCBindingContainer bc =
                (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
            ApplicationModule am = bc.findDataControl(DATA_CONTROLLER).getApplicationModule();
            return (ComplianceLibraryAMImpl)am;
        }I am getting null pointer exception in ApplicationModule am = bc.findDataControl(DATA_CONTROLLER).getApplicationModule();
    I am using the same way to get bean in other task flows as well , so i think the code to get bean is working correctly.
    What am i missing in this?

    thanks Puthanampatti ,
    This is working and i am able to get AM instance from this , But i am not sure what is the difference between:
    public ComplianceLibraryAMImpl getComplianceLibraryAM() {
    ComplianceLibraryAMImpl am = (ComplianceLibraryAMImpl)ADFUtils.getApplicationModuleForDataControl("ComplianceLibraryAMDataControl");
    return am;
    Referred methods:
         * Get application module for an application module data control by name.
         * @param name application module data control name
         * @return ApplicationModule
        public static ApplicationModule getApplicationModuleForDataControl(String name)
            return (ApplicationModule) JSFUtils.resolveExpression("#{data." +  name +  ".dataProvider}");
         * Method for taking a reference to a JSF binding expression and returning
         * the matching object (or creating it).
         * @param expression EL expression
         * @return Managed object
        public static Object resolveExpression(String expression) {
            FacesContext facesContext = getFacesContext();
            Application app = facesContext.getApplication();
            ExpressionFactory elFactory = app.getExpressionFactory();
            ELContext elContext = facesContext.getELContext();
            ValueExpression valueExp =
                elFactory.createValueExpression(elContext, expression,
                                                Object.class);
            return valueExp.getValue(elContext);
        }And my previous approach:
        public ComplianceLibraryAMImpl getDataControl() {
                     DCBindingContainer bc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
                     ApplicationModule am = bc.findDataControl(DATA_CONTROLLER).getApplicationModule();
                     return (ComplianceLibraryAMImpl)am;
        }Why am i not able to find my data control AM from Binding Container????

  • Bounded task flow task-flow-return to unbounded task flow throws 404

    I'm using an unbounded task flow (adfc-config.xml) to call a bounded task flow (task-flow-definition). All navigation in the bounded task flow works well, data is committing. (I am omitting many of the pages from the bounded task flow to keep this post shorter. If I can get this first page to return to the unbounded task flow, I can copy it forward.)
    My problem is when running from the unbounded task flow, I cannot seem to configure the bounded task flow to return to the login page inside the unbounded task flow, which called it, without a 404 error.
    Unbounded task flow:
    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
    <view id="CPPLogin">
    <page id="__1">/CPPLogin.jspx</page>
    </view>
    <task-flow-call id="task-flow-definition">
    <task-flow-reference>
    <document>/WEB-INF/task-flow-definition.xml</document>
    <id>task-flow-definition</id>
    </task-flow-reference>
    </task-flow-call>
    <control-flow-rule id="__46">
    <from-activity-id id="__47">CPPLogin</from-activity-id>
    <control-flow-case id="__48">
    <from-outcome id="__49">success</from-outcome>
    <to-activity-id id="__50">task-flow-definition</to-activity-id>
    </control-flow-case>
    </control-flow-rule>
    <control-flow-rule id="__221">
    <from-activity-id id="__222">task-flow-definition</from-activity-id>
    <control-flow-case id="_223">
    <from-outcome id="__224">logout</from-outcome>
    <to-activity-id id="__225">CPPLogin</to-activity-id>
    </control-flow-case>
    </control-flow-rule>
    <managed-bean id="__23">
    <managed-bean-name id="__21">backing_CPPLogin</managed-bean-name>
    <managed-bean-class id="__22">view.backing.CPPLogin</managed-bean-class>
    <managed-bean-scope id="__25">pageFlow</managed-bean-scope>
    </managed-bean>
    </adfc-config>
    Bounded task flow:
    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
    <task-flow-definition id="task-flow-definition">
    <default-activity>ContactInfo</default-activity>
    <no-save-point/>
    <data-control-scope id="__2">
    <shared/>
    </data-control-scope>
    <managed-bean id="__8">
    <managed-bean-name id="__9">backing_ContactInfo</managed-bean-name>
    <managed-bean-class id="__7">view.backing.ContactInfo</managed-bean-class>
    <managed-bean-scope id="__5">pageFlow</managed-bean-scope>
    </managed-bean>
    <view id="ContactInfo">
    <page id="__6">/ContactInfo.jspx</page>
    </view>
    <task-flow-return id="logout">
    <outcome id="__4">
    <name id="__3">logout</name>
    </outcome>
    </task-flow-return>
    <control-flow-rule id="__41">
    <from-activity-id id="__42">ContactInfo</from-activity-id>
    <control-flow-case id="__43">
    <from-outcome id="__44">logout</from-outcome>
    <to-activity-id id="__45">logout</to-activity-id>
    </control-flow-case>
    </control-flow-rule>
    </task-flow-definition>
    </adfc-config>
    Jdev version is 11.1.1.2. WLS is 10.3
    Currently trying to get it to work on the Integrated WLS before deploying an ear to the console.
    I don't know how to configure security, but here is the piece from my web.xml:
    <filter>
    <filter-name>JpsFilter</filter-name>
    <filter-class>oracle.security.jps.ee.http.JpsFilter</filter-class>
    <init-param>
    <param-name>enable.anonymous</param-name>
    <param-value>true</param-value>
    </init-param>
    </filter>
    Also,, I'm finding these hash entries in both Model.jpr and ViewController.jpr:
    <hash>
    <value n="id" v="BC4J Security"/>
    <value n="isJDK" v="false"/>
    </hash>
    Any help would be greatly appreciated. I'm way behind on this deliverable...

    Is the task-flow-return the ONLY way to pass values from the bounded to the unbounded task flow?
    Or is it possible to use a control-flow-case inside the bounded task flow like this, that refers to the unbounded task flow to navigate from the bounded back to the unbounded task flow?
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
    <task-flow-definition id="task-flow-definition">
    <task-flow-call id="adfc">
    <task-flow-reference>
    <document>/WEB-INF/adfc-config.xml</document>
    <id>adfc</id>
    </task-flow-reference>
    </task-flow-call>
    <control-flow-rule id="__41">
    <from-activity-id id="__42">ContactInfo</from-activity-id>
    <control-flow-case id="__43">
    <from-outcome id="__44">logout</from-outcome>
    <to-activity-id id="__45">adfc</to-activity-id>
    </control-flow-case>
    </control-flow-rule>
    I've tried every conceivable way to navigate from the bounded task flow, to the unbounded task flow, and the only consistent thing I receive is a 404. Is this a security issue?

  • 11g Task flow - Method call with router Issue

    Hi, I am using bounded task flow method call - which is default activity. The outcome of method call will go to a router and that decides which method/page fragment has to be selected. But when ever i try to call the default activity only the default out come of the router (Page fragment) is shown in the jspx. When click on some button which is binded with the default activity - the task flow is not working as i expected. Pls find the code of my task flow below.
    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
    <task-flow-definition id="methodcall2task-flow-definition">
    <default-activity>initiatetaskflow</default-activity>
    <data-control-scope>
    <shared/>
    </data-control-scope>
    <input-parameter-definition>
    <name>methodname</name>
    <value>#{CompanyBean.methodname}</value>
    </input-parameter-definition>
    <managed-bean>
    <managed-bean-name>CompanyBean</managed-bean-name>
    <managed-bean-class>com.boeing.seds.view.company.CompanyBean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <method-call id="initiatetaskflow">
    <method>#{CompanyBean.test}</method>
    <outcome>
    <fixed-outcome>#{CompanyBean.methodname}</fixed-outcome>
    </outcome>
    </method-call>
    <router id="selectMethod">
    <case>
    <expression>#{CompanyBean.methodname eq 'default'}</expression>
    <outcome>default</outcome>
    </case>
    <case>
    <expression>#{CompanyBean.methodname eq 'addcompany'}</expression>
    <outcome>addcompany</outcome>
    </case>
    <case>
    <expression>#{CompanyBean.methodname eq 'gotoAddress'}</expression>
    <outcome>gotoAddress</outcome>
    </case>
    <case>
    <expression>#{CompanyBean.methodname eq 'gotoDist'}</expression>
    <outcome>gotoDist</outcome>
    </case>
    <default-outcome>gotoAddress</default-outcome>
    </router>
    <view id="default">
    <page>/includes/company/default.jsff</page>
    </view>
    <view id="addnewcompanyFrgmt">
    <page>/includes/company/addnewcompanyFrgmt.jsff</page>
    </view>
    <method-call id="methodCall1">
    <method>#{CompanyBean.addCompany}</method>
    <outcome>
    <to-string/>
    </outcome>
    </method-call>
    <view id="supplierAddressFrgmt">
    <page>/includes/company/supplierAddressFrgmt.jsff</page>
    </view>
    <view id="supplierDistributorFrgmt">
    <page>/includes/company/supplierDistributorFrgmt.jsff</page>
    </view>
    <control-flow-rule>
    <from-activity-id>initiatetaskflow</from-activity-id>
    <control-flow-case>
    <from-outcome>#{CompanyBean.methodname}</from-outcome>
    <to-activity-id>selectMethod</to-activity-id>
    </control-flow-case>
    </control-flow-rule>
    <control-flow-rule>
    <from-activity-id>selectMethod</from-activity-id>
    <control-flow-case>
    <from-outcome>default</from-outcome>
    <to-activity-id>default</to-activity-id>
    </control-flow-case>
    <control-flow-case>
    <from-outcome>addcompany</from-outcome>
    <to-activity-id>methodCall1</to-activity-id>
    </control-flow-case>
    <control-flow-case>
    <from-outcome>gotoAddress</from-outcome>
    <to-activity-id>supplierAddressFrgmt</to-activity-id>
    </control-flow-case>
    <control-flow-case>
    <from-outcome>gotoDist</from-outcome>
    <to-activity-id>supplierDistributorFrgmt</to-activity-id>
    </control-flow-case>
    </control-flow-rule>
    <control-flow-rule>
    <from-activity-id>methodCall1</from-activity-id>
    <control-flow-case>
    <from-outcome>goAddNew</from-outcome>
    <to-activity-id>addnewcompanyFrgmt</to-activity-id>
    </control-flow-case>
    </control-flow-rule>
    <use-page-fragments/>
    </task-flow-definition>
    </adfc-config>
    Kindly let me know what may be the issue and help me to resolve it.
    Thanks!
    Sankari Kannan

    Hi Sankari,
    Since after the initial method call, your control flow has the router as its next stop, the //method-call/method/outcome/fixed-outcome can be set to a literal value(go to router) instead of an EL.
    And let router decide where to go next(by EL).
    Or you can discard your router activity, let the method-call activity decide where to go directly by setting //method-call/method/outcome/to-string to "true". Then the return value of the method decide the next stop.
    Todd

  • Using Task Flow in the template page

    Dear all,
    I am beginer and I work with JDev 11.1.1.3.0
    In my application I've got a template page called 'templateDef1.jspx'. In this page on the top facet I've got two commands link: 'Asort' and 'Reports'.
    I've created a new JSF page called 'main.jspx' which is based on the templateDef1 and in the center facet I dropped an ADF Bounded Task Flow as a Region. This bounded task flow contains two pages ('asort.jsff' and 'report.jsff'). When I run the main.jspx page I can navigate from 'asort' to 'report' page fragment using the button inside the page fragments.
    Now I want to navigate to those page fragments using the commands link from 'templateDef1.jspx'. What should I do ?
    I've tried several things but nothing works.
    Any help will be appreciated.
    Regards,
    Wojtek.
    Edited by: kojot on 2011-01-13 03:55

    Thank you a lot for you replies.
    Amit, I tried your solution but something doesn't work. I think the parameter isn't passing into the task flow.
    In my template page, after I added <af:setActionListener> I got two warnings: Reference "PageFlowScope.Flow" not found.
    The ref Center facet is refreshing properly, but it always displays the assort.jsff, because it is marked as default activity in my task flow.
    Here is the fragment of code of template page:
    <af:commandLink id="clAsort">
                      <af:panelGroupLayout id="pt_pgl2" halign="center"
                                           valign="middle" layout="vertical">
                        <af:image source="/ikony/asortyment.jpg" id="pt_i1"
                                  shortDesc="Asortyment"/>
                        <af:outputLabel value="Asortyment" id="pt_ol1"
                                        inlineStyle="color:Blue;"/>
                      </af:panelGroupLayout>
                      <af:setActionListener from="#{'A'}"
                                            to="#{pageFlowScope.Flow}"/>
                    </af:commandLink>
                    <af:spacer width="30" height="10" id="pt_s1"/>
                    <af:commandLink id="clReport">
                      <af:panelGroupLayout id="pt_pgl3" halign="center"
                                           valign="middle" layout="vertical">
                        <af:image source="/ikony/raporty.jpg" shortDesc="Raporty"
                                  id="pt_i2"/>
                        <af:outputLabel value="Raporty" id="pt_ol2"
                                        inlineStyle="color:Blue;"/>
                      </af:panelGroupLayout>
                      <af:setActionListener from="#{'R'}"
                                            to="#{pageFlowScope.Flow}"/>
                    </af:commandLink>And the code of the whole task flow definition:
    <?xml version="1.0" encoding="windows-1250" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
      <task-flow-definition id="page-frag-task-flow">
        <default-activity id="__1">asort</default-activity>
        <data-control-scope id="__24">
          <shared/>
        </data-control-scope>
        <input-parameter-definition id="__12">
          <name id="__13">Flow</name>
          <value>#{pageFlowScope.Flow}</value>
          <class>java.lang.String</class>
        </input-parameter-definition>
        <view id="asort">
          <page>/fragments/asort.jsff</page>
        </view>
        <view id="raport">
          <page>/fragments/raport.jsff</page>
        </view>
        <router id="router1">
          <case>
            <expression>#{pageFlowScope.Flow == 'A'}</expression>
            <outcome id="__18">asortView</outcome>
          </case>
          <case>
            <expression>#{pageFlowScope.Flow == 'R'}</expression>
            <outcome id="__23">raportView</outcome>
          </case>
          <default-outcome>raportView</default-outcome>
        </router>
        <control-flow-rule id="__2">
          <from-activity-id id="__3">asort</from-activity-id>
          <control-flow-case id="__4">
            <from-outcome id="__6">viewRaport</from-outcome>
            <to-activity-id id="__5">raport</to-activity-id>
          </control-flow-case>
        </control-flow-rule>
        <control-flow-rule id="__7">
          <from-activity-id id="__8">raport</from-activity-id>
          <control-flow-case id="__10">
            <from-outcome id="__11">viewAsort</from-outcome>
            <to-activity-id id="__9">asort</to-activity-id>
          </control-flow-case>
        </control-flow-rule>
        <control-flow-rule id="__14">
          <from-activity-id id="__15">router1</from-activity-id>
          <control-flow-case id="__17">
            <from-outcome id="__19">asortView</from-outcome>
            <to-activity-id id="__16">asort</to-activity-id>
          </control-flow-case>
          <control-flow-case id="__20">
            <from-outcome id="__22">raportView</from-outcome>
            <to-activity-id id="__21">raport</to-activity-id>
          </control-flow-case>
        </control-flow-rule>
        <use-page-fragments/>
      </task-flow-definition>
    </adfc-config>In main.jspx page, after I dropped the task flow as region, I left the parametersMap blank and I set the value to the parameter Flow as #{pageFlowScope.Flow}. Am I doing it right ? I have to missed something becuase it doesn't work.
    I also read ADF Handbook and some blogs to get know how to pass parameters into bounded task flow, but I couldn't solve my problem.
    Regards,
    Wojtek.

  • Can not commit when using region in bounded task flow

    Hi All
    I am using Jdeveloper 11g R2 (11.1.2.3) & Weblogic 10.3.5.0
    I have 2 bounded task flow in my application (A and B)
    Each contain a fragment with few tabs (using af:panelTabbed)
    I have another common functionality in this 2 bounded task flows
    So I create another bounded task flow and add it as a region in tabs in task flows A and B
    But when I am going to the common tab and insert record and commit using task flow commit it is not commit records in database
    Is something wrong ? Any ideas how I can fix it?
    Regards
    Mohsen

    Hi Frank
    I am using below code for commit (from TaskFlowUtils class)
    public void commitTaskFlow() {
    getDataControlFrame().commit();
    public DataControlFrame getDataControlFrame() {
    BindingContext bindingContext = oracle.adf.controller.binding.BindingUtils.getBindingContext();
    String dataControlFrameName = bindingContext.getCurrentDataControlFrame();
    DataControlFrame dataControlFrame = bindingContext.findDataControlFrame(dataControlFrameName);
    return dataControlFrame;
    Your comment was too helpful , I change data control scope to shared and it is working now
    One more related question:
    Is adding bounded task flow into another fragment as region an advised approach?
    Thanks a lot
    Regards
    Mohsen

  • How to commit data at the end of a bounded task flow

    Hi all,
    I am using JDev 11.1.1.0.2.
    I have this situation
    1) A page with a button that goes to a task-flow to insert data (property data-control-scope set to shared and property transaction set to requires-transaction as suggested in http://www.oracle.com/technology/products/jdev/tips/fnimphius/cancelForm/cancelForm_wsp.html?_template=/ocom/print )
    2) At the end of this task-flow a I have a TaskFlowReturn (property End Transaction set to commit)
    When I click the button associated to this TaskFlowReturn, I return to the first page (described in 1) ), but the data I have just inserted are only submitted, but not committed.
    What's the problem?
    Any suggestions?
    Thanks
    Andrea

    Hi,
    if you set the return activity to commit the transaction then this is done. I don't see why rollback should work but commit doesn't
    Frank

  • Task-flow for inserting record in a popup

    Hi all,
    I am using Jdeveloper 11.1.1.0.
    I have a page with a lot of panelTabbed that displays a lot of data of a table.
    I would like to have a button that show a popup and launch a task-flow for inserting data in the table in more steps.
    I have created:
    1) one fragments for every inserting step
    2) a bounded task-flow having an activity (createInsert before the activities (fragments) to insert a new record), with a task flow return (cancel and commit) to save or rollback the data.
    3) obviusly, a button that show the popup for inserting a new record. I have inserted the task-flow defined in 2) as a region in the dialog of my popup.
    When I launch my page:
    1) I see an empty form (instead of seeing the first record)
    2) the data inserting on the popup are not saved
    3) the second time I try to launch the popup, I see nothing, only the OK button of the dialog.
    I know, in the new version of Jdeveloper it is possible to insert a task flow in a popup, but is it possible, in the previous (my) version?
    Thanks
    Andrea

    1) You are seeing an empty form because you are probably calling CreateInsert method of your data control. You should call it only if you are going to create a new record. Also, if this is a new record, you should not show the tabs below. In my case, i am doing like this:
    There are 3 pages, ListPage, CreatePage and Edit Page.
    User first enters to List page (because it is the default activity in taskflow), to list Master records in a table. There are also 2 buttons, Create and Edit. If Create button is clicked, CreateInsert method is invoked and then CreatePage is called. In create page, there are only 1 form of Master's attributes. After user commits, taskflow redirects the page back to ListPage.
    If user selects a row in list page then press Edit button, EditPage is called, but without calling a CreateInsert method. You don't have to invoke any methods if your table in ListPage has a SelectionListener (which is set by default).
    in launch listener, you can run a method like this:
    public void saveState(LaunchEvent launchEvent) {
    DCIteratorBinding ib = ADFUtils.findIterator("YourMasterIterator");
    RequestContext requestContext = RequestContext.getCurrentInstance();
    //we save key.
    String key = ib.getCurrentRow().getKey().toStringFormat(true);
    requestContext.getPageFlowScope().put("yourKey", key);
    and in return listener:
    public void loadState(ReturnEvent returnEvent) {
    RequestContext requestContext = RequestContext.getCurrentInstance();
    if (null == requestContext.getPageFlowScope().get("yourKey"))
    return;
    DCIteratorBinding ib = ADFUtils.findIterator("YourMasterIterator");
    if (null != ib)
    ib.setCurrentRowWithKey((String)requestContext.getPageFlowScope().get("yourKey"));
    You can find ADFUtils.java and JSFUtils.java in Store Front Demo project and some other sample projects.
    2) About the X button... This is the biggest problem of inline-popups. As far as i learned from people in this forum, it is not possible to remove that if you use an inline-popup. And it does not invoke returnListener. But, it does a rollback! I think it is a big problem and i am hoping to find a solution too. Using a popup component instead of inline-popup as dialog can be a workaround.
    user10799119 wrote:
    Hi Deniz,
    thank you for you reply.
    My task flow is sharing data controls with its caller, because main page displays updatable record, while the button launch a task flow in the popup to create a new record of the same table.
    I have understood what you are saying (save the current key when I launch the popup and restore the key when I return from the popup), but:
    1) when I enter in the main (caller) page, I see an empty form, and not the first record of my table. Why?
    2) the returnListener works even if I close the dialog with the "x" (in the up-right angle of the dialog) or only with its buttons?
    3) where can I find the code/links/examples/guides to implement launchListener and the returnListener for my button?
    Thank you
    Andrea
    Edited by: user10799119 on 2-dic-2009 05:26
    Edited by: user10799119 on 2-dic-2009 05:31Edited by: Deniz Gulmez on 02.Ara.2009 09:52
    Edited by: Deniz Gulmez on 02.Ara.2009 09:58

Maybe you are looking for

  • Wierd lines on my display and frequent lock-ups w/ and w/o display problems

    When booting I sometimes get weird lines and blocks on my display (the GRAY Apple screen) and then it hangs, other times the computer will boot and run fine for 20-30 minutes and then the display goes wonkers with blocks and lines and the computer do

  • IPod- persistant crashing and doesn't mount on desktop when connected...

    I bought my iPod about 4 months ago and it crashes all the time - every time i mount it i have to unplug it hold down the menu + middle button do a manual reset and then try again, when i'm updating my iPod it will also sometimes crash. +(Not sure if

  • FBZP forms and postive payfiel, ACH and Wire text files

    Dear experts, Can someone please explain the difference between various forms that we assign in FBZP 1) form for the payment advice in paying comopany code - is this is the form that we will be using to print the check and advice when using the class

  • Dynamic VLAN assignment with WLC and ACS for

    Currently, using our autonomous APs and ACS, our users get separate VLANs per building based on their security level (students or staff). Basically, the student VLAN in one building is different from that of the student VLANs in other buildings on ca

  • Black housing frame glossy finnish wears off

    I think that the paint finnish comes off extremely easily. Idropped it once (on soild not even concrete) and the upper left black corner looks like it has a patch. Even before i dropped it, i noticed 2 corners of the back side had that problem too (p