BEA Logo BEA WebLogic Process Integrator Release 1.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   WebLogic Process Integrator Doc Home   |   Studio Guide   |   Previous Topic   |   Next Topic   |   Contents   |   Index

Using Actions

 

The following sections introduce and explain how to use WebLogic Process Integrator actions:

 


Working with Actions

An action is a basic unit of work that is performed by WebLogic Process Integrator. Numerous actions are shipped with WebLogic Process Integrator; an action can be as simple as assigning a task to a user or as complicated as sending XML messages or invoking Enterprise JavaBean (EJB) methods. Actions are, in a sense, the primitive building blocks of a workflow in that they define the actual behavior of the workflow.

Actions are organized into the following categories:

You can place actions in a number of places in a workflow. The most common place is in a Task. Actions can also be placed in decisions, starts, events, and dones. The action is executed when the node is activated. You can also place actions within other actions; such actions are executed when the conditions specific to that action are met. The following actions can have sub-actions defined within them.

 


Adding or Updating an Action

You add and update actions in the Task Properties, Decision Properties, Event Properties, and Start Properties dialog boxes. Each dialog box has an area specific to action maintenance.

To add or update an action:

  1. Double-click the Task, Event, Decision, Start, or Done for which you want to add or update an action. The Properties dialog box appears.

    Figure 5-1 Maintaining Actions

  2. In the properties dialog box, select (activate) the appropriate action tab and click Add or Update to display the Add Action or Update Action dialog box.

    Figure 5-2 Add Action Dialog Box

  3. Double-click an action type folder to expand it, select an action, and click OK.

    A dialog box specific to the selected action is displayed.

  4. Complete the fields in the dialog box and click OK.

    For details on completing the information in specific action dialog boxes, see the sections Using Task Actions, Using Workflow Actions, Using Integration Actions, and Using Miscellaneous Actions.

    The action is updated or added to the Activated actions tab in the Properties dialog box.

 


Deleting an Action

To delete an action:

  1. In the workflow diagram, double-click the shape that contains the action you want to delete.

  2. Select the desired action in the Actions section of the Properties dialog box, and click the Delete button. A confirmation dialog box is displayed to prevent accidental deletions.

    Figure 5-3 Delete Action Dialog Box

When an action is deleted, all references to the action are removed. The action is removed from all instances of the workflow, including those currently running.

 


Changing the Sequence of Actions

Actions are displayed in the sequence that they will be executed. To re-sequence actions, select an action from the list in the Properties dialog box and press the up or down arrow to move its position in the list.

Figure 5-4 Up and Down Arrows

 


Using Task Actions

This section defines and describes how to use the following task actions:

Mark Task as Done

Use this action to set the completion date of a specified task to the current time and mark it done. Executing this action performs all actions found in the MarkedDone tab of the Task Properties dialog box.

When a task is marked as done, the task is no longer listed as an Active task in the Worklist application. By marking a task done, the task is prevented from being executed again, unless the task properties allow it. When a task is marked as done, all successor nodes are activated (as defined in the Task Properties dialog box).

Figure 5-5 Mark Task as Done Dialog Box

View or enter information in the Mark Task as Done dialog box.

Unmark Task Done

This action clears the completion date of a specified task and marks the task as not done.

Use this action when a condition arises that causes the task to no longer be in a successfully completed state. A task that is assigned this action becomes Active on the Worklist and can be executed again.

Note that a task that is unmarked done will not have its activated event triggered again. To trigger the activated event, there must be a transition to that task.

Figure 5-6 Unmark Task Done Dialog Box

View or enter information in the Unmark Task Done dialog box.

Set Task Due Date

This action sets the due date for a specified task to an interval (expressed in minutes, hours, days, weeks, or months) from when the action is executed, or based on an expression. Sub-actions can also be specified to be performed when the task becomes overdue.

Figure 5-7 Set Task Due Date Dialog Box

View or enter information in the Set Task Due Date dialog box:

Note: Expressions are modeled on structured query language (SQL). If you know the syntax of the expression you want to use, you can type the expression directly in the field. Alternatively, click the A+B button to display the Expression Builder dialog box. The Expression Builder helps you construct an expression, which is made up of functions, operators, literals, and variables. For more information on constructing expressions, see Using Expressions and Conditions.

Assign Task to User

