Timeout Settings Computed Dynamically with an XPath Expression
The timeout setting for request-response receives, in-only receives (callback), and onMessage branches of pick activities can be set using an XPath expression instead of entering a static duration or datetime value. In this case, the value of the expression must return either:
-
A string that can be interpreted as a static XML duration or
datetimevalue -
An XML schema duration or
datetimetype
The following example shows the syntax for using XPath expressions in BPEL 1.1.
<bpelx:for="bpws:getVariableData('input', 'payload',
'/tns:waitValue/tns:for')"/>
<bpelx:until="bpws:getVariableData('input', 'payload',
'/tns:waitValue/tns:until')"/>
If the returned expression value cannot be interpreted as an XML schema duration or datetime type, an event is logged in the instance audit trail indicating that an invalid duration and datetime value was specified, and no activity expiration time can be set.