Show TOC

Defining a Task Gateway ScenarioLocate this document in the navigation structure

Use

In Task Gateway use scenarios to group different task activities that are visualized by the same business application.

Defining a New Scenario

To define a new scenario, proceed as follows:

  1. In your SAP Gateway system, start transaction SPRO.

  2. Choose SAP Reference IMG.

  3. Choose Start of the navigation path SAP NetWeaver Next navigation step SAP Gateway Service Enablement Next navigation step Content Next navigation step Task Gateway Service End of the navigation path.

  4. Open the Scenario Definition activity. The Change View "Scenario Definition": Overview page is displayed.

  5. Choose New Entries.

  6. In the Scenario Identifier field, enter a key for the scenario.

  7. In the Scenario Display Name field, enter a name to describe the scenario.

  8. In the Scenario Order field, you can specify the scenario ranking within the Scenario List (optional).

  9. In the Technical Service Name field, use input help (F4) and select the scenario service identifier and version. TASKPROCESSING is displayed as default.

  10. In the EntitySet External Name field, specify the entity to which the URL navigates.

  11. In the Property External Name field, define the property name of the specific entity containing the Task Definition ID.

  12. In the Default Sort by Property field, you can enter the property by which the application will sort the list (optional).

  13. Select the MassAction checkbox to enable actions to be performed on multiple items at the same time, for example, mass approval.

Note

If the scenario is not part of the business workflow engine and you want to see the number of tasks pending for this scenario, enter in the Class for Scenario Count field, the name of the class that implements the /IWWRK/IF_TGW_SCENARIO interface in the SAP system.

Assigning Consumer Type to Scenario

To assign a consumer type to the Task Gateway scenario, proceed as follows:

  1. In the Scenario Definition table, select the row containing the scenario to which you want to assign a consumer type.

  2. In the Dialog Structure section, double-click Assign Consumer Type to Scenario.

  3. Choose New Entries.

  4. In the Task Gateway Consumer Type field, use input help (F4) and select the desired consumer type.

Assigning Role to Consumer Type and Scenario

To assign a role to the consumer type and scenario, proceed as follows:

  1. In the Task Gateway Consumer Type table, select the row that contains the consumer type for which you want to make the assignment.

  2. In the Dialog Structure section, double-click Assign Role to Consumer Type and Scenario.

  3. Choose New Entries.

  4. In the Role column, use input help (F4) and select the relevant role.

Setting Task Definition for a Scenario

To set a task definition for a scenario, proceed as follows:

  1. In the Dialog Structure section, double-click Scenario Definition.

  2. Select the row that contains the scenario for which you want to set the task definition.

  3. In the Dialog Structure section, double-click Task Definition for Scenario.

  4. Choose New Entries.

  5. In the Task Type field, enter the relevant task ID for the selected scenario.

  6. In the SAP System Alias field, enter the source system alias for the task type. The Task Gateway service should be connected to the selected system aliases.

After you have defined a new scenario, you can consume it in your application using the Consumer Scenario collection. For more information, see Consumer Scenario Collection.