Unit 6: Defining a Workflow 

Use

A mail is to be sent once the production order has been released. This is carried out by a workflow which you will define in this unit.

Procedure

  1. Choose Tools ® Business Workflow ® Development ® Definition Tools ® Workflow Builder.
  2. The Workflow Builder screen is then displayed. If you are starting the Workflow Builder for the first time, an initial workflow definition is displayed there. Otherwise, the workflow that was processed last is opened.

  3. Choose .

The Workflow Builder - Create 'Undefined' [new, not saved] screen is then displayed. An initial workflow definition is displayed.

Create container element in the workflow container

You must now add a container element to the workflow container that can store an object reference to a production order.

  1. Choose <Double-click to create> by double-clicking in the Workflow Container.
  2. The dialog box for creating a new container element is displayed.

  3. Enter the following data:
  4. Element: ProductionOrder

    Name: Production order

    Short Description: Production order

    Object type: Zini_2005

  5. Set the Import and Mandatory flags.
  6. Select Object type as the Data type reference.
  7. Choose .

The new container element is displayed in the workflow container. The symbol shows that the new container element is an import parameter of the workflow and thus belongs to the workflow interface.

Saving the workflow

  1. Choose .
  2. The first time a workflow is saved, a multistep task of the type workflow template is automatically created.

  3. Enter the following data:
  4. Abbreviation: Zini_Mail

    Name: < Mail for production order>

    The dialog box Object directory entry is displayed.

  5. Choose Local Object.

Determine Triggering Event

If a workflow is to be started by an event, you must define this as a triggering event. In this scenario, the workflow is to be started as a response to the released1 event of your object type Z ini_2005 . You must activate the event linkage for this event and define a binding.

  1. Choose .
  2. The basic data of the workflow is displayed.

  3. Go to the Start tab.
  4. Enter the following data:
  5. Object type: Zini_2005

    Event: released1

    Activate event linkage

  6. Click on in the event column.
  7. Active event linkages are marked with .

    Defining the binding between the event container and the workflow container

    The event parameter _Evt_Object of the event released1 contains the object reference to the released sales order.

    The event parameter _Evt_Creator of the event released1 contains the name of the person whose system user was used to generate the event. The name is stored in the form US<Name> in this element.

    This information must be transferred by means of a binding between the event container and the workflow container.

    The workflow container contains the production order (technical name: ProductionOrder ) element you created as well as the standard initiator element (technical name: _WF_Initiator ).

  8. Choose released1 in the event line.
  9. The Task: Binding for Triggering Events dialog box is then displayed. The workflow system has automatically assigned the contain element _Evt_Object of the event container to the ProductionOrder element of the workflow container.

  10. Choose to display all of the container elements in the workflow container to which you can define a binding.
  11. Assign the _Evt_Creator container element in the event container to the _WF_Initiator element in the workflow container. Use the F4 input help.
  12. Choose .
  13. Exit the basic data of the workflow and choose .