Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 16 Next »

A custom SAP Workflow adapter can be used to facilitate the approval process for an existing SAP Workflow. This Adapter will provide a link between SAP and OneList, sending decision tasks to OneList and retrieving the associated actions (decisions made) from OneList, then updating the workflow with these decisions.

This section will detail the steps you need to follow for setting up such a custom SAP Workflow adapter that can connect to OneList V6. 

Note

This example is based on a standard SAP Purchase Order workflow

The SAP Package /IQX/ONELIST_ADAPTER contains the relevant development objects that will be used to set up the custom adapter.

Prerequisites:

  • OneList v6 Adapter framework is installed on your SAP Backend system 
  • SAP Workflow already completely built and and functional.

SAP Development tasks


  1. Create a custom implementation class based on the IQX Adapter base class:
    1. Use the Class Builder in SAP (t-code SE24) to open the class /IQX/CL_SAP_WL_ADPT.
    2. From the menu bar, select Edit → Create Subclass.
    3. Enter the name of the subclass in the Class field.
      • e.g. ZCL_OL_PO_ADAPTER
    4. Enter a short description in the Description field.
      • e.g. Purchase Order adapter for OneList
    5. Choose Save.
    6. Enter the Package and choose Save again.

  2. Redefine the following inherited methods (click on the method for the implementation example):
    1. EXECUTE_ACTION
    2. GET_ATTCHMENT_CONTENT
    3. GET_OBJECT_DETAILS

  3. Create the new methods (called by GET_OBJECT_DETAILS) to retrieve the correct PO information, as well as set up the Action buttons in OneList:
    1. GET_PO_DETAIL
  4. Check, Save and Activate the implementation class.

OneList Adapter framework configuration

  1. Maintain the OneList configuration tables via transaction /IQX/OL_CONFIG.
    Note 1: If the above-mentioned transaction does not exist, then follow the instructions for the previous version below.
    Note 2: Use the configuration / development development client, and transport this configuration to subsequent systems like QA and the Productive system. If you have a development Unit Test client, use SCC1 to copy the config from the configuration client.

    Note that there is a sequence to be followed, as per the tree structure, shown below:
    •  OneList Endpoint configuration
      Add entries for each of the systems in your SAP landscape. When you save this information, SAP will prompt you for a transport request. This will enable you to transport the entries to your Quality Assurance and Productive systems, as well as importing into your Development Unit Testing Client. 

      Notes:
      1. IQX will provide the values that need to be entered for the OneList URL and API Key.
      2. All entries should be marked as 'active' under normal circumstances. The OneList Adapter will dynamically determine the correct URL and API key based on the system that it is running in. Only in unusual situations will the endpoint be marked as inactive, but then the Adapter will not be able to call the OneList instance.
      3. There is a transaction (/IQX/OL_ENDPOINT) that can be run in the 'active' clients (Unit Test, QA and PRD) to maintain these values directly in the active/target system. This should only be used when emergency maintenance needs to be performed (DOS attack, etc.). The changed values should be copied back into the configuration client and added to a new transport.
      4. In the transaction /IQX/OL_ENDPOINT there is a 'Connection Test' option to check for the correctness of the URL and API key. This can be executed in each system:
         or, for example, 

    • OneList Integration configuration

      Note that you will (only once) have to configure a User integration entry. You may end up with multiple processes integrating with OneList, each of which will require their own entry here (and follow-on entries - see below). It does not matter how many processes you integrate with OneList, you will only need to do this step once - the processes all share the user integration. Add an entry to synchronise the SAP users with OneList, as follows: 



      There is no need to specify a Workflow task or FAB form for the user synchronisation.
    • Next, add an entry for the process you want to integrate between SAP and OneList.  If you are integrating OneList with an SAP Workflow, you will need to know the Standard Task ID (use the Workflow Builder (SWDD) or transaction PFTS to get this information) that contains the processing steps. Alternatively, if you are integrating a Fiori App Builder application with OneList, you will need to know the FAB Form name. For completeness, the screenshot below contains an example of both options - although we will only look at the Workflow integration below (the same steps will be followed for integration with a FAB App):


    • OneList Job Configuration
      Highlight the User integration entry (configured above, and remember this is only done once):

      Then double-click the 'OneList Job configuration entry in the tree structure. Configuring this step allows the Adapter framework to communicate with the OneList instance, specifically for user integration. IQX has provided a standard user integration Adapter class (/IQX/CL_OL_SYNC_USERS), but in rare circumstances your organisation may need to alter the behaviour of this class. In that case, you will have to create a subclass of this class (see step 1 above, under SAP Development tasks) and override the relevant methods to suit your needs. in that case, instead of /IQX/CL_OL_SYNC_USERS, use the name of your subclass in the below configuration steps. 

      You will need to define entries for the SYNC_USER_REQUEST and SYNC_USER_REQUEST_DELTA OneList User Integration APIs/Actions. For each entry, specify:
      • Adapter Class name: /IQX/CL_OL_SYNC_USERS, or your user subclass
      • Frequency in minutes: how often the background job calling this OneList API should run. We recommend between 5 and 30 minutes.
      • Active - A flag to set whether this job should run. During specific scenarios (shutdown, data take-on, etc.) you may want to disable individual API calls. Normal value will be ticked.

      The end result should look something like this:


      Now highlight the process integration point for which you want to configure the background jobs ("SAP WF Process" in this example):

      Then double-click the 'OneList Job configuration entry in the tree structure. Configuring this step provides a link between your SAP Adapter class (for example ZCL_OL_PO_ADAPTERcreated above) and the IQX OneList SAP Adapter framework.  For each entry defined here, the Adapter framework will create a background job at the specified frequency, thereby pushing / pulling data to and from OneList. You will need to define entries for the following 4 OneList Integration APIs/Actions:
      1. SYNC_ACTIONS
      2. SYNC_ATTACHMENTS
      3. SYNC_CHANGED_TASK_LIST
      4. SYNC_DELTA_TASK_LIST

        For each entry, specify:
        • Adapter Class name: your class created above, for example ZCL_OL_PO_ADAPTER
        • Frequency in minutes: how often the background job calling this OneList API should run. We recommend between 1 and 5 minutes at most.
        • Active - A flag to set whether this job should run. During specific scenarios (shutdown, data take-on, etc.) you may want to disable individual API calls. Normal value will be ticked.

          The end result should look something like this:




