uCosminexus Service Platform, Basic Development Guide

[Contents][Glossary][Index][Back][Next]

5.6.10 Standby Activity

A standby activity defines a process that puts the processing flow of a business process in standby mode at regular intervals or until a certain time limit. You can use this activity to put a business process in standby mode for a specified period or until a specified time.

Define the details of the standby activity in the Wait Activity dialog box. Specify the standby time interval or time limit in an XPath expression.

Organization of this subsection
(1) Definition procedure
(2) Character strings that can be specified as standby time
(3) Notes on definition
(4) Notes on multiple executions in an environment set up by the HCSC easy setup functionality

(1) Definition procedure

  1. Deploy a standby activity on the canvas.
    For details about how to deploy activities, see 5.4.1 Deploying Activities.
  2. Use one of the following methods to open the Wait Activity dialog box:
    • Double-click a standby activity on the canvas.
    • Select and right-click a standby activity on the canvas, and then select Setting.
    The Wait Activity dialog box appears.
  3. Enter the necessary information in the Wait Activity dialog box.
    Select For or Until in Standby time and then specify the standby time interval or time limit in an XPath expression.
    For details about the Wait Activity dialog box, see 1.4.16 Standby Activity dialog in the manual uCosminexus Service Platform Reference Guide.
  4. Click OK.

(2) Character strings that can be specified as standby time

An XPath expression is used to specify standby time. An XPath expression is evaluated in the processing of a business process, and the character string obtained as a result of the evaluation is used as standby time. The BPEL standard imposes some limitations on the character strings that can be obtained by evaluating XPath expressions.

The following subsections describe the character strings that can be obtained by evaluating XPath expressions. For details about specifying XPath, see 5.6.18 Specifying an XPath.

(a) If "For" is specified in "Standby time"

If For is specified in Standby time, the character strings that can be obtained by evaluating XPath expressions must conform to the XML Schema type duration (xsd:duration). The XML Schema type duration is the variable type indicating character strings that express elapsed time in PnYnMnDTnHnMnS format.

The following example shows the character strings that can be obtained by evaluating XPath expressions when For is specified for Standby time:

(Example 1) If an interval of 1 year, 2 months, 3 days, 4 hours, 5 minutes, and 6 seconds is specified as the standby time:
The character string that can be obtained by evaluating the XPath expression is P1Y2M3DT4H5M6S.

(Example 2) If an interval of 10 seconds is specified as the standby time:
The character string that can be obtained by evaluating the XPath expression is PT10S.

Instead of specifying an XPath expression in Expression in the Wait Activity dialog box, you can also specify a standby time interval directly by enclosing it in single quotation marks (') or double quotation marks ("). The following examples show direct specifications of standby time intervals by using single quotation marks (').

(Example 3) If an interval of 1 year, 2 months, 3 days, 4 hours, 5 minutes, and 6 seconds is specified as the standby time:
Specify 'P1Y2M3DT4H5M6S' directly in Expression in the Wait Activity dialog box.

(Example 4) If an interval of 10 seconds is specified as the standby time:
Specify 'PT10S' directly in Expression in the Wait Activity dialog box.
(b) If "Until" is specified for "Standby time"

If Until is specified for Standby time, the character strings that can be obtained by evaluating XPath expressions must conform to the XML Schema type dateTime (xsd:dateTime). The XML Schema type dateTime is the variable type indicating character strings that express a date and time in CCYY-MM-DDThh:mm:ss.sssTZ format (where .sss and TZ can be omitted).

The following example shows the character strings that can be obtained by evaluating XPath expressions when Until is specified for Standby time.

(Example 1) If January 1, 2010 at 00:00:00 is specified as the standby time:
The character string that can be obtained by evaluating the XPath expression is 2010-01-01T00:00:00 or 2010-01-01T00:00:00.000TZ.

Instead of specifying an XPath expression in Expression in the Wait Activity dialog box, you can also specify a standby time limit directly by enclosing it in single quotation marks (') or double quotation marks ("). The following examples show direct specifications of standby time limits by using single quotation marks (').

(Example 2) If January 1, 2010 at 00:00:00 Japan Standard Time (JST) is specified as the standby time:
Specify '2010-01-01T00:00:00+09:00' directly in Expression in the Wait Activity dialog box.

(Example 3) If January 1, 2010 at 00:00:00 Greenwich Mean Time (GMT) is specified as the standby time:
Specify '2010-01-01T00:00:00+00:00' or '2010-01-01T00:00:00Z' directly in Expression in the Wait Activity dialog box.

(3) Notes on definition

#1
The following examples show cases where no error occurs:
(Example 1)
A standby activity is set after a reply activity. No error occurs because processes following the standby process are executed as asynchronous business processes.
The standby activity waits for processing, and the invoke service activity is executed when the standby time limit is reached.
[Figure]
(Example 2)
A standby activity is set after a reply activity. No error occurs because processes following the standby process are executed as asynchronous business processes.
The empty activity executes processing as part of parallel processing in response to a request from the service requester. When another request is received from the service requester, a response is returned to the service requester once, and then the standby process is executed.
[Figure]

#2
The following example shows a case where an error occurs:
(Example 1)
A standby activity is set before a reply activity. Because a standby activity is executed within a synchronous business process, an error occurs when the business process is executed.
[Figure]

#3
The following example shows a case where an error occurs:
(Example 1)
A reply activity that is not paired with a receive activity is set after a standby activity. As a result, an error occurs when the business process is executed.
[Figure]

(4) Notes on multiple executions in an environment set up by the HCSC easy setup functionality

In an environment set up using the HCSC easy setup functionality, processes following a standby activity for multiple process instances are not executed concurrently because the multiplicity of processes following a standby activity is set as 1 by default. If processes following a standby activity start simultaneously from multiple process instances, the processing of a process instance that starts later is not executed until the previous processing finishes.

To simultaneously execute processes following a standby activity for multiple process instances, adjust the process multiplicity by changing the ejbserver.ejb.timerservice.maxCallbackThreads property in usrconf.properties.

The figure below shows an example of processing where multiple process instances are executed when the multiplicity of processes following a standby activity is 1 and the multiplicity is increased. This example assumes that the standby activity (Standby 1) causes multiple process instances to wait for processing until 13:00 and then it takes two minutes for post-standby processes (Empty 2 and Empty 3) to finish.

Figure 5-10 Examples of processing where the multiplicity of processes following a standby activity is 1 and where the multiplicity is increased

[Figure]

For details about how to set the ejbserver.ejb.timerservice.maxCallbackThreads property in usrconf.properties, see 2.4 usrconf.properties(User property file for J2EE servers) in the Application Server Definition Reference Guide.