Use this action to assign a specified task to an individual user or to a user in a role. The user or role can be specified as a constant or taken from a workflow variable at run time. In the case of a user in a role, the system attempts to perform simple workload balancing in its selection of the assignee; the system determines which user defined to the role has the least number of pending tasks, then assigns the task to that user. Assigning a task to a user causes a notification to be sent to the user. The user views the task from the Worklist application.

Figure 5-8 Assign Task to User Dialog Box

View or enter information in the Assign Task to User dialog box.

Note: Expressions are modeled on structured query language (SQL). If you know the syntax of the expression you want to use, you can type the expression directly in the field. Alternatively, click the A+B button to display the Expression Builder dialog box. The Expression Builder helps you construct an expression, which is made up of functions, operators, literals, and variables. For more information on constructing expressions, see Using Expressions and Conditions.

Assign Task to Role

Use this action to assign a task to a role, either directly to a constant role or by taking the value of a workflow expression at run time. It is not always desirable to assign a task to a specific user. When you assign a task to a role, any user that is defined as a member of the role has access to the worklist of the role. When a task is assigned to a role, there is no workflow notification of a new task. Assign a tasks to a role when the task can be performed by anyone who is a member of that role and has a certain skill level.

Figure 5-9 Assign Task to Role Dialog Box

View or enter information in the Assign Task to Role dialog box.

Note: Expressions are modeled on structured query language (SQL). If you know the syntax of the expression you want to use, you can type the expression directly in the field. Alternatively, click the A+B button to display the Expression Builder dialog box. The Expression Builder helps you construct an expression, which is made up of functions, operators, literals, and variables. For more information on constructing expressions, see Using Expressions and Conditions.

Assign Task Using Routing Table

Assign a task to a user or role depending on a set of conditions. A routing table consists of a sequence of one or more routing conditions. A routing condition specifies a potential assignee (user or role) for the task, together with a specification of the conditions under which the assignment should be made. When the action is executed at run time, the system evaluates each condition in sequence until it encounters one that yields a TRUE result. If such a condition is encountered, the task is assigned to the corresponding user or role, and any subsequent conditions are ignored.

Note: If no routing condition is satisfied, a run time exception occurs.

Figure 5-10 Assign Task Using Routing Table Dialog Box

View or enter information in the Assign Task Using Routing Table dialog box.

Clicking Add or Update displays the Define Routing Condition dialog box.

Figure 5-11 Define Routing Condition Dialog Box

The Define Routing Condition dialog box contains the following:

Note: Expressions are modeled on structured query language (SQL). If you know the syntax of the expression you want to use, you can type the expression directly in the field. Alternatively, click the A+B button to display the Expression Builder dialog box. The Expression Builder helps you construct an expression, which is made up of functions, operators, literals, and variables. For more information on constructing expressions, see Using Expressions and Conditions.

Unassign Task

Remove the current task assignment. The task is no longer assigned to the user or role.

Figure 5-12 Unassign Task Dialog Box

View or enter information in the Unassign Task dialog box.

Set Task Comment

Display a free-form text message to the user at run time when the action is executed. The text is typically explanatory or requests the user to perform manual action(s) for which the workflow does not provide further automated support. When the action is executed, the system displays a text message in the comment column of the Worklist application.

Figure 5-13 Set Task Comment Dialog Box

View or enter information in the Set Task Comment dialog box.

Note: Expressions are modeled on structured query language (SQL). If you know the syntax of the expression you want to use, you can type the expression directly in the field. Alternatively, click the A+B button to display the Expression Builder dialog box. The Expression Builder helps you construct an expression, which is made up of functions, operators, literals, and variables. For more information on constructing expressions, see Using Expressions and Conditions.

Set Task Priority

Set a task priority to Low, Medium, or High.

Figure 5-14 Set Task Priority Dialog Box

View or enter information in the Set Task Priority dialog box.

Execute Task

Execute a selected task.

Figure 5-15 Execute Task Dialog Box

View or enter information in the Execute Task dialog box.

 


Using Workflow Actions

This section defines and describes how to use the following workflow actions:

Start Workflow

This action supports sub-workflows; variable values can be transferred from a parent workflow to a child workflow. You trigger a sub-workflow (or child workflow) from a parent workflow. The started workflow can be tracked with a variable reference, and when it completes, you can perform an optional set of sub-actions.

Figure 5-16 Start Workflow Dialog Box

View or enter information in the Start Workflow dialog box.