Background job setup

  1. Define a Scheduler background job via SM36 with the following values:
    Note: Do this in the client where you are executing your testing (Dev Unit Test or QAS) and in the live / productive client at go-live.
    1. Enter the Job Name - ONELIST_SCHEDULER
    2. Enter the Job Class - B
    3. Press the Step button
    4. Enter the User - e.g. OL_ADMIN (Note: This should be a service user account created for background jobs)
    5. Enter the ABAP Program Name - /IQX/ONELIST_JOBS
    6. Press the Save button
    7. Press the Start conditions button
    8. Press the Date/Time button and enter the scheduled start date and time
    9. Press the Period Values button and choose Other period from the options
    10. Enter 1 in the Minute(s) field
    11. Press the Save button to complete the setup

      Note

      Background jobs are usually created by the Basis resource and should be set up to use the existing service user account

      Once the OneList Scheduler background job has been created, it will automatically schedule the OneList Adapter jobs defined in theOneList Job configuration entries above (or the  /IQX/OL_JOB_DEF maintenance table, below).


Older version of the SAP Adapter
Note: Ignore this section if you used transaction /IQX/OL_CONFIG above.

Use transaction SM30 to edit the following tables directly, as follows;

  1. /IQX/OL_TASK_DEF - Task Definition
    1. Create a new entry with the following values: 
      • Job Type - The description of the type of task e.g. PO_APPROVAL
      • O.L.Task ID - The workflow task ID for the object you would like to retrieve the worklist items. e.g. TS20000166
      • Project Name - optional
      • Number - Page size (tasks processed in one run)
  2. /IQX/OL_JOB_DEF - Background Job Definition (more info on this - the entries in this table will be used to automatically create background jobs that will run to execute functionality)
    1. Create an entry for user sync
      • SYNC USER
        • Job Type: SYNC_USER
        • Class - /IQX/CL_OL_SYNC_USERS
        • Subcomponent - SYNC_USER_REQUEST
        • Short Description - Synchronize SAP users to OneList
        • Freq in mins - 5|
    2. Create a new entry for each of the following values:
      • SYNC ACTIONS
        • Job Type - Use the job type defined in the previous step e.g. PO_APPROVAL
        • Class - Name of the implementation class created in step 1.c. e.g. ZCL_OL_PO_ADAPTER
        • Subcomponent - SYNC_ACTIONS
        • Short Description - Synchronize adapter task actions to OneList
        • Freq in mins - 2
      • SYNC ATTACHMENTS
        • Job Type - Use the job type defined in the previous step e.g. PO_APPROVAL
        • Class - Name of the implementation class created in step 1.c. e.g. ZCL_OL_PO_ADAPTER
        • Subcomponent - SYNC_ATTACHMENTS
        • Short Description - Synchronize attachments to OneList
        • Freq in mins - 2
      • SYNC CHANGED TASK
        • Job Type - Use the job type defined in the previous step e.g. PO_APPROVAL
        • Class - Name of the implementation class created in step 1.c. e.g. ZCL_OL_PO_ADAPTER
        • Subcomponent - SYNC_CHANGED_TASK
        • Short Description - Synchronize the changed task list to OneList
        • Freq in mins - 2
      • SYNC DELTA TASK LIST
        • Job Type - Use the job type defined in the previous step e.g. PO_APPROVAL
        • Class - Name of the implementation class created in step 1.c. e.g. ZCL_OL_PO_ADAPTER
        • Subcomponent - SYNC_DELTA_TASK_LIST
        • Short Description - Synchronize detailed task list to OneList (delta tasks)
        • Freq in mins - 2
  3. /IQX/OL_ENDPOINT - OneList Service Endpoint
    1. Create a new entry with the following values: 
      • OneList URL - Specify the URL endpoint configured for OneList 
      • OneList Server App Path: /onelistserver/api/DataSync
      • SSL Client Identity: e.g. ANONYM
      • API Key: The unique API key used by the endpoint
      • Active: Checked



Suggested schedule for background jobs:

Sub Component

Frequency

SYNC_ACTIONS

Every 2 minutes

SYNC_ATTACHMENTS

Every 2 minutes

SYNC_DELTA_TASK_LIST

Every 2 minutes

SYNC_CHANGED_TASK_LIST

Every 2 minutes

SYNC_USER

Every 5 minutes

Make sure you return to the step above to complete the creation of the background job.

  • No labels