Application DesignforLoop Business Rule Component

A For Loop is a business rule component that allows you to repeat an action a given number of times. One potential use of For Loop is to iterate through rows of a database or a table.

Tip: To prevent runaway looping if a conditional trigger always returns true, it is recommended that you specify the maximum number of iterations allowed.

Note: When incrementing an alphanumeric series, by default the series begins with zero, progresses through the numerical digits, and then progresses through letters.

The following is the syntax for a For Loop.

Important! Content in a business rule is case sensitive. This includes business rule component names, attributes, and values.

Note: For each business rule component, most elements and attributes are optional, but you should specify enough to achieve the functionality that you intend. In most cases, you can omit attributes that are not relevant to your task and default values will be used. You must specify a name and a namespace. Except where otherwise indicated, attributes accept string values.

ClosedAbout the syntax documentation

<forLoop name="This_component" namespace="Parent_of_component"
direction="INCREMENT|DECREMENT"
mode="NUMERIC|UPPERCASE_ALPHA|UPPERCASE_ALPHANUM|HEXADECIMAL|CUSTOM"
step="Integer_by_which_to_increment/decrement"
maxLength="integer"
minLength="integer"
maxIterations="integer"
mergeRowToJobData="true|false"
sticky="true|false" configuratorType="Block_type_ID" alias="Data_reference">

<!-- Triggers -->

<!-- Required. Specify which event will cause this business rule component to run. For more information, see Triggers. -->

<triggers>

<trigger eventTrigger="ENQUEUE|PRINTJOBDETAIL|LABEL|Custom_Event" priority="integer" propagation="NONE|BEFORE|AFTER"/>

</triggers>

 

Closed<!-- Execution condition -->

 

Closed<!-- Default data -->

 

Closed<!-- Parameters -->

 

Closed<!-- Common custom events -->

 

<!-- Child business rule components -->

<!-- You can create child business rule components to be run whenever the trigger event for this business rule component occurs. -->

<children>

<!-- The child business rule components have the potential to run once per triggering of the business rule component. However, a child business rule component will not run unless its own trigger event occurs. -->

<!-- To run a child business rule component once per iteration of the loop, set the trigger for the child business rule component to the event defined in loopEvents. -->

</children>

 

<!-- For Loop functionality -->

<!-- If the mode is CUSTOM, specify the custom sequence in increasing value from left to right. Do not use any separators between the items in the sequence. To use an item that includes multiple characters, enclose the item in single quotation marks. -->

<!-- If the mode for this business rule component is anything other than CUSTOM, omit the sequence. -->

<sequence>string</sequence>

 

<!-- The startValue must be of the type specified by the mode. -->

<startValue>value</startValue>

 

<!-- The minValue must be of the type specified by the mode. -->

<minValue>value</minValue>

 

<!-- The endValue must be of the type specified by the mode. -->

<endValue>value</endValue>

 

<!-- Specify a rowKey only if you are using the forLoop to iterate through rows. -->

<rowKey>key</rowKey>

 

<!-- The loopEvent is the definition of an event to symbolize the occurrence of a new iteration of the loop. This event occurs at the beginning of each iteration of the loop. -->

<loopEvents>

<loopEvent eventName="Custom_Event" includeSiblings="true|false" />

</loopEvents>

</forLoop>

Syntax Tips

Additional information is available about the following items.

Closedalias

ClosedconfiguratorType

ClosedmergeRowToJobData

Closedname

Closednamespace

Closedsticky

Tip: For assistance with a business rule that you have created or to have Loftware create business rules for you, contact Loftware's Professional Services Group.