Skip to main content
This revision made January 07, 2014 07:52, by steven.davelaar
« earlier revision revert to this « later revision

ADF Samples - ADF Task Flows

Main Table of Contents


ABA275 Understanding ADF Task Flow Page Flow Scope Lifetime {] 07-SEP-2013
ABA2681 ADF 12c New Feature - Unauthorized Task Flow1 {] 24-JUL-2013
ABA268 ADF 12c New Feature - Unauthorized Task Flow {] 24-JUL-2013
DVA008 Designing Modular Applications By Using Dynamic Task FlowCall in Oracle ADF {] 23-AUG-2012
ABA181 LOV Implementation with ADF BC Service-Enabled Entity Objects {] 27-JUL-2012
DSI012 Dynamic Control Flow Case using ActionEvent {] 24-MAY-2012
Here is a scenario where we need to navigate from one page to another page based on some condition. In design time set the 'Action' property of UI component can be used to navigate between pages, but here Action property can't be used since navigation is based on condition. In this article will see how can we programmatically handle the control flow case in managed bean using ActionEvent.
ABA124 Programmatic ADF Task Flow Router {11.1.1.x] 15-SEP-2011
JPU077 Forcing Task Flow instances with Shared Data Control to use different view object instances {11.1.2] 14-SEP-2011
ABA118 ADF Dialog Framework and ADF Task Flow Re-Initialization {11.1.1.x] 04-AUG-2011
JPU069 Creating Task Flow bindings on the fly {11.1.2] 08-JUN-2011
ABA103 Programmatically Accessing ADF Task Flow List {11.1.1.x] 06-APR-2011
ABA101 Exception Handler for Method Calls inside ADF Task Flows with Pages {11.1.1.x] 19-MAR-2011
ABA100 Exception Handler for Method Calls inside ADF Task Flows with Fragments {11.1.1.x] 13-MAR-2011
ABA098 Beware of Hackers - Keep ADF Task Flows inside WEB-INF {11.1.1.x] 24-FEB-2011
EBI011 Get the PageFlowScope of a Region Bounded Task Flow {] 20-JAN-2011
ABA086 Navigation Between ADF Task Flow Template and Consuming ADF Task Flow {11.1.1.x] 25-NOV-2010
ACC043 Integrate remote task flows in your ADF applications (POJO DC Example) {11.1.1.x] 13-JUL-2010
ACC033 How-to open a Bounded Task Flow in a new Browser Tab {11.1.1.x] 25-FEB-2010
ACC052 How-to deploy bounded task flows in an ADF library {11.1.1.x] 16-FEB-2010
ABA029 Integration in Oracle ADF with ADF Task Flows and ADF BC Imports {11.1.1.x] 24-NOV-2009
ACC039 How-to declaratively launch a bounded task flow in a lightweight popup {11.1.1.x] 17-NOV-2009
SMU148 Initialize Task Flow by Setting View Object Bind Vars from Parameters {] 03-SEP-2009 SCOTT schema
This example illustrates how to to use an ExecuteWithParams built-in operation dropped onto a task flow method call activity that is marked as the default activity to initialize the task flow by setting some view object bind variable values based on task flow parameters passed in from the caller. The TestTaskFlow.jspx page has two buttons that are configured to invoke the bounded task flow named show-employees-for-dept, passing in the value of the department number whose employees should be visualized. The task flow defines a parameter named p_deptno whose value is stored into the pageFlowScope attribute named p_deptno using the EL expression #{pageFlowScope.p_deptno}. The ExecuteWithParams operation for the EmployeesByDepartment view object instance (of type EmpView) was dropped onto a method call activity that has been set as the task flow's default activity. The EmployeesByDepartment view object instance has been configured in the application module data model panel to declaratively apply the view criteria named ByDepartment, so when you drop the ExecuteWithParams operation for this view object instance, the list of appropriate bind variables appears in the dialog. The varDeptno bind variable's EL expression is configured on the ExecuteWithParams binding in the page definition to the expression #{pageFlowScope.p_deptno} to pickup the value to assign the bind variable from the task flow parameter passed in. If you right-click on the method call activity and choose "Go to Page Definition" notice that the EmployeesByDepartmentIterator iterator binding's Refresh property is configured to the value never to avoid the ADF framework's performing any implicit refreshing of the iterator binding before the action binding has a chance to set the view object bind variables.
ABA007 Integration in Oracle ADF Through ADF Libraries and ADF Task Flows {11.1.1.x] 25-JUL-2009
LJE007 Create, Deploy and Consume an ADF Task Flow with ADF Business Components inside {11.1.1.x] 06-JUL-2009
SDA001 Abandoning a Bounded Taskflow with Stand-Alone Pages {11.1.1.x] 02-APR-2009
ABA002 How To Call Remote Task Flow in JDeveloper 11g {11.1.1.x] 27-JUN-2008
EBI002 Exception page with ADF Taskflow {11.1.1.x] 10-APR-2008