Note: Expressions are modeled on structured query language (SQL). If you know the syntax of the expression you want to use, you can type the expression directly in the field. Alternatively, click the A+B button to display the Expression Builder dialog box. The Expression Builder helps you construct an expression, which is made up of functions, operators, literals, and variables. For more information on constructing expressions, see Using Expressions and Conditions.

Use the following tabs to select additional information for the action:

Abort Workflow

Abort the current workflow. Abort Workflow permanently stops a workflow that is currently in process. This action enables the system to handle a situation in which there is no reason to continue a given workflow. The WebLogic Process Integrator Workflow Monitoring facility differentiates between a workflow that has aborted upon the execution of this action and a workflow that has completed by reaching a done node. A workflow that is aborted will be deleted from the server.

Figure 5-17 Abort Workflow Dialog Box

View or enter information in the Abort Workflow dialog box.

Set Workflow Comment

Set the comment for a workflow instance. Use this action to specify a valid workflow expression to be displayed to the user at run time when the action is executed. The text is typically informative or requests the user to perform manual action(s) for which the workflow does not provide further automated support.

Figure 5-18 Set Workflow Comment Dialog Box

View or enter information in the Set Workflow Comment dialog box.

Note: Expressions are modeled on structured query language (SQL). If you know the syntax of the expression you want to use, you can type the expression directly in the field. Alternatively, click the A+B button to display the Expression Builder dialog box. The Expression Builder helps you construct an expression, which is made up of functions, operators, literals, and variables. For more information on constructing expressions, see Using Expressions and Conditions.

Set Workflow Variable

This action allows you to assign a value to a workflow variable, which can be an expression evaluated at run time or a literal. This action evaluates the expression or literal and assigns the result to a workflow variable when the action is executed.

In addition, this action allows you to compose an XML document and store the content in an XML type variable. XML type variables can be sent as internal or external XML messages using the action Post XML Event. For more information on this action, refer to Using XML Actions in Understanding WebLogic Process Integrator Events and XML Documents.

Figure 5-19 Set Variable Dialog Box

The Set Workflow Variable dialog box contains the following:

Note: Expressions are modeled on structured query language (SQL). If you know the syntax of the expression you want to use, you can type the expression directly in the field. Alternatively, click the A+B button to display the Expression Builder dialog box. The Expression Builder helps you construct an expression, which is made up of functions, operators, literals, and variables. For more information on constructing expressions, see Using Expressions and Conditions.

  1. By Composing — Set the XML or string type variable to store the XML document by creating an XML structure containing elements and attributes, as follows:

    1. Select either the Element or Attribute radio button, depending on what you are adding to the XML document structure.

    2. In the Name field, enter the name of the element or attribute, and click Add to add it to the XML document.

    3. Use the directional arrows to the right to move the element or attribute forward or backwards, up or down, depending on where you need to position it in the structure. Moving an element or attribute forward will make it a sub-element of the previous main node.

Note: An XML document that is stored in a string variable will first be converted to a string.

 


Using Integration Actions

This section defines and describes how to use the following integration actions:

Post XML Event

For a description of this action and how to use it, see Post XML Event in Understanding WebLogic Process Integrator Events and XML Documents.

Send XML to Client

For a description of this action and h ow to use it, see Send XML to Client in Understanding WebLogic Process Integrator Events and XML Documents.

Call Program

Use this action to call an executable program on the workflow server.

Figure 5-20 Call Program Dialog Box

View or enter information in the Call Program dialog box.

Note: Expressions are built on structured query language (SQL). If you know the syntax of the expression you want to use, you can type the expression directly in the field. Alternatively, click the A+B button to display the Expression Builder dialog box. The Expression Builder helps you construct an expression, which is made up of functions, operators, literals, and variables. For more information on constructing expressions, see Using Expressions and Conditions.

This action is executed asynchronously, meaning that any actions following this action in the action list are executed immediately, without waiting for the called program to complete.

Perform Business Operation

Allows the invocation of an Enterprise JavaBean (EJB) or Java class method on WebLogic Server (WLS), written specifically to perform a certain function. In this manner, customized actions can be created. The results of such an invocation can be assigned to workflow variables. The Perform Business Operation action is linked to a WebLogic Process Integrator function called Business Operations (accessed through the Configuration menu). See Understanding Business Operations in Administering Data within WebLogic Process Integrator, for more information.

Figure 5-21 Perform Business Operation Dialog Box

View or enter information in the Perform Business Operation dialog box.

 


Using Miscellaneous Actions

This section defines and describes how to use the following miscellaneous actions:

