Defining a Task to be Executed as an Electronic Form 

Prerequisites

You are familiar with the procedure for defining tasks . For this reason, a recap of only the most important steps will be provided here.

You have defined a workflow and now want to add a single-step task that can be processed with an electronic form.

The part of the task definition that is relevant to forms essentially entails

Procedure

Define the Form Task

Define the single-step task as a form task:

  1. Create a single-step task for the form application that you want to execute from a workflow. You can specify any name you want for this task.
  2. Enter the object type FORM .
  3. Enter the Process method.
  4. Choose YES to confirm that elements that do not exist in the task container are to be copied from the method parameter container of the object method.

The system automatically creates the four parameters R3FForm ( form name), R3FFormTyp ( form type), Workitem of the referenced object method, and CompletionDocument as elements in the task container. A binding definition between the task container and the method container has also been created for these elements.

The three method parameters cannot be completely copied automatically to the task container. For this reason, make sure that you carry out the following steps:

  1. Display the task container by choosing Goto ® Container.
  2. Delete the Workitem element and exit the screen.
  3. Choose Goto ® Binding ® Object method to start the Binding Editor to define the binding between the task container and method container.
  4. Enter the following binding:

Workitem <== &_Workitem&

Extending the Container Definition

You can add other container elements to a container as form-specific extensions. The contents of these elements can then be displayed and edited in the fields on the form. All of the data that is to be displayed to the form user must exist as container elements in the task container.

  1. To edit the task container, choose Goto ® Container.
  2. To add elements to the task container, choose Edit ® Create and follow the standard procedure:
  3. Remember that only elements that reference fields can be transferred to the form application. Do not forget to identify the individual elements as import or export elements (or both), depending on how they are to be used.

  4. Create a suitable container element for all of the fields you want to fill in the form.
  5. Exit the Container Editor.

Agent Assignment

When you define a single-step task, you must specify its possible agents.

  1. To do so, choose Tools ® Agent assignment ® Maintain.
  2. Save your task definition in the development class that you entered in the Customizing activity for maintaining the namespace.

Assigning Initial Values

The single-step task must now be told the name of the form that is to be executed. For this reason, the form type and form must be assigned as initial values when you define the task.

  1. To assign initial values, choose Goto ® Assign initial values.
  2. Assign appropriate values to the R3FFormTyp ( form type) and R3FForm ( form name) container elements.

If you are using the Visual Basic form APPROVE.EXE enter EXE as the form type and APPROVE as the form name.

If you are using the Outlook form template WFAPPROV2.OFT enter OFT as the form type and WFAPPROV2 as the form name.

Further Information

You can also enter a long-text description for your single-step task to inform the mail recipient that he or she can start the form application by executing the attachment.

If you do not enter your own long-text description, a standard text will be displayed.