
If the requester decides to revise and resubmit the notification of absence to their superior, the step Check notification of absence must be executed again.
There are different ways of solving this problem. The solution outlined here is only one example:
You create a container element in the workflow container that you use as a flag. This flag contains different values, depending on the status of the notification of absence:
Approved
Not approved and revised
Not approved and not revised
To assign values to the container element, container operations must be executed on the workflow container.
For information on the workflow log, see Definition of the Workflow Container in the documentation for SAP Business Workflow.
You use this container element to define the condition in the UNTIL loop.
For more information, see Maintenance of UNTIL Loops in the SAP Business Workflow documentation.
Start the Workflow Builder and open your workflow definition in change mode. Proceed as described in Unit 7: Integrate Activity Step Type.
Create container element in the workflow container
Choose the entry Double-click to create by double-clicking in the Workflow Container tray.
The dialog box for entering a container element is displayed.
Make the following entries in this screen:
Element: Indicator
Name: Indicator
Short text: Flag for approval status
Choose
.
The Select predefined data type dialog box is displayed.
Choose Flag by double-clicking.
You return to the creation of a container element. The system has made the required entries for a container element that is to contain a flag.
Choose
.
You have now added a local container element to the workflow container, which is ready to store a flag, based on its data type reference. However, you have not yet determined a value for this container element.
Integrating the UNTIL loop as a step
Choose
in the step type area. The cursor changes shape.
Position the cursor on the Check notification of absence step and click.
A dialog window is displayed in which you can choose if an empty loop is to be inserted or if the selected block is to be copied to the loop immediately. To assist you, all steps that belong to the selected block are selected.
The workflow definition is block-oriented. Every block represents a basic structural element that is a self-contained and consistent arrangement of steps and outcomes.
If you, for example, create a new step that has one outcome, this pair (step, outcome) represents a block. Operations that are performed on one step (delete, cut, and so on) always affect the entire block associated with that step.
To display the block structure of your workflow definition in the Workflow Builder, choose . Here, choose the Technical Groups as the block display on the View tab page.
For more information, see Block Orientation in the Workflow Definition.
Choose In Loop.
This inserts an UNTIL loop into your workflow definition. The step definition of the UNTIL loop is displayed in the right part of the screen.
Entering the basic data
Enter Resubmission required? in the Step description field.
Click on the condition area to open the condition editor.
The bottom half of the screen contains the empty condition, whereas the top half shows the operators, the system fields, and the content of the workflow container. The field in the Expression 1 column is ready for input and marked
. For more information, see Condition Editor.
Choose the Flag container element as the first expression by double-clicking it.
The first expression is now entered in the condition in the lower part of the screen. The Expression 2 field is now ready for input and marked
.
Choose
as the operator.
Enter the constant X in the field for Expression 2 and confirm by pressing Enter.
Choose
.
You have now defined the condition Kennzeichen = X. The comparison between the container element Kennzeichen and the constant X returns either the result true or the result false. Two outcomes are therefore possible.
Enter the following texts for the outcomes:
True: Flag equal to X - no resubmission
False: Flag not equal to X - resubmission
If the result of the evaluated condition is false, the loop is processed again. If the notification of absence is to be resubmitted to the superior, the container element flag must not have the value X. For this purpose, you will insert container operations in the workflow definition in the next unit.
Choose
.
You have inserted an UNTIL loop in the workflow definition that contains all steps that are in the block opened by Check notification of absence.
Concluding the step definition
Choose
to align the graphic.
Choose
to view the entire workflow definition in the workflow area on the screen.
Choose
.
The workflow definition is checked, saved, and, provided it does not contain any errors, activated. The system displays a message if problems are encountered during the test.
The integration of the UNTIL loop is now complete. The workflow up to this point, however, delivers an incorrect result, since the Flag container element is not assigned a value during execution. The result of the evaluated condition in the UNTIL loop is always false and the workflow can never be completed. To ensure that the workflow is executed correctly, you will add further container operations to the workflow definition in the next unit.