Working with Task Flows
Create custom task flows as containers for components such as data controls, portlets, content, and other task flows. You can reuse the same task flow on multiple portal pages.
Permissions: To perform the tasks in this chapter, you need one of the following portal-level permissions:
-
Assets: Create, Edit, and Delete AssetsorCreate AssetsandEdit Assets(standard permissions) -
Task Flows: Create, Edit, and Delete Task FlowsorCreate Task FlowsandEdit Task Flows(advanced permissions)
See About Roles and Permissions for a Portal.
Topics
About Task Flows
Task flows are containers in which you can add components such as data controls, portlets, content, and other task flows. Task flows provide the advantage of being reusable, so that the same task flow can be consumed on multiple portal pages. You can create your own custom task flow, and add components to the task flow.
For example, data retrieved from a web service by a data control can be rendered on a portal page in a custom task flow. You can select how to present the data, appropriate to the specific data control. For example, the data can be shown as a table, graph, form, button, or label. You can enable users to control the data displayed by a data control by including a parameter form along with the data presentation. You can also wire data control parameters to task flow parameters so that the data control retrieves data based on the values specified for the task flow parameters. Users can change the value of the task flow parameters in the page editor to request the corresponding data from the data control.
The basic steps to accomplish this are:
-
Create a data control (see Creating a Web Service Data Control).
-
Create a custom task flow (see Creating a Task Flow).
-
Add the custom task flow component to a page, then add the data control you want to render on the page (see Consuming a Data Control in a Task Flow and Controlling the Data Displayed in a Task Flow Using a Data Control).
Creating a Task Flow
WebCenter Portal provides many built-in task flows, available through the resource catalog in the page editor. You can also create custom task flows as portal assets, which you can add to your portal pages to provide presentations of the data retrieved by web service data controls, along with other components such as portlets, content, and other task flows.
To create a task flow:
- Navigate to one of the following:
-
To create an application-level task flow, go to the Shared Assets page. For more information, see Accessing Shared Assets.
-
To create a portal-level task flow, go to the Assets page for the portal in which you want to create the task flow. For more information, see Accessing Portal Assets.
-
-
In the left pane, under UI Components, click Task Flows.
-
In the toolbar, click Create to open the Create New Task Flow dialog.
-
In the Name field, enter a name for the task flow.
The name is displayed in the resource catalog.
-
(Optional) In the Description field, enter a meaningful description for the task flow.
The description is displayed in the resource catalog.
-
From the Task Flow Style drop-down list, select the task flow style to use for the task flow.
For more information, see Working with Task Flow Styles.
-
Click Create.
The newly created task flow is listed on the Assets or Shared Assets page. The empty check box in the Available column indicates that the task flow is not yet published and hence is not available for users to add to their pages. To publish the task flow, select the check box.
For more information, see Showing and Hiding Assets.
You can now edit the new task flow using the page editor and populate it with different resources, including data controls, that are available from the resource catalog. For more information, see Editing a Task Flow and Consuming a Data Control in a Task Flow.
Editing a Task Flow
When you first create a task flow, it contains only the content specified by the selected task flow style. To add more content to the task flow, you must edit the task flow’s view fragment. You can add a variety of resources to the view fragment from the resource catalog, including data controls. You may also want to edit your task flow to create or modify task flow parameters.
The most common way to edit a task flow is to use the page editor. However, if you prefer, you can edit the source code of the task flow directly. For example, you may want to clean up the page fragment and its page definition when you delete a referenced component, such as a data control, or make adjustments to the task flow’s code. For more information, see Editing the Source Code of an Asset.
To edit a task flow in the page editor:
- Navigate to one of the following, depending on where the task flow was created:
-
To edit an application-level task flow, go to the Shared Assets page. For more information, see Accessing Shared Assets.
-
To edit a portal-level task flow, go to the Assets page for the portal in which the task flow was created. For more information, see Accessing Portal Assets.
-
- In the left pane, under UI Components, click Task Flows.
-
Click the Edit quick link for the task flow that you want to edit (Figure 22-1). Figure: The Edit Quick Link for a Task Flow