Managed Beans and Backing Beans

DSI017 Get JPA Entity Attributes programmatically in managed bean {] 25-JUN-2012
DVA004 How to Align Managed Bean Scope and Bean Data Control in Oracle ADF {11.1.2] 28-MAY-2012
CMU001 ADF Faces - a logic bomb in the order of bean instantiations {] 09-NOV-2011
ABA123 Another Way to Invoke Managed Bean Method {11.1.1.x] 08-SEP-2011
ABA083 How To Access Page Element Value from Backing Bean {11.1.1.x] 03-NOV-2010
JPU006 Decorate JSF managed bean with custom Annotations {] 28-SEP-2009
SMU152 Best Practice Approach for Invoking AM, VO, or VO Row Methods from a Backing Bean {] 18-SEP-2009 SCOTT schema
This example illustrates several interesting points about how the view-controller layer can use ADF action bindings to invoke custom methods exposed on the client interface of application modules, view objects, and view rows. Run the ViewController project to start the demo. Enter a string value and an integer value on the StartPage and click the button to start the emp-task-flow task flow, passing in values for the task flows two parameters stringTaskFlowParam and intTaskFlowParam. In the TestPage.jspx that runs when emp-task-flow starts, the parameter values passed in appear in the title bar of the box at the top. Nine buttons in this page illustrate different combinations of invoking application module, view object, and view row methods using action bindings in the page's pageDefinition. For the methods that accept arguments, the nested elements inside the action binding (which you can see in the structure window) reflect the names of the method arguments and provide a declarative EL expression that ADF will evaluate when the action binding is executed to supply the method arguments. Three of the nine buttons are bound to action event handler methods in the TestPage backing bean. This backing bean illustrates the best-practice technique to invoke methods on the AM, VO, or VO Row client interface, optionally providing some or all of the method arguments in code as well. In particular, it illustrates that you should NOT use the Configurat­ion.createR­ootApplicat­ionModule() API to access an application module in your backing bean. See this blog article for more info on why you should not use it in backing beans. For a bit more information on how the StartPage captures and passes parameters to the task flow, read on. The initial StartPage.jspx uses page definition variables named pageDefStringVariable and pageDefIntVariable to declaratively provide temporary storage for the string- and int-valued parameters in the parameter form. These variables were added to the pageDefinition using the Structure window by selecting the variables node inside the executables section, and choosing { Insert inside variables > variable } from the right-mouse menu. Also in the structure window for the page definition of the Start page, we created two attribute bindings to expose the values of the pageDefinition variables to the UI. One way to create these bindings is to select the bindings folder in the Structure window and choosing { Insert inside bindings > Generic Bindings > attributeValues }. The other way is to use the "Bindings" overview editor tab for the StartPage and click the Create Control Binding icon (green plus-sign) in the Bindings box on the left. When creating the bindings, choose the iterator binding named variables and pick the pageDef variable name whose value you want to bind to as the attribute name. The af:inputText fields in the StartPage bind to this attribute bindings using the EL expressions #{bindings.­pageDefStri­ngVariable1­.inputValue} and #{bindings­.pageDefInt­Variable1.­inputValue}. The button on the StartPage contains two nested af:setActionListener components to assign the values of the pageDefinition variables collected from the user into two request-scope attributes. The value of #{bindings.­pageDefStri­ngVariable1­.inputValue} is assigned to #{requestScope.pageDefStringVariable}, and similarly the value of #{bindings­.pageDefInt­Variable1.­inputValue} is assigned to #{requestScope.pageDefIntVariable}. The task flow call activity named emp-task-flow in the adfc-config.xml unbounded task flow is configured to assign the values of the task flow parameters from these request-scope attributes. The stringTaskFlowParam task flow parameter gets its value from the #{requestScope.pageDefStringVariable}, while the intTaskFlow param gets its value from the #{requestScope.pageDefIntVariable}. As part of its parameter definitions, the emp-task-flow itself defines pageFlowScope attributes that will hold the values of the task flow input parameters for the duration of the task flow. The stringTaskFlowParam parameter value is stored in the attribute #{pageFlowScope.stringTaskFlowParam} while the intTaskFlowParam is stored in the attribute #{pageFlowScope.intTaskFlowParam}. Any pages or backing beans that execute in the context of this task flow can reference the parameter values using these same EL expressions. As noted above, the action bindings in the page definition are configured to reference these pageFlowScope attributes using EL to declaratively pass their values as method arguments to the invoked method.

Region and Task Flow Communication

