| Oracle9i Warehouse Builder User's Guide Release 9.2 Part Number B10996-01 |
|
After you create mappings that define the operations for moving data from sources to targets, you can create and define process flows. Process flows interrelate mappings and activities external to Warehouse Builder such as email, FTP commands, and operating system executables.
This chapter contains the following topics:
A process flow describes dependencies between Warehouse Builder mappings and external activities such as email, FTP, and operating system commands.
Each process flow begins with a Start activity and concludes with an End activity for each stream in the flow. You can design a process flow to launch other process flows. Figure 10-1 shows an example of a process flow that launches a mapping MAP1. If the mapping completes successfully, Warehouse Builder sends an email notification EMAIL_SUCCEED and launches another process flow SUBPROC1. If the mapping fails, Warehouse Builder sends an email EMAIL_FAIL and ends the process flow.
When you design a process flow in Warehouse Builder, you use an interface known as the Process Flow Editor. Alternatively, you can create and define process flows using the Warehouse Builder scripting language, OMB Scripting Language. For information on how to create and define process flows in OMB Plus, the scripting interface, see the Oracle9i Warehouse Builder Scripting Reference.
Warehouse Builder process flows comply with the XML Process Definition Language (XPDL) standard set forth by the Workflow Management Coalition (WfMC). When you generate a process flow, Warehouse Builder generates an XML file in the XPDL format. You can plug the generated XML file into any workflow engine that follows the XPDL standard.
Like all modules Warehouse Builder, process flow modules allow you to group objects to be deployed to a common Location. For instructions, see "Creating Process Flow Modules".
From the Warehouse Builder Deployment Manager, you can deploy process flows to Oracle Workflow or any XPDL complaint process flow engine. For information about Oracle Workflow, see the Oracle Workflow Guide. You can also execute and schedule process flows using Oracle Enterprise Manager. For information about Oracle Enterprise Manager, see the Oracle Enterprise Manager Administrator's Guide.
Process flow modules contain process flow packages. The process flow package is the grouping mechanism for process flows you plan to deploy as one unit. At runtime, you can launch one process flow that launches other process flows that exist in the same process flow package. For example, Figure 10-2 depicts a process flow PROC1 that includes process flow SUBPROC1. In order to add SUBPROC1 to PROC1, the process flows must be contained within the same process flow package.
For instructions on how to create a process flow package, see "Creating Process Flow Packages".
To define a process flow, complete the following steps:
Before working with process flows, create a process flow module. The module is the container by which you can validate, generate, and deploy a group of process flows. Process flow modules include process flow packages which include process flows.
To create a process flow module:Warehouse Builder displays the Welcome page for the New Module Wizard.
The New Module Wizard displays the Name page.
Module name: Module names must be unique within a project.
Module status: Specify the status as Development, Quality Assurance, or Production. This status is for descriptive purposes only.
Description: Enter an optional text description.
The New Module Wizard displays the Location page.
You can select a location from the drop down box or leave the location unspecified. If you do not specify a location in the wizard, you must specify a location on the process flow module properties sheet before you can deploy process flows packages in the module.
The New Module Wizard displays the Finish page. Verify the name and location of the new process flow module.
Warehouse Builder stores the definition for the module and inserts its name in the warehouse module navigation tree. You can now create a process flow package.
After you create a module for process flows, you can create the process flow package. The process flow package is the grouping mechanism that determines which process flows you can interrelate. At runtime, you can launch one process flow that launches other process flows that exist in the same process flow package.
To create a process flow package:Warehouse Builder displays the Create Process Flow Package dialog.
You can now create a process flow definition.
After you create a module and package for process flows, you can create the process flow definition.
To create a process flow definition:Warehouse Builder displays the Create Process Flow dialog.
Warehouse Builder launches the Process Flow and displays the Graph View tab with a Start activity and an End activity.
You can now model the process flow with activities and transitions.
Once you create a process flow module and package, use the Process Flow Editor to create, design, and edit process flows. The Process Flow Editor includes a variety of activities that you add and then connect with transitions to design a flow.
Activity represents units of work in a process flow. These unit of work can involve components internal or external to Warehouse Builder.
Transitions indicate the sequence and conditions in which to launch activities.
Figure 10-2 shows the Process Flow Editor with a sample process flow. Activities display as icons on the canvas. In this example, the activities include a start, a mapping activity, 2 email activities, a subprocess, and two end activities. Arrows between the activities represent the transitions.
The Process Flow Editor has of the following components:
In the left corner are Naming Mode, Rename Mode, Read/Write, and Validation Mode.
In the right corner are the percent zoom indicator and the navigation mode. In the above figure, the zoom level is at 140% and the navigation mode is set to Select Mode.
When you select an activity or transition from the canvas, the text you entered for the description appears on the indicator bar. In the figure above, the description reads, "MAP1 loads staging area tables."
To display the Process Flow Editor:
Or, select a process flow and then from the Object menu, select Editor. Or, select a process flow and type Ctrl and the letter O. Or, Right-click a process flow, and select Editor... from the pop-up menu.
Warehouse Builder displays the Process Flow Editor. By default, the Process Flow Editor displays the Graph View in the select mode.
The Process Flow Editor includes a variety of tools to assist you in navigating, selecting, and viewing objects on the canvas. Commands you use frequently when designing process flows include the following:
Select mode: Use Select mode to select objects on the canvas. When you select an activity, the editor displays a blue border around the activity and you can edit, move, or delete the activity. You can edit the activity in the Activity View or you can right click for more options. When you select a transition, the editor changes the arrow from black to blue. You can edit the transition in the Transition View or right click for more options. To activate the Select mode, click on the icon in the toolbar or select Edit and Select mode from the menu.
Create transition: Use the create transition mode to connect activities on the canvas. Create transition is a drawing tool only. To edit or delete a transition, switch to the select mode and select the transition. To activate the create transition mode, click on the icon in the toolbar or select Edit and Create transition from the menu.
For navigating and displaying complex process flows, you may find the following tools useful:
For more information on these and other tools available in the Process Flow Editor, see "Process Flow Editor Menu and Toolbar".
The basic design elements for a process flow include activities and transitions. Activities represent units of work for the process flow. When you design a process flow in Warehouse Builder, you select activities from the Process Flow Editor toolbox and drag them onto the canvas.
For a description of each activity, see "Using Activities in Process Flows"
When you add transformations, mappings, and subprocesses, select the object from the Add Activity dialog.
The Process Flow Editor displays the activity on the canvas and lists the activity on the Activity Panel, which is located at the lower left corner of the Process Flow Editor.
You can rename the activity or accept the default name.
You can add an optional description for the activity. This description appears on the indicator bar at the bottom of the Process Flow Editor when you select the activity in the canvas.
To navigate and modify complex process flows easily, add descriptions for each activity.
The Process Flow Editor displays the parameters for the activity. These properties vary according to the type of activity. Figure 10-5, for example, shows the properties for an FTP activity.
You can pass in external values into a process flow. To dynamically change the values passed to various activities at runtime, execute the process flow with different parameter values.
You can input values to activity parameters based on parameters you defined for the Start activity. This is referred to as binding. To bind an activity, the activity parameter must match the datatype and direction of the input parameter in the Start activity. If you want to pass in a date into the process flow, verify that the date is in the format 'mm-dd-yyyy'.
To pass values to an activity:The Process Flow Editor adds a parameter under the Start activity as shown in
Change the parameter name and datatype as necessary. You cannot alter the direction and binding. The direction is IN, indicating that the parameter is an input parameter only. For value, type the parameter value.
In this step, select an activity other than the start activity you used in the previous steps of these instructions.
The Process Flow Editor displays a list of start activity input parameters matching the datatype and direction of the activity parameter you selected. Figure 10-7 shows PARM_DAY defined in START1 and selected as input for parameter Z2 in the transformation activity NEW_TIME.
Use transitions to indicate the sequence and conditions in which activities occur in the process flow. You can use transitions to execute an activity based on the completion state of the preceding activity.
Table 10-1 lists the types of conditions you can specify for a transition and shows the associated icons on the canvas.
If the activity has only one outgoing activity, you can specify any of the four conditions listed in Table 10-1. When you add multiple outgoing transitions to an activity, ensure that the conditions do not conflict. A conflict occurs when the process flow logic can evaluate to more than one outgoing transition being true. For a single activity, you can specify either an unconditional outgoing transition OR one of each of the following transition conditions: SUCCESS, WARNING, and ERROR. Transition conditions are evaluated in the following order: SUCCESS, WARNING, ERROR, and UNCONDITIONAL.
Figure 10-8 shows a portion of a process flow in which different activities are triggered based on the three possible completion states of MAP1. Since only one of these conditions can be satisfied at a time, there is no conflict. If you attempt to add an unconditional transition or another conditional transition, two transition conditions would be true and the process flow would be invalid.
The Process Flow Editor displays the cursor as a small horizontal arrow, indicating that you can now use the mouse button to connect activities.
The Process Flow Editor displays an arrow between the two activities and adds an entry in the Transition Panel.
From: This property is read-only and indicates the first activity in the connection.
To: This property is read-only and indicates the second activity in the connection.
Condition: You can specify a success, error, or warning condition for a transition. When you select a condition, the Process Flow Editor displays the associated icon inserted into the transition line on the canvas.
Description: You can type an optional description for the transition. When you select the transition on the canvas, the description displays on the indicator bar.
This section begins with a table that summarizes all activities followed by detailed explanations for using each activity. Activities are presented in alphabetical order.
Table 10-2 lists each activity and shows the associated icon in the Process Flow Editor. It also lists the number of incoming and outgoing transitions allowed for each activity.
Use the AND activity to specify the completion of two or more activities before resuming the process flow. The AND activity can have two or more incoming transitions but can have only one unconditional outgoing transition.
To correctly design process flows with an AND activity, you must place a FORK activity upstream of the AND. Also, the number of transitions going into the AND must be less than or equal to the number of outgoing transitions from the upstream FORK. The FORK is the only activity that allows you to assign multiple unconditional transitions and therefore ensure the completion of multiple activities as required by the AND activity.
Figure 10-9 shows the AND and FORK activities in a process flow. In this example, AND_ACTIVITY triggers downstream activities based on the completion of MAP1 and MAP2. The process flow is valid because the FORK activity has 3 outgoing transitions while AND_ACTIVITY has 2 incoming transitions. The process flow would also be valid if the transition and activities associated with MAP3 were deleted.
You can instruct Warehouse Builder to send email notifications after the completion of an activity in a process flow. You may find this useful, for example, for notifying administrators when activities such as mappings end in error or warnings.
Table 10-3 lists the parameters you set for the email activity.
For email addresses, you can enter the email address with or without the display name. For example, the following entries are correct:
jack.emp@oracle.com
Jack Emp<jack.emp@oracle.com>
Jack Emp[jack.emp@oracle.com]
Jack Emp[jack.emp@oracle.com],Jill Emp[jill.emp@oracle.com]
Jack Emp[jack.emp@oracle.com];Jill Emp[jill.emp@oracle.com]
Every path in the process flow must terminate in an End activity.
When you first create a process flow, Warehouse Builder includes a success type End activity by default. Use end types to indicate the type of logic contained in a path. Since a given activity such as a mapping has three possible outcomes, the Process Flow Editor includes three ending types, as shown in Table 10-4. You can use these ending types to design error handling logic for the process flow.
You can design a process flow to include one, two, or all three types of endings. You can use each ending type only once; duplicate ending types are not allowed. Each End activity can have a single or multiple incoming transitions.
In Figure 10-10, END_SUCCESS has three incoming transitions, each dependent upon the successful completion of upstream activities. END_ERROR has one incoming transition from an email activity that runs when any of the upstream mapping activities completes with errors.
By default, every process flow includes an END_SUCCESS. Although you cannot change an end activity to another type, you can add others of different types.
To add end activities to a process flow:The Process Flow Editor displays a dialog for adding end activities, as shown in Figure 10-11.
Warehouse Builder does not allow you to select ending types already present in the process flow.
Warehouse Builder adds the End activity or activities to the canvas.
The external process activity allows you to incorporate into a process flow an activity not defined within Warehouse Builder.
You can specify one or more incoming transitions to launch a external process activity. For outgoing transitions, you can either specify one unconditional transition or one of each of the three conditional transitions.
If you specify conditional outgoing transitions, you can configure the activity to base its status on it return value. For more information on Use Return as Status, see"Configuring Process Flows"
During code generation, Warehouse Builder generates a job control code (TCL script) for external processes that you can deploy as part of the Warehouse Builder workflow.
Table 10-5 lists the parameters you set for the FTP activity.
| Parameter | Description |
|---|---|
|
Command |
The command to execute the external process you defined. Type the path and file name such as |
|
Parameter List |
The list of parameters to be passed to the external process. Type the path and file name such as
The Process Flow Editor interprets the first character you type to be the separator. For example, the Process Flow Editor interprets the following entry as
Use the backslash as the escape character. For example, the Process Flow Editor interprets the following entry as You can also enter the substitution variables listed in Table 10-6. |
|
Success Threshold |
Designates the completion status.Type in the highest return value from the operating system that indicates a successful completion. When the operating system returns a higher value, it indicates that the command failed. The default value is |
|
Script |
You can enter a script here or type in a filename for a script. If you type in a filename, use the ${Task.Input} variable in the paramter list to pass the filename. To type in or paste text, select Value at the bottom of the Activity panel. The Process Flow Editor does not limit you on the amount of text you can enter.
Each carriage return in the script is equivalent to pressing the |
Table 10-6 lists the substitute variables you can enter for the FTP activity.
Use the File Exists activity to verify the existence of a file before executing the next activity. In the Activities panel, type a string value for the path of the file.
The time-out setting for the workflow engine determines how long the File Exist activity waits for a file. If the file does not arrive before the time-out setting expires, the File Exists activity terminates with errors.
Use the FORK activity to launch multiple, concurrent activities after the completion of an activity.
You can assign multiple incoming transitions to a FORK. The FORK is the only activity that allows you to assign multiple unconditional outgoing transitions for parallel execution. For example, in Figure 10-12, the process flow executes the activities named FTP, FDS, and EMAIL in parallel after completing MAP1.
Figure 10-13 shows the same activities without the FORK activity. In this case, only one of the activities runs based on the completion state of MAP1.
The Process Flow Editor does not limit you on the number of outgoing transitions or concurrent activities you can assign from a FORK. When designing for concurrent execution, design the FORK based on limitations imposed by the workflow engine or server you use to run the process flow.
Use the FTP activity to transfer files from one location to another.
You can specify one or more incoming transitions to launch an FTP activity. For outgoing transitions, you can either specify one unconditional transition or one of each of the three conditional transitions.
If you specify conditional outgoing transitions, configure the FTP activity to base its status on it return value. For example, the operating system returns a value of 1 when the FTP command completes successfully. If you set Use Return as Status to true on the configuration properties window, the process flow continues along the success transition. For more information on Use Return as Status, see"Configuring Process Flows"
Table 10-7 lists the parameters you set for the FTP activity.
| Parameter | Description |
|---|---|
|
Command |
The file transfer protocol command such as |
|
Parameter List |
The list of parameters to be passed to the FTP command such as
Use the backslash as the escape character. For example, the Process Flow Editor interprets the following entry as three parameters, You can also enter the substitution variables listed in Table 10-8. |
|
Success Threshold |
Designates the FTP command completion status.Type in the highest return value from the operating system that indicates a successful completion. When the operating system returns a higher value, it indicates that the command failed. The default value is |
|
Script |
You can enter a script here or type in a filename for a script. If you type in a filename, use the ${Task.Input} variable in the paramter list to pass the filename. To type or paste text, select Value at the bottom of the Activity panel. The Process Flow Editor does not limit you on the amount of text you can enter.
Each carriage return in the script is equivalent to pressing the |
Table 10-8 lists the substitute variables you can enter for the FTP activity. The variables related to working and remote locations depend on values you set when you configure the process flow. For more information, see"Configuring Process Flows".
Use the mapping activity to add an existing mapping that you defined and configured in the Mapping Editor.
You can assign multiple incoming transitions to a mapping activity. For outgoing transitions, assign 1 unconditional transition or up to one of each of the unconditional transitions.
When you add a mapping to a process flow, you can view its configuration properties in the Activities panel. The mapping activity in the Process Flow Editor inherits its properties from the mapping in the Mapping Editor. In the Process Flow Editor, you cannot change a property datatype or direction.
You can, however, assign new values that affect the process flow only and do not change the settings for the mapping in the Mapping Editor. For example, if you change the operating mode from set-based to row-based in the Process Flow Editor, the process flow executes in row-based mode. The original mapping retains set-based mode as its operating mode. If want to change the properties for the underlying mapping, see "Configuring Mappings Reference"
If a mapping contains a Mapping Input Parameter operator, specify a value according to its datatype. The Process Flow Editor expects to receive a PL/SQL expression when you add a Mapping Input Parameter operator to a mapping. If the Mapping Input Parameter is a string, enclose the string in double quotes.
If you want to update a process flow with changes you made to a mapping in the Mapping Editor, delete the mapping activity from the process flow and add the mapping activity again.
Use the OR activity to launch an activity based on the completion of one of a multiple number of upstream activities. You can assign multiple incoming transitions and only one unconditional outgoing transition to an OR activity.
An OR activity in a process flow ensures that downstream activities are triggered only once per run of a process flow. For example, in Figure 10-14, the SUBPROC1 launches once any one of the three upstream Mapping activities completes.
The Process Flow Editor allows you to omit the OR activity and assign transitions from each of the three Mapping activities to SUBPROC1 shown in Figure 10-14. However, this logic would launch SUBPROC1 three times within the same run of a process flow. Avoid this by using an OR activity.
By default, each process flow includes one start activity. You can set input parameters for the start activity that become the input parameters for the complete process flow.
To add parameters to a Start activity:
The Process Flow Editor adds a parameter under the Start activity as shown in
Change the parameter name and datatype as necessary. You cannot alter its direction and binding. The direction is IN, indicating that the parameter is an input parameter only. For value, type the parameter value.You can overwrite this value at runtime.
Use a subprocess activity to launch a previously created process flow. From one process flow, you can launch any other process flow that is contained within the same process flow package.
Once you add a subprocess to a process flow, use it in your design similar to any other activity. You can assign multiple incoming transitions. For outgoing transitions, assign either 1 unconditional outgoing transition or up to 3 outgoing conditional transitions.
The END activities within the subprocess apply to the Subprocess only and do not function as a termination point in the process flow.
An important difference between a subprocess and other activities is that you can view the contents of a subprocess, but you cannot edit its contents in the parent process flow. To edit a subprocess, open its underlying process flow from the navigation tree. With the exception of renaming a process flow, the Process Flow Editor propagates changes from child process flows to its parent process flows.
To add subprocess activities to a process flow:
Warehouse Builder displays a dialog to select and add a process flow as a subprocess.
Warehouse Builder displays the process flow as a subprocess activity on the parent process flow.
The Process Flow Editor displays the graph for the subprocess surrounded by a blue border.
When you add transformations from the Warehouse Builder transformation library to a process flow using the Transform activity, the Process Flow Editor displays the parameters for the transformation in the Activity panel.
You can specify one or more incoming transitions to launch a transform activity. For outgoing transitions, you can either specify one unconditional transition or one of each of the three conditional transitions.
If you specify conditional outgoing transitions, you can configure the activity to base its status on its return value. For more information on Use Return as Status, see"Configuring Process Flows".
If you want to update a process flow with changes you made to a transformation, delete the transform activity from the process flow and add the transform activity again.
This section contains reference information on the following design components in the Process Flow Editor:
Use the following menu options for designing a process flow within the Process Flow Editor:
Table 10-9 lists the options available under Process Flow on the menu bar.
Table 10-10 lists the options available under Edit on the menu bar.
Table 10-11 lists the options available under View on the menu bar.
Table 10-12 lists the options available under Window on the menu bar.
Table 10-13 lists the options available under Help on the menu bar.
Table 10-14 lists the buttons on the Process Flow Editor tool bar in order of appearance.
|
|
![]() Copyright © 2001, 2003 Oracle Corporation. All Rights Reserved. |
|