ActiveVOS Designer User’s Guide
The onAlarm element defines a timeout event, using either the duration (for) or deadline (until) attribute. The duration attribute specifies the amount of time after which the event will be signaled. The clock for the duration starts when the associated scope starts. The alternative deadline attribute sets the specific point in time when the alarm will be fired. Optionally a repeat every attribute can be set to fire an alarm repeatedly each time the interval period expires. The repeat every attribute can be used alone or with an deadline or duration attribute.
For example, you might set an alarm to go off in five minutes and then repeat the alarm every 30 seconds.
An alarm time can be set for the process using the data provided within the message that creates a process instance, as shown in the following example.
In the WSDL file, a complex message is defined with a part specifying processDuration.
<wsdl:definitions
targetNamespace="http://www.example.com/wsdl/exmple"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
...>
<wsdl:message name="orderDetails">
<part name="processDuration"
type="xsd:duration"/>
</wsdl:message>
</wsdl:definitions>
The message type above is used in the onAlarm value in the BPEL process:
<process name="orderCar"
xmlns:def="http://www.example.com/wsdl/example" ...>
...
<eventHandlers>
<onAlarm
<for>$orderDetails.processDuration</for>
</onAlarm>
</eventHandlers>
...
<variable name=”orderDetails”
messageType=”def:orderDetails”/>
</variable>
...
<receive name=”getOrder”
partnerLink=”buyer”
portType=”car”
operation=”order”
variable=”orderDetails”
createInstance=”yes”/>
...
</process>
In the above example, the onAlarm element specifies a timer event that is fired when the duration specified in the processDuration field in the orderDetails variable is exceeded. The value of the field is provided via the getOrder activity that receives a message containing the order details and causes the creation of a process instance for that order.
|
Required Properties |
Optional Properties |
|---|---|
|
Alarm Expression |
Repeat Every (may be used with Alarm Type) |
|
Alarm Type or Repeat Every |
Documentation. See Adding Documentation to a Process |
|
Comment. See Adding Comments to a Process |
|
|
Setting Visual Properties and Using Your Own Library of Images |
|
|
Execution State. See Viewing the Execution State of an Activity or Link |
|
|
Extension Attributes and Elements. See Declaring Extension Elements and Attributes. |
To add an onAlarm event handler for the process:
An onAlarm handler is added and is selected.
The following illustration shows an example of an onAlarm event handler added for the process.

To add an onAlarm event handler for a scope:
An event handler container is added to the scope.
The following illustration shows an example of an onAlarm and an onEvent event handler added for a scope. The activity responding to each event is a reply.

|
1 |
onEvent event handler |
|
2 |
onAlarm event handler |
Copyright (c) 2004-2008 Active Endpoints, Inc.