Unit 7: Editing Workflow Definitions 

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. The Workflow Builder is then launched with the workflow that was processed last. If the required workflow is not opened, choose and enter the abbreviation of your workflow. You can use the F4 input help and enter an abbreviation to search for your workflow. Choose .
  2. As well as the initial workflow definition, your workflow also contains the defined triggering event. If you are not in change mode, choose .

  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.
  1. Enter the subject of the mail.
  2. Production order released

  3. Enter the text for the mail.

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 . The system fields and the container element of the workflow container are displayed in the new dialog box. Double-click the expression. Choose to toggle 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&.

  1. Set the Send express flag.
  1. Choose .

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

Abbreviation: Z ini _Mail

Name: Mail: Production order released

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

The graphical display is displayed again.

Concluding step definition

Choose .

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 ® Start Workflow (Test Environment).
  2. In the field Task, 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 pushbutton.

  4. Choose Input data to fill the ProductionOrder element in the task container with a value for the production order before execution.
  5. In the Initialize Container dialog box, 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.
  6. Choose to display all the container elements.
  7. Assign your user name as the email recipient to the ADDRESSSTRINGS container element of the task container.
  8. Assign an X to the Express container element.
  9. Choose .
  10. Choose to start the test.

The mail is sent in the background. Open your 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 ADDRESSSTRINGS container element in the Container Editor, position the cursor in the ADDRESSSTRINGS line and choose .

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