Show TOC Start of Content Area

Procedure documentation Defining Block Flow  Locate the document in its SAP Library structure

Use

Defining the block flow implies:

      Choosing the items (actions, blocks, or processes) that are executed within the block

      Defining the order and the conditions for their execution

The definition of the block flow strongly depends on the block type, that is, whether it is marked as Sequential, Parallel, Parallel Dynamic, Precondition or Postcondition Loop, or Alternatives.

Use this procedure to define the specific flow required for each block type.

Procedure

...

       1.      Open the gallery, select a block, and open its design time.

       2.      To switch to edit mode, choose This graphic is explained in the accompanying text (Edit).

       3.      Select the appropriate object type that you want to add to the block flow from the Items dropdown box.

       4.      To insert an existing object, choose This graphic is explained in the accompanying text (Insert).

       5.      To create a new object, choose This graphic is explained in the accompanying text (Create New).

       If you create a new block, you must define its flow as well, as described in this procedure.

       If you create a new action, you must add callable objects to it.

More information: Attaching Callable Objects

       6.      Repeat steps 3 to 5 to add more items.

       7.      Make sure that you follow the requirements for the relevant block type that you are creating as described in the table below:

Block Type

Requirements

Sequential

      Any action or block can be added to the block flow.

      You must define the order in which the actions are to be executed. To move an item to the required position in the block flow, select it and choose This graphic is explained in the accompanying text (Move Up) or This graphic is explained in the accompanying text (Move Down).

      For actions with multiple result states, you can also define targets, as described in step 8 below.

Parallel

Parallel Dynamic

      Any action or block can be added to the block flow.

      For actions with multiple result states, you can also define targets as described in step 8 below.

Precondition Loop

Postcondition Loop

      You must add a loop decision action first.

The decision action defines the loop condition. These block types require an action with two result states: Continue and Break. The result states are not displayed in the block flow because you cannot define targets for them.

If you choose to add a second decision action, the new action replaces the one you previously inserted.

For more information about decision actions, see Creating Decision Dialogs.

      You must add a loop body block.

It includes the actions that are executed if the loop condition occurs. You can choose any block type.

Alternatives

      You must add a decision action first.

It defines at least two different result states for which you can define targets as described in step 8.

      You can add any other actions, blocks, or processes, and can define them as targets for the result states of the decision action.

 

       8.      If an action in the block flow defines multiple result states, you can configure a target for each individual result state. The target is an action that is executed if the relevant result state is reached.

To configure a target, select the relevant result state and choose the required action from the dropdown box in the Target column. You can select an action located in:

       The same block

Choose from the actions that are listed in the dropdown box.

       A different block

From the dropdown box, select Other… and choose the relevant name of the action.

When configuring targets for result states that are in different blocks, you have to make sure they are in accordance with the relevant block types you are using. For example, if the target is in a sequential block, you can choose any action from the block as a target action. If, however, the target is in a precondition loop block, the target can only be the first action in the block, since it is the decision action that defines the loop condition.

The following table shows whether a certain type of block can contain a source or target action:

Action Flow / Block Type

Sequential

Precondition Loop

Postcondition Loop

Parallel & Parallel Dynamic

Alternatives (User Decisions)

Source

Yes

No

No

No

Yes

Target

Yes

Action 1

Yes

Action 1

Action 1

The source block contains the decision action that requires result states. The target block contains the target of the result state. Action 1 indicates a target in the respective block type can only be the first action in the block.

If you select Terminal, at runtime the current block execution would end if the relevant result state is reached, and the next block in the process flow would be executed.

       9.      For parallel and parallel dynamic blocks, you can define more complex behavior and set criteria for block completion. On the Join Behavior tab page, you can choose one of the following options:

       Default – block is completed when all actions in the block are completed.

       Process Flow – block is completed when a specified number of actions are completed.

You can set the limit for completed actions as a percentage or as the number of branches (steps).

Example

If the block contains five actions and you want to make sure it completes as soon as any three of them are executed, you can specify a limit of 3 Branch(es) or 60 Percent.

       Data Flow – block is completed when a particular condition is reached.

To evaluate the condition, you can use a callable object for background execution, for example a Business Logic callable object which receives as input context parameters, makes a decision and returns result states.

Choose a callable object and use Parameter Mapping to map the relevant block context parameters to the input parameters of the callable object.

Use Result State Mapping to map the result states of the callable object to the two possible result states of the block:

       WAITING – wait for the next action to be executed and re-evaluate condition

       COMPLETED – skip all remaining actions and complete block execution

   10.      To save all changes, choose This graphic is explained in the accompanying text (Save All).

End of Content Area