THA024 Navigation after Return from Bounded Task Flow {] 18-JUN-2013
Sample shows how to navigation after return from bounded task flow based on pages
ABA235 Reusable ADF Region with Dialog Framework {] 13-MAR-2013
JPU084 Conditionally Resetting Task Flow Displayed In a Popup {] 13-APR-2012
ACC094 ADF Region Return Value Strategy {11.1.1.x] 12-JAN-2012
JPU073 What you may need to know about the conditional activation of the task flow embedded in an <af:popup> ? {11.1.2] 07-JUL-2011
LBO020 What is the Currently Active Taskflow in a Dynamic Region? {11.1.1.x] 31-MAY-2011
ABA096 ADF Region Communication - Region Refresh Through Contextual Event {11.1.1.x] 13-FEB-2011
CMU002 Master-child BTF chaperone – a contextual event alternative {] 01-SEP-2010
JPU034 Refresh the parent view when a taskflow displayed in a popup returns {] 12-AUG-2010
EBI009 ADF Task Flow Region interaction with Parent Action activity {11.1.1.x] 26-JUL-2010
ABA060 JDeveloper 11g PS2: ADF Region Reuse Inside ADF Region {] 13-MAY-2010
ABA056 Communicating Between ADF Regions Without Contextual Events Framework {11.1.1.x] 25-APR-2010
EBI008 ADF Task Flow interaction with WebCenter Composer {11.1.1.x] 08-APR-2010
ABA050 Passing Parameters from ADF Task Flow with Fragments into ADF Bounded Task Flow {11.1.1.x] 19-MAR-2010
ABA047 Integration in Oracle ADF with ADF Task Flows and Dynamic Regions Navigation {11.1.1.x] 09-MAR-2010
ABA044 Integration in Oracle ADF with ADF Task Flows and Dynamic Regions {11.1.1.x] 24-FEB-2010
ABA039 Conditional Activation for ADF Regions and Application Availability {11.1.1.x] 25-JAN-2010
LJE006 Introduction to ADF reusable task flows – consume a bounded task flow that gets synchronized with input parameter changes {11.1.1.x] 04-JUL-2009
EBI006 Mainpage and Task Flow region interaction {11.1.1.x] 29-MAR-2009
LJE001 How events in one region cause other regions to refresh {11.1.1.x] 28-AUG-2008
ACC053 Refresh a bounded task flow displayed as an ADF Region in a popup {11.1.1.x] 29-MAY-2008

Task Flow Templates


ABA140 ADF Train - Apply Custom Train Stop Icons {11.1.1.x] 28-DEC-2011
ACC093 Put a different Look to your Train Stops {11.1.1.x] 13-DEC-2011
EFE002 Dynamic ADF Train. Adding train stops programmatically {] 22-MAY-2011
Adding train stops to ADF train programmatically "on-the-fly"
ACC082 How-to programmatically navigate ADF train models {11.1.1.x] 10-MAY-2011
ACC097 How-to defer train-stop navigation e.g. for custom form validation {11.1.1.x] 21-FEB-2011
JPU021 CRUD operations on a tree table {] 11-MAY-2010
JPU019 Custom <af:train> model {] 07-APR-2010

See also ADF Code Corner article 80. HashMap strategy for dynamically setting the sequential property in ADF Controller train models


