ActiveVOS Designer User’s Guide

Tips for Using Indexed Properties in an Event Definition

Use the following tips while developing and deploying events.

Tip #1. Filtering for Business Event Property Values to Use in an Event Action Process

If you have defined an event with an indexed property mapped to a business alias, you can ensure that all the associated event property value is added to the request message of an event-action process. To propogate the event property values to the event-action process, you must assign the event being matched to a pattern variable.

The following example shows how to use the every keyword in an pattern to cause an event-action process to fire each time an event of a particular type is processed (not just the first one that fires):

every (evt1 = A_Event)

In this example, your pattern will match every time an A_Event event is processed.

In the <trigger> input message, you will see all of the properties found in A_Event:

<evt:trigger>
  ...
  <evt1>
   <eventProperty1Name>eventProperty1Value
     </eventProperty1Name>
   <eventProperty1Name>eventProperty2Value
     </eventProperty2Name>
   <eventProperty1Name>eventProperty3Value
     </eventProperty3Name>
  </evt1>
  ...
</evt:trigger>

Tip #2. Using the Cast Function to Update Event Resources on the Server During Your Testing Phase

This tip applies only to versions of ActiveVOS prior to 6.0.2

As you develop and deploy statements and patterns during your testing phase, you may wish to add an additional indexed property to an event definition. In the current implementation of Esper (V2.1), additional properties added to existing events will not be automatically updated on the server when you redeploy the PDD, until a server restart.

In order to deploy EPL statements using new business properties (without a server restart) you can use the EPL cast function within an EPP pattern or EPS statement. The following example shows how to do this:

“cast([property name]?,[type])”

where the property name is the new business alias, the question mark is required, and the type is the XSD data type.

Note that you do not need to use this function unless you are iteratively testing by adding new properties and deploying them.

See also:

Writing Event Patterns

Creating an Event-Action BPEL Process