Delays

Sometimes in loops, but also on other occasions, we may want to program delays into BPEL processes. To do this we can specify durations or deadlines. Typically, we could specify delays to invoke an operation at a specific time, or wait for some time and then invoke an operation. For example, we could choose to wait a few seconds before invoking the BookWarehousing process, or before we pool the results of a previously initiated operation, or to wait between other iterations of a loop.

The simplest way to specify the delays is to use the <wait> activity. The <wait> activity can be:

  • for: Using this, we can specify duration; we specify a period of time. Consider the following code snippet:
    <wait>
      <for> duration-expression </for>
    </wait>
  • until ...

Get WS-BPEL 2.0 Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.