BEA Logo BEA WebLogic Process Integrator Release 2.0

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   WebLogic Process Integrator Documentation   |   Using Studio   |   Previous Topic   |   Next Topic   |   Contents   |   Index

Understanding Event-Driven Processing

 

The following sections explain event-driven processing, and how to trigger events:

 


What Is an Event?

An event is an asynchronous notification from another workflow or from an external source, such as another application. An event notification takes the form of an XML message. You can define an event to start a workflow, to initialize variables, to activate a node in the workflow, or to execute an action.

To start a workflow using an event, you define an event-type Start node that waits until it receives the appropriate trigger before starting the workflow. Similarly, to initialize variables, to activate a node in the workflow, or to execute an action using the appropriate trigger, you define an Event node. For details, see Defining a Start Node Using an Event Trigger and Defining Events.

The event that starts a workflow or triggers an Event node is the receipt of an XML message. The actual trigger is either the document type declaration (DOCTYPE) specified in the prolog of the XML message, or it is the root element of the XML message.

You specify the DOCTYPE or root element with which you want to start the workflow using the Start Properties dialog box. Similarly, you use the Event Properties dialog box to specify the DOCTYPE or root element that triggers an Event node.

BEA WebLogic Process Integrator does not start the workflow or trigger an Event node unless the DOCTYPE or root element in the Start or Event Properties dialog box matches that in the incoming XML message.

In addition to using the DOCTYPE or root element, you can further qualify the start of a workflow or the triggering of an Event node by using an event key and an event condition.

 


What Is an Event Key?

An event key is a value that must match an element in the incoming XML document before BEA WebLogic Process Integrator starts the workflow or triggers an Event node. The key value can be any element immediately under the root element of the incoming XML message. You specify the key value in the Start or Event properties dialog box.

If you specify an event key, BEA WebLogic Process Integrator checks that the key value you specified in the properties dialog box matches an element in the incoming XML message before it starts a workflow or triggers an Event node.

Using an event key can improve the performance of your workflows. By specifying a key value using the properties dialog box for a Start or Event node, you are, in effect, uniquely identifying that node. When BEA WebLogic Process Integrator receives an XML message, it can quickly locate the appropriate Start or Event node by matching the key value in the incoming XML message to the key value you specified for the Start or Event node.

 


What Is an Event Condition?

To even further qualify the start of a workflow or the triggering of an Event node, you can specify a condition that must be evaluated. A condition may be an expression, such as Amount > 1000. You specify an event condition in the Start or Event Properties dialog box.

If you specify a condition, BEA WebLogic Process Integrator evaluates the condition when it receives an XML message. If the condition is true, BEA WebLogic Process Integrator starts the workflow or triggers an Event node.

 


Defining an Event Key

To use an event key, you need to do the following:

To specify an event key:

  1. From the BEA WebLogic Process Integrator Configuration menu, select Events to display the Event Key Expressions dialog box.

  2. Click Add to display the Define Event Key Expression dialog box.

    Figure A-1 Define Event Key Expression Dialog Box


     

  3. In the Content Type field, select text/xml for an XML message.

  4. In the Event Descriptor field, enter the DOCTYPE or root element you specified in the Start or Event Properties dialog box.

  5. In the Expression field, enter the expression that locates the key value in the incoming XML message.

    Note: Expressions are built using WebLogic Process Integrator expression syntax and typically use the syntax of XPath function to extract values out of XML documents. 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.

  6. Click OK. The event key is stored in an event key table maintained by BEA WebLogic Process Integrator, and is displayed in the Event Key Expressions dialog box.

  7. Click Close.

 

back to top previous page next page