ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pellegrini, Mike (PLC, IT)" <Mike.Pellegr...@thehartford.com>
Subject RE: Dynamic onAlarm value Is it possible ?
Date Tue, 07 Oct 2008 18:19:31 GMT
Hi Mateusz,

This behavior is spec defined so will work in spec compliant
implementations and therefore should work in Ode.

Section 12.7.3 on the WS-BPEL 2.0 spec states the following:

The event handlers associated with a scope are enabled when the parent
scope starts. If the event handler is enclosed by the <process> scope,
the event handler is enabled as soon as the process instance is created.
This allows the alarm time for a global alarm event to be specified
using the data provided within the message that creates a process
instance, as shown in the following example (see the example in the
spec).

Try it out in Ode and see if what results you get.

-Mike

-----Original Message-----
From: Nowakowski, Mateusz [mailto:Mateusz.Nowakowski@sabre-holdings.com]

Sent: Tuesday, October 07, 2008 12:09 PM
To: user@ode.apache.org
Subject: Dynamic onAlarm value Is it possible ?

Hi all,

I have one design problem. From syntactical point of view it should
work, but I don't know if it is possible in ODE.

BPEL has onAlarm functionality. It can be placed inside global event
handler field like this:
	<bpel:eventHandlers>
		<bpel:onAlarm>
			<bpel:for>"PT1M50S"</bpel:for>
			<bpel:scope>
				<bpel:throw
faultName="tns:TimeoutFault"/>
			</bpel:scope>
		</bpel:onAlarm>
	</bpel:eventHandlers>

But if it is in global place, there can be only static value. 

My situation is that the client can send this value in payload and I
would like to use this value as onAlarm value. In other words I want
dynamic onAlarm value.

My solution is: 
- Declare global variable: 
<bpel:variable name="onAlarmValue" type="xs:string"/>
- Main sequence will receive message, assign value to onAlarmValue
variable
- create new scope with eventHandlers defined like this:
	<bpel:eventHandlers>
		<bpel:onAlarm>
			<bpel:for>$onAlarmValue</bpel:for>
			<bpel:scope>
				<bpel:throw
faultName="tns:TimeoutFault"/>
			</bpel:scope>
		</bpel:onAlarm>
	</bpel:eventHandlers>
- the whole other instructions are inside sequence inside scope

Assuming that onAlarmValue variable format is correct, will it work ?

--
Regards
Mateusz Nowakowski


*************************************************************************
This communication, including attachments, is
for the exclusive use of addressee and may contain proprietary,
confidential and/or privileged information.  If you are not the intended
recipient, any use, copying, disclosure, dissemination or distribution is
strictly prohibited.  If you are not the intended recipient, please notify
the sender immediately by return e-mail, delete this communication and
destroy all copies.
*************************************************************************


Mime
View raw message