Business Process and Data Transformation Language Reference
<delay>
[Back] [Next]
   
Server:docs1
Instance:LATEST
User:UnknownUser
 
-
Go to:
Search:    

Delay execution of a business process for a specified duration or until a future time.
Synopsis
<delay duration='"PT60S"'/>
<delay until='"2003-10-19T10:10"'/>
Details
Attribute or Element Description Value
duration attribute Optional. Specifies the duration of the delay as an expression that evaluates to an XML duration value.* A string of one or more characters; for example “PT60S” for 60 seconds or “P1Y2M3DT10H30M” for 1 year, 2 months, 3 days, 10 hours, and 30 minutes.
until attribute Optional. Specifies a future time at which the delay will expire, as an expression that evaluates to an XML dateTime value.* A string of one or more characters; for example “2003:10:19T10:10”
name, disabled, xpos, ypos, xend, yend attributes See Common Attributes and Elements.”  
<annotation> element
* For details, see appropriate entry in the Primitive Datatypes section of the W3C Recommendation XML Schema Part 2: Datatypes Second Edition, which you can view at the following:
http://www.w3.org/TR/xmlschema-2/#duration
http://www.w3.org/TR/xmlschema-2/#dateTime
Description
The <delay> element suspends execution of a business process (or the current thread within a <flow>) for either a specified duration or until a specific time. For example:
<sequence>
  <annotation>
    <![CDATA[ Write the time now, and sixty seconds later.]]>
  </annotation>
  <trace value='"The time is: " & Now' />
  <delay duration='"PT60S"' />
  <trace value='"The time is: " & Now' />
</sequence>
The <delay> element causes the execution of a business process to pause for either a specific duration (specified by the duration attribute) or until a specific future time (specified by the until attribute). You must provide either the duration attribute or the until attribute, or no delay will take place.
During the delay period, execution of the current business process thread is suspended and the state of the business process is saved to the database.
The format for values of duration and until is discussed at length in World Wide Web Consortium documents about XML data types. For details, see the “Primitive Datatypes” section of the W3C Recommendation XML Schema Part 2: Datatypes Second Edition, which you can view at http://www.w3.org/TR/xmlschema-2/#built-in-primitive-datatypes. Some duration examples are:
Whenever a <delay> element is executed, the BPL engine inserts the name of the <delay> element into the message header so that it is visible in later Message Browser and Visual Trace displays.