Start of Content Area

Procedure documentation Unit 15: Using a Rule  Locate the document in its SAP Library structure

Use

In the organizational plan you have created up to now, there are two positions, each of which is described by a job. Each position must be linked to a different user.

The job of department manager is linked to the department manager position. The job of department manager, in turn, is linked to the task Check notification of absence. In a more extensive organizational plan containing several positions for department managers, each position can be linked to the job of department manager.

These links ensure that each user who is assigned to a position as department manager is one of the possible agents of the task Check notification of absence. If you want to assign all of the department managers as possible agents of a different task, all you have to do is link this task to the job of department manager. You do not need to make any detailed changes.

Example

You can add a further organizational unit to your organizational plan by creating a new position as department manager and linking it to a third user. When you link this new position to the existing job of department manager, the third user is automatically added to the list of possible agents for the task Check notification absence.

If you then create a notification of absence, it is offered to all of the possible agents for processing. This is clearly undesirable, since the notification of absence should only be presented to your own superior. This superior is the head of department who has the chief position in the organizational unit to which you too belong.

To ensure that the notification of absence is not submitted to all of the possible agents, you must define responsible agents in your step definition. All of the responsible agents who are also possible agents for this task then become recipients of the work item for the task. In this example, the responsible agents must be defined dynamically, since the relevant agent depends on the requester (person initiating the workflow). To do so, you use a Rule for Agent Determination.

SAP delivers the rule Superior of. This rule first establishes a user's position and the relevant organizational unit and also finds the chief position in this organizational unit.

Note

This rule only works correctly if you are not your own superior. You should only work through this unit if you have completed Unit 14: Changing Staff Assignments and adapted your organizational plan accordingly.

By using a rule to assign responsibilities, you do not need to have any specific knowledge of the organizational plan when you define a workflow definition. When the rule is resolved at runtime, all of the necessary information is provided using the binding definition from the workflow container to the rule container.

Procedure

You start the Workflow Builder and open your workflow definition in Change mode. Proceed as described in Unit 7: Including "Check Notification of Absence" in the Workflow Definition.

Selecting a rule

  1. In the navigation area, select the activity Check notification of absence. The relevant step definition is opened.
  2. Choose Superior of workflow initiator under Agents.

The system then enters the rule ID ( 00000168 ) in the Rule selection field and in the input field.

Note

The binding between the workflow container and the rule container is created automatically here. If you choose Rule in the checkbox and enter the rule in the input field using the F4 input help, you must define the binding manually.

Concluding step definition

  1. Choose This graphic is explained in the accompanying text to check the step definition.
  2. Choose This graphic is explained in the accompanying text to exit the step definition.
  3. Choose This graphic is explained in the accompanying text.

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.

Result

You can now subject your workflow definition to another test.