Show TOC

Creating and Working with SAP Business Workflow TemplatesLocate this document in the navigation structure

This section will guide you to create SAP Business Workflow templates as Tasks items, and to work with them in Microsoft Outlook.

Prerequisites

Make sure that you have the URL of the workflow OData service you want to use, and you have permissions in the SAP Gateway system to access the service.

Context

You can create templates that interface with SAP Business Workflow objects for use as Tasks items in Microsoft Outlook. For example,Time Recording, Leave Request Approvals, and many more, are business solutions that are best represented as Tasks items in Microsoft Outlook.

GWM Outlook add-in supports the following OData services based on SAP Business Workflow version 1.0:

  • WFSERVICE
  • TaskProcessing

Creating the Workflow Add-In Template

Context

To create the workflow template, proceed as follows:

Procedure

  1. Open the GWM Outlook 2010 Add-in or GWM Outlook 2013 Add-in wizard.
  2. Select Tasks in the Select Template list, and enter a name for your new template.
  3. Choose Next; the Select Service page displays.
  4. Provide the Service URL to access the workflow service, or choose Browse to select the service in the connected the SAP Gateway system.
    • To create a workflow template that calls the OData service, WFSERVICE:
      1. Select WFSERVICE in the Service Explorer window.
      2. Choose Next. The Defined Settings page displays the predefined mappings between the SAP Properties and the Outlook Properties.

        You can view the predefined capabilities that have already been enabled in the Enabled Functionality pane.

    • To create a workflow template that calls the OData service, TaskProcessing:

      1. Select TASKPROCESSING in the Connection to Service Server window.
      2. Choose Next. The Defined Settings page displays the predefined mappings between the SAP Properties and the Outlook Properties.

        You can view the predefined capabilities that have already been enabled in the Enabled Functionality pane.

  5. Click Next, the Additional Properties page displays.
  6. Keep the default selection for the Custom Tab, and enter a name in the Custom Tab Name field. In addition, the navigation properties in the service are selected in the Select Associated information Tabs.
  7. Click Next, the Project Summary page displays, and click Generate Project when done.
    The GWM Outlook Add-in template for your workflow is created.
  8. Provide the user credentials, if the specified SSO is Basic in the ADM, or the APP.CONFIG file.
    • In the Solution Explorer in Microsoft Visual Studio, open the class, Start of the navigation path BusinessEntity Next navigation step BusinessConnectivityHelper.cs End of the navigation path.
    • Search for the method, HandleSAPConnectivity, and provide the credentials as shown below:
      switch(authenticationType)
      			{
      				case AuthenticationType.BASIC:
      					webRequest.Credentials = new System.Net.NetworkCredential("<username>", "<password>");
      					break;
      
      			}
      			ssoProvider.SAPCredientials(ref webRequest);
              }
  9. Save, build and run the project in Microsoft Visual Studio.
    Note To run the project locally in Microsoft Outlook, build and run the project in Microsoft Visual Studio. The template with data type mismatch will not be displayed in the Microsoft Outlook.
    Microsoft Outlook opens, and the workflow add-in is now available in the menu bar.

Working with the Workflow Template

Procedure

  1. Select your GWM add-in from the Microsoft Outlook ribbon.
  2. Click on the button Start of the navigation path GetAll  Next navigation step  Business Workflow End of the navigation path to retrieve records from the SAP system.
    Note The name of the button in the GetAll drop-down may vary as per the name provided in the GWM Outlook Add-in wizard.
    The Tasks items in Microsoft Outlook are retrieved from the SAP system based on the mapping defined in the GWM Outlook Add-in wizard.
  3. Select any Tasks item in Microsoft Outlook and double click to open it.
  4. Click on the < GWPAMProjectName> tab on the menu bar to view all associated actions.
    The workflow actions are displayed in the Microsoft Outlook ribbon.
  5. Do the following:
    1. Apply Decision: - Choose this option to process the task.
    2. Forward:- Choose this option to forward the task to another recipient.
      The Forward Task window appears. Enter the recipient's address and comments, and choose Forward
    3. Reserve Release:- Choose this option to save a draft for this task, and to act on it later.