Block
You use a block
(
) to combine steps that you want to
execute one after the other and which are to access the same local data (see
also: Containers). You can
also use a block to combine steps that you want to have the same deadline or
exception handler, or to define a local correlation.
You can define the mode Parallel For Each(ParForEach) for a block or Dynamic Sequence (ForEach). This means that the block is executed for all elements of a multi-line container element.
You can define blocks in a sequence or nest them within one another. However, a block cannot extend beyond any existing block boundaries. The outermost block of a process is always the process itself.
Elements of the superordinate container are not visible in subordinate containers. An element can be read and written-to in a subordinate container, but not redefined.
A deadline specifies the last point in time that the block can be executed. You can define a deadline as follows:
● The point in time when the step or process is generated
● An arbitrary point in time that you specify as an expression
You define how you want the process to react if the deadline is exceeded in a separate branch. In this branch you can trigger an alert for Alert Management by using a control step, for example. The branch has read and write-to access to all data within the block.
To define a deadline, call the context menu for that particular block.
The system checks the deadline at runtime. If the deadline has been exceeded, the processing branch is executed for the deadline. The steps in the remaining processing branches in the block are not affected by this. In particular, note that these steps within a block are not automatically completed.
In a block you can define processing branches as exception handlers (see also: Exception Handling). An exception handler has read and write-to access to all data within the block. You can define multiple exception handlers for each block.
To insert an exception handler branch, call the context menu for the block.
In a dynamic mode, the block is executed for each line of a multiline container element. In ParForEach mode, an instance of the block is generated for each line of the multiline container element. All instances are processed simultaneously. In ForEach mode, the block first runs through for the first line of the multiline container element, then for the second, and so on.
You can use the ParForEach mode when you want to send a message to multiple receivers simultaneously, for example. To do so, you use a receiver determination step to determine a multiline container element with the list of receivers. You then define that the message is sent to these receivers in a block with the ParForEach mode. You can use the ForEach mode when you want to send a message to multiple receivers one after the other, for example.
You specify the multiline container element in the Multiline Element attribute. In the Current Line field specify a container element that takes the value of the multi-line container element for which the block will run.
You can define an end condition for the dynamic mode (see also: Condition Editor). This is checked as soon as the block has run through for one line of the multiline container element. The block is complete as soon as one of the lines of the multiline container element returns true for the end condition, or all lines of the multiline container element have been processed.
More information: Checklist: Making Correct Use of a ParForEach
Usually, a correlation is valid for the entire process. For example, if a correlation was activated for a particular purchase order number, then this correlation cannot be used for other purchase order numbers. However, you can restrict where a correlation is valid by assigning the correlation to a block as a local correlation. The local correlation is then only valid within the block. It cannot be activated or used outside the block to which it is assigned. For example, you can use a local correlation in a ParForEach to create and use a correlation with its own unique key (GUID) for each instance created at runtime. This then enables each block instance to process a different purchase order number.
You can define whether the start and end of a block are considered as transaction boundaries or not. If you define transaction boundaries appropriately it is possible to improve system performance.
More information: Transactional Behavior of an Integration Process
...
For an example of how to use a block, deadlines, exceptions, and exception handlers, see: Example: Collecting and Bundling Messages from One Interface.
For an example of ParForEach, see Example: Multicast – Multiple Receivers (with Response Message)