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

Reply via email to