Start of Content Area

Procedure documentation Unit 7: Editing Workflow Definitions  Locate the document in its SAP Library structure

Use

You define a mail step in this unit, which when executed, sends a mail to the members of the newly created organizational unit.

For this purpose, use the step type Send mail.

Procedure

  1. If you are no longer in the Workflow Builder, choose Tools ® Business Workflow ® Development ® Definition Tools ® Workflow Builder ® Workflow Builder. The Workflow Builder is then launched with the workflow that was processed last. If the required workflow is not opened, enter the workflow ID in the information area. You can use the F4 input help and enter an abbreviation to search for your workflow.
  2. As well as the initial workflow definition, your workflow also contains the defined triggering event. If you are not in change mode, choose This graphic is explained in the accompanying text.

  3. Choose Send mail in the step type area and click on the Undefined step.
  4. All necessary entries for sending a mail are made on the tab page Mail.

  5. Specify the person(s) to whom the mail is to be sent. Do not change the presetting recipient type organizational object. Choose the entry organizational unit in the area Recipient and enter the identification of your organizational unit. You can use the F4 input help.
  6. Enter the subject of the mail.
  7. Production order released

  8. Enter the text for the mail.
  9. Note

    This text should contain text variables that can be replaced at runtime by values taken from the task container. Text variables are surrounded by a & symbol. To insert a text variable, choose This graphic is explained in the accompanying text. The system fields and the container element of the workflow container are displayed in the new dialog box. Double-click the expression. Choose This graphic is explained in the accompanying text to change between the technical name and the description. When you select a container element, the system creates the necessary container element in the task container and defines a binding definition from the workflow to the workflow container.

    General information:

    The production order &ProductionOrder.Number& was released by &ProductionOrder.ChangedBy.Name& on &ProductionOrder.ChangeDate&.

  10. Set the Send express flag.
  11. Choose This graphic is explained in the accompanying text.

The system automatically creates a task that sends the mail. You must enter another abbreviation and name for the task:

Abbreviation: Zini_Mail

Name: Mail: Production order released

In the Create Object Directory Entry dialog box, choose Local object.

The graphical display is displayed again.

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.

To view the task created by the mail step, carry out the following steps:

  1. Open the step definition for the step Production order released by double-clicking it.
  2. On the tab page Control, double-click the task ID to open the task definition.

The screen Standard task: Display is displayed. If you want to test the task (see below), make a note of the task number assigned by the system.

Test the defined task

You can also test the task you defined by starting it in dialog.

  1. Choose Tools ® Business Workflow ® Development ® Runtime Tools ® Test Workflow.
  2. In the field Workflow, enter the number of the standard task you defined in the form TS<8-digit number> .
  3. You can also use the F4 input help.

  4. On the Input data tab page, assign the number of the production order you created to the ProductionOrder container element. To do so, use the F4 input help. Do not assign a value to the _WI_Object_ID container element.
  5. Assign your user name as the e-mail recipient to the ADDRESSSTRINGS container element of the task container. Choose This graphic is explained in the accompanying text to add an input line.
  6. Assign an X to the Express container element.
  7. Choose This graphic is explained in the accompanying text to start the test.

The mail is sent in the background. Go to the Business Workplace to check that the mail has arrived.

Further notes on sending mails

You have followed the above procedure to identify the recipient of the mail by a user name and assigned the task container to the ADDRESSSTRINGS container element. This container element is identified as a multiline element and can also store a list of mail recipients.

To assign more than one element to the container element ADDRESSSTRINGS, choose This graphic is explained in the accompanying text as required.

The ADDRESSSTRINGS container element can contain other values in addition to a user name. For more information on entry types, see Address Type. You assign the recipient type to the TypeID container element of the task container.

End of Content Area