Details of the Workflow Definition

The following information is of interest in connection with the workflow definition for the SAP workflow AF_process . Look at the definition in the system.

Binding for the workflow definition steps

Element _WI_Object_Id in the task container

In each of the steps of the workflow definition in which the notification of absence can be approved, revised and deleted, a binding is defined from the element AbsenceForm of the workflow container to the element _WI_Object_ID of the relevant task container.

In addition to the standard elements in the workflow container, the element AbsenceForm was created to contain the object reference. It was provided with the reference to the created object from the triggering event.

Element AbsenceForm in the task container

In the workflow definition step in which the task description is sent, a binding is defined from the element AbsenceForm of the workflow container to the element AbsenceForm of the task container. This binding ensures correct text replacement in the task description of the task.

The element _WI_Object_ID of the task container must not be filled in this step.

Agent determination

Steps for the applicant

If the leave applicant is to process a step, the element _WF_Initiator of the workflow container is entered as the agent. This element is in the workflow container as standard and was provided with the name of the applicant from the triggering event.

Steps for the superior

If the applicant's superior is to process a step, they must be determined using rule resolution. The rule requires the name of the applicant. The rule 74500180 ( DEMO: Superior (user) of...) is therefore entered as the agent, and a binding is defined from the element _WI_Initiator of the workflow container to the element Org_Object of the rule container. The rule used here is based on the 00000168 rule (superior of...). In contrast to this rule, it always also delivers the user as the result, so the execution of this demonstration workflow cannot be canceled with an error.

Address determination and sending the text

In the step in which the task AF_Txt_Send is called to send the mail to the leave applicant, the applicant (element _WF_Initiator of the workflow container) is passed to the element AddressStrings in the task container. The element _WI_Object_Id of the task container remains empty.

Result of the user decision

The result of the user decision in which the applicant must decide whether to delete or revise the notification of absence is required again for the loop check to determine whether the notification of absence should be resubmitted.

The result of the user decision, which is returned in the element _WI_Result of the task container, is therefore passed to the element Flag of the workflow container via a binding. This element Flag was created for this in the workflow container with a data type reference to the ABAP Dictionary table field SWD_LINES-Returncode .