ABA269 ADF Task Flow Transaction Management and ADF Libraries {] 14-AUG-2013
CMU011 Task Flow Transaction Fundamentals - Completely Separate Transactions {] 07-OCT-2012
Demonstrates the options needed between two bounded task flows to ensure they have completely separate transactions. This demonstration application comes from the Oracle ADF Architecture Square whitepaper entitled Task Flow Transaction Fundamentals
CMU010 Task Flow Transaction Fundamentals - No Controller Transactions {] 07-OCT-2012
Demonstrates the effect of using the 'No Controller Transaction' option between two bounded task flows. This demonstration application comes from the Oracle ADF Architecture Square whitepaper entitled Task Flow Transaction Fundamentals
CMU009 Task Flow Transaction Fundamentals - Guarantee Joined Transactions {] 07-OCT-2012
Demonstrates the options needed between two bounded task flows to they share a transaction. This demonstration application comes from the Oracle ADF Architecture Square whitepaper entitled Task Flow Transaction Fundamentals
THA007 JDeveloper & ADF: Carefully Select the Data Control Scope of Bounded Task Flows {] 27-JUL-2012
The goal of this sample is to show the misbehavior of the IDE when a user accidentally changes the data-control-scope of a bounded task flow and then changes it back.
DSI013 Commit the child taskflow transaction in parent taskflow transaction using DataControlFrame Api {] 28-MAY-2012
In this post I'm sharing sample for how can we use "DataContolFrame" to commit the child taskflow transaction in parent taskflow transaction.
CMU008 Page based Prematurely Terminating Task Flow scenario {] 27-MAY-2012
CMU007 ADF Prematurely Terminated Task Flows {] 20-APR-2012
JPU082 Programmatically Starting Transaction in a Task Flow {] 22-FEB-2012
SMU165 Using a Headless Taskflow to Perform Work in an Autononmous Transaction {] 24-NOV-2011
This example illustrates a technique to use a "headless" taskflow -- that is, one without any view activities -- like a subroutine call. The perform-isolated-work bounded task flow in the example has its Data Control Scope set to "isolated" so that the work it performs is done in a separate transaction. Run the Main.jspx page to try the demo. The example-dept-region bounded task flow includes a button on its ExampleDept.jsff page that navigates to a task flow call activity in the taskflow to perform the work done by the isolated "subroutine" call. The perform-isolated-work includes a method call activity that invokes the performAppModuleLevelWork() client interface method in the AppModule application module. This method accepts an integer representing the department number to modify, and a String representing the value that department's Loc attribute should be updated to, then it commits the changes. The taskflow accepts parameters which it passes into this method call. The af:commandButton includes two nested af:setPropertyListener components to assign values to the requestScope.deptno and requestScope.locValue attributes which are referenced by the task flow call to pass these values into the task flow. The page is configured to pass the current row's Deptno value, and to pass the literal value 'Q' as the value to assign to the Loc attribute in the current row. The net effect is that clicking the button will update the current department row to have the value 'Q' as its LOC column value (in a separate transaction. The checkbox in the page controls whether or not the Router activity will declaratively refresh the DeptView1Iterator iterator in the page, or not, upon returning from the task flow method call. If you leave the box unchecked, you can observe the effect of the update committed by a separate transaction by attempting to update the current row in the UI after having clicked the button. You'll see an error that "Another user has change the row with primary key ...". If you perform the refresh, you'll see that the requery causes the LOC value updated in the separate transaction to be reflected in the web page. The custom PagePhaseListener CalledTaskf­lowErrorRep­orterPagePh­aseListener, which is configured in the adf-settings.xml file, ensures that any exception thrown in the nested taskflow gets reported to the binding container of the page that is marked as an exception handler activity. To see this exception reporting in action, use SQLPlus to lock the row in the DEPT table corresponding to the current row in the web page. Then, when clicking on the button to perform the work in the isolated transaction, you'll see a "Row Already Locked" exception in the UI.
JPU039 Undoing changes using Middle Tier Savepoints {] 08-SEP-2010
ACC006 How to cancel an edit form, undoing changes in Java {11.1.1.x] 23-DEC-2008
SMU140 Implementing OK or Cancel with Task Flow Transaction & Savepoint Support {] 20-DEC-2008
This example illustates three bounded task flows that use different declarative transaction options. The manage-employees task flow has its transaction property set to new-transction to indicate that it should only be used as a top-level task when no other current transaction is in effect. The modify-employee task flow has its transaction property set to requires-existing-transaction to indicate that it only makes sense to be called as part of an existing transaction (but cannot be called on its own), since it requires parameters to work correctly. The create-department task flow has its transaction property set to requires-transaction which allows it to be used either as a top-level transactional flow, or else as a part of another task flow with a transaction already in effect. To run the example, run the ViewController project. The home page has links that start either the create-department task flow, or the manage-employees task flow. As part of the task of managing employees, creating or editing an employee calls the modify-employee task flow. While modifying an employee, if you need to create a new department, the create-department task flow is called. The 'Cancel' return actions of the modify-employee and create-department are configured to have the restore-save-point property set to true so that, if they are not the task flow that is controlling the transaction, then they will use savepoints to allow canceling any pending work performed in that flow without rolling back the entire transaction. Experiment with performing some changes and doing different combinations of (OK) and (Cancel) buttons to see the effect of the nested transaction support. Before deciding to save or cancel all changes you have made to employees, you can see the modified rows' data in italics in the table, with the modified attributes in bold/italic. This display is facilitated by the use of custom row-specific attribute hints named rowState and valueChanged that are enabled due to the use of the CustomViewRowImpl framework extension class in the FrameworkExtensions project. The CustomViewObject in that project works around a couple of issues in the 11.1.1 release related to the quick query component (forcing the view criteria item operator to be "Starts With" instead of "Like", and working around bug# 7660871 which causes the quick query criteria to not be applied correctly in some situations). The CustomEntityImpl in the project implements a generic solution for declarative control over the posting order of associated (but not composed) entities by allowing an entity to specify a custom PostAfterAccessors property whose value is a comma-separated list of association accessors which should be checked for a new referenced row that should be posted before the current entity. The Emp entity in the example is configured with that property in order to cause a new, referenced Dept entity instance to post first.
Difference compared to previous revision
<span>(No Modifications)<span>
Please Confirm