Skip to Content

Triggering workflows for MDF using OData API

This blog explains how you can trigger workflows attached to a MDF object using OData APIs.

I will demonstrate this with a simple custom MDF. The custom MDF has three fields externalCode as AutoNumber, User ID as USER and comments as String.

The workflow Manager_approval is attached to the above MDF. This Workflow has only one step which is basically routed to employee’s (User’s) manager.

In this example, I am making use of REST tool called POST MAN to make things simple. You can call Odata API’s from any web application.

1. Enter the Odata API URL based on your Data Center. Since my demo is in sales demo 4 the             following is the URL:

2. For this example, we can make use of Basic Authentication. Enter the technical user from your           demo instance in the following format as shown:

Make sure the technical user that you use does not have admin access to Odata API as                     shown below. Only a non admin user can trigger a workflow on OData call.

3. Construct the URL and message body for OData Upsert. For this example, we can make use             of Basic Authentication. Enter the technical user from your demo instance in the following                   format as shown:

Note: we need to pass a flag named ‘workflowConfirmed=true’ in the request URL. When                   workflow is triggered from UI, we see a popup asking for confirmation.This flag denotes this               behavior when creating data from APIs.

The User Alex Anderson which we are using has the user ID as ‘aaaa’ and manager as Joseph         tong:

4. Trigger the OData API call and check the response. If the response has the code ‘200’ then               your OData API call is successful:

5. Verify that the workflow is triggered for above OData upsert call. Login as manager Joseph                 Tong and we see the workflow as shown below:

You must be Logged on to comment or reply to a post.
  • Hi Neelesh,

    I’ve implemented this solution on postman and it works fine. However, I am unable to implement this same solution on HCI. I’ve created an iFlow that sends data to an MDF trough the standard Successfactors connector for HCI. I’ve tried on many different ways to add this URL parameter “workflowConfirmed=true” into the connector’s options without success. Have you ever tried to reproduce this solution on HCI? Do you have any idea on how to add this URL parameter into the SFSF connector for HCI?

    Thanks in advance.

  • Hi Neelesh,

    Just a quick update, SAP has implemented the feature of triggering workflows for MDF by using the SFSF adapter for HCI. There is a new Custom Query Field in the newer version of SuccessFactors adapter to handle that requirement. Kindly refer SAP documentation link for details.

    To see the new change, you will need to remove and then remodel the Successfactors adapter step once again in the latest Eclipse Tooling or Web UI.

    Please find below the test evidence:

    1. Configuration on Eclipse Tooling:

    2) Result on Successfactors > Manage Workflow Requests

    Best regards,

    Rodrigo D. Barbaceli

  • Hi Neelesh,

    Amazing post, it served me a lot and I was able to do it through HCI for several employees. The problem I have is for Composite MDFs, since I enter the records, but start the WF, is it possible to apply these steps to work these types of MDF?


    • Hi Jorge

      Thanks for your feedback. Workflows can currently be only attached to parent MDF. Workflows at composite are not supported