Description of the illustration wcpaa_mashup_editlinktf.gif
- In either Design view or Structure view of the page editor, add whatever resources you want to the task flow's view fragment.
-
For information about adding data controls to your task flow to determine what data you want to display, see Consuming a Data Control in a Task Flow.
-
For information about adding other content using the page editor, see Adding Components to a Page and Working in Structure View in the Page Editor.
-
- Click Save to save your changes.
Consuming a Data Control in a Task Flow
When published, a data control is automatically available in the resource catalog and can therefore be added to task flows. You can consume a data control in a task flow and render it in different presentations, such as a table, graph, or form.
If the data control defines parameters, you can also include a parameter form in the task flow so that users can specify a values for a data control parameter and display data based on that value.
Note:
Adding the same data control more than once to the same task flow may produce unexpected results. If you wish to use the same data control multiple times on a page, then the recommended approach is to create separate task flows for each instance.
This section includes the following topics:
Supported Presentations
Data retrieved using a web service data control can be rendered in a task flow in different ways. While editing a task flow, when you click Add against a data control’s objects in the resource catalog, the Add menu displays different drop handlers. The drop handlers enable you to add a data control’s objects as UI elements such as tables, graphs, forms, buttons, or labels. Depending on the type of object and the flavors supported, you can add different UI elements.
-
Table—This option is displayed when you select a data control accessor that returns a collection of objects that can be displayed in the columns of a table. Select this option to display data in a tabular layout.
For more information, see Presenting Data as a Table.
-
Form—This option is displayed when you select a data control accessor that returns a collection of objects that can be displayed in a form. Select this option to display source data in a form.
For more information, see Presenting Data as a Form.
-
Graph—This option is displayed when you select a data control accessor that returns a collection of objects that can be displayed as a graph. This is useful for the purpose of analysis, when you want to generate a report. Select this option to display your data graphically, as a bar, pie, line, or an area chart.
For more information, see Presenting Data as a Graph.
-
Button or Link—The ADF Button, ADF Link, ADF Image Link, and ADF Toolbar Button options are displayed when you select a data control's methods or operations that perform an action. Select any of the button or link options while adding methods or operations such as
Create,Update,Delete,Commit,Rollback,Save, orClose. Different options are available for different data controls depending on the methods exposed by the data source. -
Text or Label—The ADF Output Text, ADF Output Text w/ Label, ADF Output Formatted, ADF Output Formatted w/ Label, ADF Input Text, ADF Input Text w/Label, and ADF Label options are displayed when you select a data control's attributes or methods that return a single object. An attribute can be a scalar parameter of an accessor, a method return, or an object member of a complex parameter. Select a text or label option depending on whether you want to display the value to users or want users to specify a value.
When you add a data control inside a task flow, you can wire data control parameters to task flow parameters so that the data control retrieves data based on a parameter value that you specify. For more information, see Binding a Data Control Parameter to a Task Flow Parameter.
Adding a Data Control to a Task Flow
When you add a data control, its accessors, or its methods to a task flow, you can select different options for visualizing the data.
Depending on the object you select and the presentations it supports, different options are listed in the Add menu. For more information, see Supported Presentations.
To add a data control to a task flow:
Presenting Data as a Table
The Table option is displayed only for data control accessors that return a collection of objects that can be displayed in the columns of a table.
When you add a data control to a task flow as a table, you have two options:
To present data as a table:
Presenting Data as a Form
The Form option is displayed only for data control accessors that return a collection of objects that can be displayed as a form element.
When you add a data control to a task flow as a form, you have two options:
To present data as a form:
Presenting Data as a Graph
The Graph option is displayed only for data control accessors that return a collection of objects that can be displayed as a graph. You can display data as a bar, pie, line, or an area chart.
To present data as a graph:
-
Create a data control (see Creating a Web Service Data Control).
-
Create a custom task flow (see Creating a Task Flow).
-
Add the custom task flow component to a page, then add the data control you want to render on the page (see Consuming a Data Control in a Task Flow and Controlling the Data Displayed in a Task Flow Using a Data Control).2
Repairing a Task Flow with Broken References to a Data Control
If you add a data control to a task flow, editing or deleting the data control at a later date may break the task flow. You can repair the task flow by removing references to the data control from the task flow’s source files.
To repair a task flow with broken references to a data control:
-
Create a data control (see Creating a Web Service Data Control).
-
Create a custom task flow (see Creating a Task Flow).
-
Add the custom task flow component to a page, then add the data control you want to render on the page (see Consuming a Data Control in a Task Flow and Controlling the Data Displayed in a Task Flow Using a Data Control).4
Controlling the Data Displayed in a Task Flow Using a Data Control
Data control parameters are used to restrict the data retrieved by a data control based on the criteria you specify. For more information, see Creating a Web Service Data Control.
If a data control provides parameters, there are several ways you can change the values of those parameters after you have added the data control to a task flow.
This section includes the following subsections:
-
Create a data control (see Creating a Web Service Data Control).
-
Create a custom task flow (see Creating a Task Flow).
-
Add the custom task flow component to a page, then add the data control you want to render on the page (see Consuming a Data Control in a Task Flow and Controlling the Data Displayed in a Task Flow Using a Data Control).5
Adding a Parameter Form to a Data Presentation
If you want end users to be able to change the data displayed in the task flow, you can include the data control’s parameters in a parameter form in the task flow. Users can enter values for the data control parameters in the parameter form and the data displayed in the task flow reflects the values specified.
To add a parameter form to a task flow used to present data on a portal page:
-
Create a data control (see Creating a Web Service Data Control).
-
Create a custom task flow (see Creating a Task Flow).
-
Add the custom task flow component to a page, then add the data control you want to render on the page (see Consuming a Data Control in a Task Flow and Controlling the Data Displayed in a Task Flow Using a Data Control).6
Editing Data Control Parameter Values
If you can edit the task flow where the data control is visualized, you can edit the data control’s parameter values in the Component Properties dialog of the table, form, or graph to control the display of data.
To edit data control parameter values:
-
Create a data control (see Creating a Web Service Data Control).
-
Create a custom task flow (see Creating a Task Flow).
-
Add the custom task flow component to a page, then add the data control you want to render on the page (see Consuming a Data Control in a Task Flow and Controlling the Data Displayed in a Task Flow Using a Data Control).7
Binding a Data Control Parameter to a Task Flow Parameter
You can bind a data control parameter to a task flow parameter so that the data control retrieves data based on the value specified for the task flow parameter.
You can bind a data control parameter to a task flow parameter so that the data control retrieves data based on the value specified for the task flow parameter.
For example, if your task flow contains an employee information data control with a bind parameter to limit the data retrieved to a specified job role only, you can create a corresponding job parameter on the task flow. Users who can edit the task flow can specify a job title for the task flow parameter so that the data control displays the employees with the specified job.
To bind a data control parameter to a task flow parameter:
-
Create a data control (see Creating a Web Service Data Control).
-
Create a custom task flow (see Creating a Task Flow).
-
Add the custom task flow component to a page, then add the data control you want to render on the page (see Consuming a Data Control in a Task Flow and Controlling the Data Displayed in a Task Flow Using a Data Control).8
The data control parameter now uses the value of the task flow parameter to drive the content of the table, form, or graph.
Note:
If you are using a web service data control for which you have not defined a parameter value, you must set an initial value for the task flow parameter. If not, the task flow displays an empty presentation (table, form, or graph). Therefore, in the Data dialog for a web service data control, you must pass an initial value for the task flow parameter as shown in the following example:
{empty pageFlowScope.stock_Quote ? 'ORCL' : pageFlowScope.stock_Quote}
#Adding a Task Flow to a Portal Page
When published (marked as Available), task flows are automatically available in the resource catalog for selection to add to a page in the page editor. For information about creating task flows that can be used on a page to present the data retrieved by data controls, see Creating a Task Flow.
To add a task flow to a portal page:
- Navigate to one of the following:
-
To create an application-level task flow, go to the Shared Assets page. For more information, see Accessing Shared Assets.
-
To create a portal-level task flow, go to the Assets page for the portal in which you want to create the task flow. For more information, see Accessing Portal Assets.
-
-
In the left pane, under UI Components, click Task Flows.
-
In the toolbar, click Create to open the Create New Task Flow dialog.
-
In the Name field, enter a name for the task flow.
The name is displayed in the resource catalog.
-
(Optional) In the Description field, enter a meaningful description for the task flow.
The description is displayed in the resource catalog.
-
From the Task Flow Style drop-down list, select the task flow style to use for the task flow.
For more information, see Working with Task Flow Styles.
-
Click Create.
The newly created task flow is listed on the Assets or Shared Assets page. The empty check box in the Available column indicates that the task flow is not yet published and hence is not available for users to add to their pages. To publish the task flow, select the check box.
For more information, see Showing and Hiding Assets.0
Managing a Task Flow
The following options are available on the Assets and Shared Assets page to enable you to manage task flows.
See Also: Accessing Portal Assets and Accessing Shared Assets
- Navigate to one of the following:
-
To create an application-level task flow, go to the Shared Assets page. For more information, see Accessing Shared Assets.
-
To create a portal-level task flow, go to the Assets page for the portal in which you want to create the task flow. For more information, see Accessing Portal Assets.
-
-
In the left pane, under UI Components, click Task Flows.
-
In the toolbar, click Create to open the Create New Task Flow dialog.
-
In the Name field, enter a name for the task flow.
The name is displayed in the resource catalog.
-
(Optional) In the Description field, enter a meaningful description for the task flow.
The description is displayed in the resource catalog.
-
From the Task Flow Style drop-down list, select the task flow style to use for the task flow.
For more information, see Working with Task Flow Styles.
-
Click Create.
The newly created task flow is listed on the Assets or Shared Assets page. The empty check box in the Available column indicates that the task flow is not yet published and hence is not available for users to add to their pages. To publish the task flow, select the check box.
For more information, see Showing and Hiding Assets.1