Using the Task Gateway Service

Objective

After completing this lesson, you will be able to use the task gateway service

Create a Tile in a Catalog

Perform the following steps:

Steps

  1. Log in to the launchpad designer, transaction /UI2/FLPD_CONF.

  2. Choose a catalog from the catalog list.

    (You can choose the standard technical catalog, SAP_FND_TC_T, which is shipped with My Inbox.)

  3. Choose the Add Tile icon.

  4. In the Select a Tile Template screen, choose App Launcher Dynamic template.

  5. An instance of the tile template is created in the selected catalog along with the other tiles.

  6. Select the newly created tile; it will take you to tile configuration screen.

  7. In the general section, give a title and subtitle and select an icon for the tile.

    Note

    The tile title should be the same as the title property of the target mapping used.
  8. In the Dynamic Data section, provide a service URL: /sap/opu/odata/IWPGW/TASKPROCESSING;mo;v=2/ScenarioCollection?$filter=key%20eq%20'<ID of a scenario definition>.

  9. In the Navigation section, select the Use semantic object navigation check box.

  10. In the Semantic Object field, select WorkFlowTask.

  11. In the Action field, enter displayInbox (if you are using the standard technical catalog; otherwise, enter the appropriate action defined in the target mapping).

  12. In Parameters, enter scenarioId=<ID of a scenario definition>.

  13. Save.

Task Gateway Service

The figure shows SAP Fiori Approve Requests and Unified Inbox

My Inbox in SAP Fiori

The figure shows My Inbox as unified inbox

The main benefits of the My Inbox application are as follows:

  • It enables the management of tasks across different devices (desktop and mobile).

  • It enables the management of tasks across different systems.

  • It provides full integration in the SAP Fiori launchpad.

  • It provides access to both SAP-delivered and custom-built workflows by using the SAP Gateway.

My Inbox Launchpad Overview

The figure shows Overview of My Inbox Launchpad

In launchpad, you can configure how My Inbox is called. You can either call a dedicated scenario only (for example, show only Leave Requests) or you can call all tasks for a user.

In launchpad, several tiles can be created that call My Inbox in a customized way so that it only shows specific items, such as leave requests, sales orders, and so on.

How to Use the Task Gateway Service

In this demonstration, the trainer will demonstrate the steps of the following exercise. So, for the steps and data of this demonstration, refer to the Use the Task Gateway Service exercise.

Use the Task Gateway Service

Business Scenario

You want to test the task gateway service, test the My Inbox, and define and test a workflow scenario.

Note

In this exercise, when a value or an object name includes ##, replace ## with the number that your instructor assigned to you.

Task 1: Create and Test a Notification of Absence

Steps

  1. Create a notification of absence using the transaction SWXF.

    1. Log on to the system.

      Your trainer will inform you about the required system.

    2. Start the transaction SWXF.

    3. In the Personal Data section, enter a name of your choice and in the Absence Data, section enter a range of dates of your choice.

    4. Choose Save.

  2. Test the gateway service TASKPROCESSING in the Gateway Client to read your notification of absence.

    1. Start transaction /IWFND/MAINT_SERVICE Activate and Maintain Services.

    2. In the transaction Activate and Maintain Services, choose Filter.

    3. With all of the other fields empty, in the External Service Name field, enter *task*.

    4. Choose Continue.

    5. In the Service Catalog area, select the external service name ZTASKPROCESSING with version 2.

      Note

      It might be required to scroll.
    6. In the ICF Nodes area, choose SAP Gateway Client.

    7. In the Gateway Client, choose Execute.

    8. Examine the entities in the HTTP Response area.

    9. In the Request URLfield, replace ?$format=xml with TaskCollection.

    10. Choose Execute.

    11. Search for your notification of absence in the HTTP Response.

  3. Open the SAP Fiori app My Inbox in your SAP Fiori Launchpad and search for your notification of absence.

    1. Start the SAP Fiori launchpad.

    2. Choose My Inbox.

      Note

      It may take a while, before the workflow displays.
    3. Search for your notification of absence.

Task 2: Define the Workflow Scenario

Steps

  1. In your system S4D, define a workflow scenario, usable for all consumer types.

    Use the following data:

    FieldValue
    Scenario IdentifierBIT602_##_SCENARIO
    Scenario Display NameWorkflow Scenario Group ##
    SAP System AliasLOCAL_TGW
    Task TypeTS30000016

    Hint

    The path in the SAP Reference IMG to the Task Gateway Service settings is ABAP PlatformGateway Service EnablementContentTask GatewayTask Gateway Service.

    1. In your system start the transaction SPRO.

    2. Choose SAP Reference IMG.

    3. Expand the menu path ABAP PlatformSAP Gateway Service EnablementContentTask GatewayTask Gateway Service.

    4. Choose the activity Scenario Definition.

    5. Choose New Entries.

    6. In the Scenario Identifier field, enter BIT602_##_SCENARIO.

    7. In the Scenario Display Name field, enter Workflow Scenario Group ##.

    8. Press Enter.

    9. Check the version of the service. If it is 1 change to 2. To do so, you have to scroll to the right.

    10. Choose Save.

    11. Select the customizing request provided by your trainer.

    12. Select your scenario definition in the table.

    13. In the dialog structure, double-click Assign Consumer Type to Scenario.

    14. Choose New Entries.

    15. In the table Task Gateway Consumer Type, add DESKTOP, MOBILE, and TABLET; each in a single row.

    16. Choose Save.

    17. In the dialog structure, double-click Task Definition for Scenario.

    18. Choose New Entries.

    19. In the SAP System Alias field, enter LOCAL_TGW.

    20. In the Task Type field, enter TS30000016.

    21. Choose Save.

Task 3: Test Your Workflow Scenario

Steps

  1. Test your workflow scenario in the Gateway Client.

    1. Go back to the SAP Easy Access menu.

    2. Choose SAP GatewaySAP Gateway Client.

    3. In the SAP Gateway Client, in the Request URL field, enter: https://s4dhost.wdf.sap.corp:44311/sap/opu/odata/IWPGW/TASKPROCESSING;v=2/ScenarioCollection?$filter=key eq ('BIT602_XX_SCENARIO')

      Do not forget to replace ## by your group number.
    4. Choose Execute.

    5. Examine your workflow scenario in the HTTP Response.

    6. The number should be the same as your number of notifications of absence.

      SAP Gateway Client, Examine your workflow scenario in the HTTP Response

      Note

      The figure shows an example of group 04, and the workflow ran three times.