Skip to main content

<sequence>

Perform activities in sequential order.

Syntax

<sequence>
   ... 
</sequence>

Attributes and Elements

name, disabled, xpos, ypos, xend, yend attributes
Other elements

Optional. <sequence> may contain zero or more of the following elements in any combination: <alert>, <assign>, <branch>, <break>, <call>, <code>, <continue>, <delay>, <empty>, <flow>, <foreach>, <if>, <label>, <milestone>, <reply>, <rule>, <scope>, <sequence>, <sql>, <switch>, <sync>, <throw>, <trace>, <transform>, <until>, <while>, <xpath>, or <xslt>.

Description

A <sequence> element is used within a <process> or a <flow> to contain elements that need to be executed in sequential order.

<sequence> and <process>

Every BPL document must have at least one <sequence> element within its <process> element that specifies the main sequence of activities for the business process. For example:

<process>
  <sequence>
    <call name="A" />
    <call name="B" />
  </sequence>
</process>

When you use the Business Process Designer, as you add activities between the <start> and <end> elements of a new, top-level BPL diagram, everything you add is contained within a single top-level <sequence> that the BPL code generator places inside the <process> element in the generated code. Such a <sequence> is shown in the preceding example. The <call> element A is executed first, followed by the <call> element B.

When you use the Business Process Designer, if you need to temporarily disable the top-level <sequence> within a <process>, you can disable it in Studio in the generated BPL code by adding the disabled attribute to the corresponding <sequence> element.

Nested <sequence> Elements

A <sequence> can contain other sequences. Nested <sequence> elements do not start additional execution threads; for that you need the <flow> element. However, you can use superfluous nested <sequence> elements as a means to group items within a BPL document. For example:

<process>
  <sequence>
    <sequence>
      <call name="A" />
      <call name="B" />
    </sequence>
  </sequence>
</process>

Nested <sequence> elements have no effect on the code generated for the business process. The BPL diagram, however, displays such nested sequences as a single <sequence> icon. You can drill down into the <sequence> icon to view the elements contained within.

<sequence> and <flow>

When you are using the Business Process Designer and you add a <flow> element to the business process, a <sequence> element is automatically inserted inside the <flow>, as you can see by examining the generated BPL code. You may add additional <sequence> elements to the flow; in fact, each branch of the <flow> must be enclosed within its own <sequence> element.

If you need to temporarily disable one of the <sequence> elements within a <flow>, you can do it in Studio in the generated BPL code by adding the disabled attribute and setting it to true in the corresponding <sequence> element.

FeedbackOpens in a new tab