No Operation

The No Operation action has no function; it simply acts as a placeholder to remind an analyst to add an action at a later time.

Figure 5-22 No Operation Dialog Box

View or enter information in the No Operation dialog box.

Send E-Mail Message

Send an e-mail message to a user of the WebLogic Process Integrator system or even to an outside party. Internet standard SMTP protocol is used to transmit the message.

Figure 5-23 Send E-mail Message Dialog Box

View or enter information in the Send E-Mail Message dialog box.

Note: Expressions are modeled on structured query language (SQL). If you know the syntax of the expression you want to use, you can type the expression directly in the field. Alternatively, click the A+B button to display the Expression Builder dialog box. The Expression Builder helps you construct an expression, which is made up of functions, operators, literals, and variables. For more information on constructing expressions, see Using Expressions and Conditions.

Click OK to display the Mail Recipient dialog box.

Figure 5-24 Mail Recipient Dialog Box

Note: Expressions are modeled on structured query language (SQL). If you know the syntax of the expression you want to use, you can type the expression directly in the field. Alternatively, click the A+B button to display the Expression Builder dialog box. The Expression Builder helps you construct an expression, which is made up of functions, operators, literals, and variables. For more information on constructing expressions, see Using Expressions and Conditions.

Evaluate Condition

Evaluate a conditional expression at run time and perform alternative sequences of sub-actions depending on the result. If the condition evaluates to True, one sequence of actions is performed, and if it is False, a different sequence of actions is performed instead. For example, a manager may be authorized to make purchases with a total value that is less than a specified amount, requiring higher approval if the amount exceeds this threshold. When a manager starts a purchase requisition workflow, the workflow can use an Evaluate Condition action to check whether this threshold would be exceeded, and to assign the task of approving the requisition either to the authorized person or to the manager.

Figure 5-25 Evaluate Condition Dialog Box

View or enter information in the Evaluate Condition dialog box.

Note: Expressions are modeled on structured query language (SQL). If you know the syntax of the expression you want to use, you can type the expression directly in the field. Alternatively, click the A+B button to display the Expression Builder dialog box. The Expression Builder helps you construct an expression, which is made up of functions, operators, literals, and variables. For more information on constructing expressions, see Using Expressions and Conditions.

Timed Event

Create a timed even that will be triggered at an exact time and date according to a specified execution schedule.

Figure 5-26 Timed Event: Trigger Event Tab

View or enter information in the Trigger Event tab.

Note: Expressions are modeled on structured query language (SQL). If you know the syntax of the expression you want to use, you can type the expression directly in the field. Alternatively, click the A+B button to display the Expression Builder dialog box. The Expression Builder helps you construct an expression, which is made up of functions, operators, literals, and variables. For more information on constructing expressions, see Using Expressions and Conditions.

The Execution Schedule tab of the Timed Event dialog box allows you to specify that the event will be repeated according to a specified unit of time until the task is marked done or the workflow template definition is done.

Figure 5-27 Timed Event: Execution Schedule Tab

View or enter information in the Execution Schedule tab.

View or enter information in the Actions when triggered tab.

Use the Notes tab of the Timed Event dialog box to make notes about the action.

Cancel Workflow Event

This action cancels an event that has been defined within a workflow.

Figure 5-30 Cancel Workflow Event Dialog Box

View or enter information in the Cancel Workflow Event dialog box.

Make Audit Entry

This action allows you to specify an additional audit entry expression. This audit entry will be published to a Java Message Service (JMS) topic for further retrieval. The audit entry can be an expression built with functions and workflow variables, but it can also be a string of text.

Note: The JMS topic is specified in the Template Definition Properties dialog box. For further information, refer to Creating a New Workflow Template Definition in Defining and Maintaining Workflows.

WebLogic Process Integrator provides a default audit facility whereby all major user interactions and changes are published to the JMS topic. The Make Audit Entry action allows you to add an additional specific audit entry; such an audit entry might be used, for example, to track the value of a variable.

Figure 5-31 Make Audit Entry Dialog Box

The Make Audit Entry dialog box contains the following:

Note: Expressions are modeled on structured query language (SQL). If you know the syntax of the expression you want to use, you can type the expression directly in the field. Alternatively, click the A+B button to display the Expression Builder dialog box. The Expression Builder helps you construct an expression, which is made up of functions, operators, literals, and variables. For more information on constructing expressions, see Using Expressions and Conditions.