Defining a Task to be Started with a Web Form 

Prerequisites

You are familiar with the procedure for defining tasks.

You want to define the task (single or multistep task) that is to be started by the Web form.

The part of the task definition that is relevant to forms essentially entails extending the container definition to include the elements that are to appear as fields on your form.

Procedure

Defining a Task

  1. To create the task, choose Tools ® Business Workflow ® Development ® Definition tools ® Tasks/ Task groups ® Create.
  2. Enter the type of task you want to create in the Task type field.
  3. Only workflow templates (task type WS ) and standard tasks (task type TS ) can be used with Web forms.

    Then choose Task ® Create.

  4. Define the basic data of your task.
  5. Extending the Container Definition

    Now extend the container of your task to include the elements that are to be filled via the form.

  6. To launch the container editor, choose Goto ® Container.
  7. The container already contains the standard system elements. To add elements to the container, choose Edit ® Create.
  8. You can only transfer single values (not object references) from the form. If you want to add container elements for this purpose, therefore, you must always create them as single-line elements with a data type reference to a table field in the dictionary.

  9. Create a suitable container element for all of the fields you want to fill in the form. Define these elements as import elements.
  10. When generating the HTML template in the SAP@WebStudio the container element name is also used as the name of the input field. It is therefore recommended that you choose "meaningful" names (although the HTML templates can of course be processed at any time).

    Note that when later changes are made to the name of container elements, the web transaction must be regenerated.

    Further Procedure

    Complete the task definition:

  11. Declare the possible agents that are allowed to start the task by filling out and submitting the form.
  12. Save your task definition in the development class that you entered in the Customizing activity for maintaining the namespace.
  13. If the task is a multistep task, maintain the associated workflow definition.