Entering content frameProcedure documentation Unit 7: Including "Check Notification of Absence" in the Workflow Definition Locate the document in its SAP Library structure

Use

The task with which an employee can check a notification of absence is ready to be included into your workflow definition as the next step.

Prerequisites

You have defined a workflow with a step (Unit 4: Defining and Inserting Task "Create Notification of Absence") and created the task Check Notification of Absence (Unit 6: Creating Task "Notification of Absence").

Procedure

Calling the Workflow Builder

  1. Choose Tools ® SAP Business Workflow ® Development ® Definition Tools ® Workflow Builder.
  2. The Workflow Builder is then launched in change mode with the workflow that was processed last.

  3. Work through the following steps to display your workflow for this tutorial in change mode.
      1. If a different workflow is displayed, check whether the workflow you created is listed in the My workflows and tasks area. Double-click it and choose This graphic is explained in the accompanying text. Go to step 3.
      2. Enter the full ID directly in the Workflow field in the information area. Alternatively, you can also enter the workflow abbreviation. Enter either the full abbreviation or just the first few characters (for example: <i*>). Choose This graphic is explained in the accompanying text. The search result is then displayed. Choose your workflow by double-clicking it. The workflow is then loaded in change mode.
  1. Choose This graphic is explained in the accompanying text to display the entire workflow in the workflow area on the screen.

Creating a container element in the workflow container

You need an additional container element in the workflow container to store the name of the user who will execute this step. This user name is to be used later in the notification text that is sent to the requester.

  1. Choose Workflow Container in the object area and there double-click on the entry <Double-click to create>.
  2. The dialog box for entering a container element is displayed.

  3. Make the following entries on the Data Type tab page:
  4. Element: Approver

    Name: Approver

    Description: Approver of the absence request

  5. Choose This graphic is explained in the accompanying text.
  6. The Select predefined data type dialog box is displayed.

  7. Choose Agents by double-clicking.
  8. You return to the creation of a container element. The system has made the required entries for a container element that is to contain an agent.

  9. Choose This graphic is explained in the accompanying text.

You have now added a local container element to the workflow container, which is ready to take an agent name, based on its data type reference. However, you have not yet determined a value for this container element.

Creating an activity as a step in the workflow definition

  1. Choose This graphic is explained in the accompanying text under step type. The cursor changes shape.
  2. Position the cursor on the Undefined step that follows the outcome Request completed and click.
  3. By doing so, you add an activity to your workflow definition. The step definition is shown in the right-hand part of the screen. You are on the Control tab page.

    Entering basic data for control

  4. In the Task field, enter the abbreviation (TS<8-digit number>) of the task Check Notification of Absence that you defined in the previous unit. Choose This graphic is explained in the accompanying text.

If you no longer know the full abbreviation, you can use different methods to search for it:

This displays the Search and Find: Tasks dialog box.

On the Obj. type and method tab page, enter the object type FORMABSENC and the method APPROVE.

Then double-click your task in the list. You should recognize your task from your initials in the abbreviation. Choose This graphic is explained in the accompanying text.

A list is then displayed from which you can choose the required task or workflow by double-clicking.

Note

Every activity, as a step in a workflow definition, refers to a task or a workflow.

At this point, the unique reference to this task or workflow is entered. The identification is made up of an abbreviation (T, TS, WF, or WS) followed by an 8-digit number.

If you choose a workflow (WS or WF) as a task, you include a subworkflow and the activity is marked by This graphic is explained in the accompanying text in the graphical display. If you choose a task (TS or T), your activity is marked by This graphic is explained in the accompanying text in the graphical display.

You go to a dialog box in which the system proposes a binding from the workflow container to the task container.

Here, the object reference to the notification of absence is transported from the workflow container (container element AbsenceForm) to the task container (to the container element _WI_Object_ID).

  1. Choose This graphic is explained in the accompanying text to confirm the proposal.
  2. Add the binding definition

    Now define another binding using which the actual agent of the work item (the superior) is stored in a container element of the workflow container.

  3. Choose This graphic is explained in the accompanying text Binding (present).
  4. The Binding for Step 'Check notification of absence (ini)' dialog box is then displayed. If the first column is entitled Element, choose This graphic is explained in the accompanying text to display the element description.

    The system has created the following binding definition from the workflow container to the task container:

    Notif. of absence This graphic is explained in the accompanying text &AbsenceForm&

    This binding ensures that the correct notification of absence is checked in the task.

  5. Choose This graphic is explained in the accompanying text.
  6. All of the container elements in the task container are now displayed on the left-hand side. You can define a binding from these container elements to the workflow container.

  7. Position the cursor in the lower half of the screen in the empty input field beside the container element Agent and call the F4 input help.
  8. The Expression dialog box is displayed. All container elements that have a data type that is compatible with the target element have a green background.

  9. Double-click Approver.
  10. In addition to the bindings already existing, the following binding is now defined:

    Agent This graphic is explained in the accompanying text &Approver&

  11. Choose This graphic is explained in the accompanying text.

Determining outcomes

The method APPROVE of the object type FORMABSENC, to which you refer in the standard task definition, is defined with a result. The three possible values of this result are offered on the tab page Outcomes as outcomes of this step:

The This graphic is explained in the accompanying text indicates that these outcomes have already been transferred to the workflow definition. The outcome New is not really appropriate at this point. At this stage of processing, the notification of absence cannot be "new" any more. It should therefore not be incorporated in the definition.

  1. Switch to the Outcomes tab page and click on This graphic is explained in the accompanying text in front of the outcome New.
  2. The symbol changes to This graphic is explained in the accompanying text.

    Note

    The outcome Processing obsolete is processed if the relevant work item is set to obsolete using a process control step type. These functions are not used in this tutorial.

    The outcome Form not available results from the exception defined for the method APPROVE. You could include this outcome into the workflow definition and would then have to model appropriate subsequent steps. However, you do not model anything for the purposes of this tutorial and accept that your workflow will have an error at runtime if this exception is raised.

  3. Change the name of the active outcomes. Name the outcomes Notification of absence approved and Notification of absence rejected.
  4. Choose This graphic is explained in the accompanying text.

Two branches are now inserted in your workflow definition for the two marked outcomes Notification of Absence Approved and Notification of Absence Rejected.

Inputs for the agent

If you are working through this tutorial alone, do not specify anything for responsibility at this point. If it is processed when the workflow is executed, therefore, this step will be "offered" for processing to all employees declared as possible agents of the task Check notification of absence. This means all users whose positions are described with the job head of department.

In your organizational plan, there is only one user who is a possible agent and that is you yourself.

Concluding the step definition

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 subject your workflow definition to a second test.

Leaving content frame