Technical Articles
Implementation of Workflow in SAP Cloud Platform with back-end as S/4Hana On-premise leveraging Odata, Gateway, Cloud Connector, API management and SCP Workflow Service
In this blog we will see, how can we implement Workflow in SAP Cloud Platform with back-end as S/4 Hana On Premise leveraging On-premise Gateway, Cloud connector and SAP API management – Real time scenario.
In a Hybrid cloud scenario, private data are stored in On-premise system. This is most popular architecture now-a-days for SAP cloud implementation.
Flow-
In this blog we are taking one of the most used scenario in Work Order management in ISU operation.
The below is the operation flow.
- Work Order will create in OnPremise System.
- It will Approved or Reject in SAP Cloud Platform using My Inbox Fiori APP.
- If Approved Work Order will automatically released.
Tool and Services used-
- SAP Odata on Hana On-premise System
- SAP Gateway on Hana On-premise System
- Cloud Connector to connect Hana On-premise with SAP Cloud Platform
- SAP API Management on SAP Cloud Platform
- SAP Workflow on SAP Cloud Platform
- SAP Fiori on SAP Cloud Platform
Architecture-
Development :
- Create a Gateway service in OnPremise system and activated it.
2. In SAP Cloud Platform Cloud Connector integrated .
3. Create an API with Odata of On-premise .
4. Now create a Workflow in SCP.
For GetWorkOrder consume the API with GET operation.
For WorkOrderRelease assign the user for taking decision.
For UpdateWorkOrder use the API with Put operation.
Please Note: In this scenario we take help of API Management to create micro-service. But without API we can also directly consume Odata service using Odata Provisioning in SCP. But using a API there are lots of advantage of micro-services.
Operation-
- Create a Work Order in On-Premise System.
2. Now the work Order have only CRTD Status , not have REL status.
3. Now in SAP Cloud Platform, we can see a New workflow instance for Work Order Release workflow running.
4. In the Fiori My Inbox app on SAP cloud Platform, user got item to take action : Approve or Reject.
5. After Approval, workflow got completed.
6. Work Order in On-Premises system changed to REL status .
Your requirement fulfilled.
Summary: Though it is quiet complex development architecture, but its have lots of flexibility, Error handling tool, Policies for thread protection, cyber attack of API are added advantage.
Have a great day.
Good end to end process explanation Anjan : )
Thanks for sharing great content as you do always.
Hello Anjan,
Nice blog. Just one question: you could have directly consumed the OData service in workflow. Any reasons for exposing it as an API? Anjan Paul
Thanks Archana .
You are right. I already mentioned in the blog about Odata Service direct consume. But it is showed here about another way of implementing workflow using API. API is beneficial in some cases than direct odata consume like Quota policies , transformation policies, securities policies which are needed very much at the time of cross system connection with cloud.
Hi Anjan,
Excellent blog, I have a question: What event does the workflow start? I see that the "GetWorkOrder" task does a Get to the API, but which event triggers that Get? I can not understand how to start the workflow.
Thank you for sharing,
Regards
Hi Lucas,
To call workflow please use SAP cloud workflow API.
Thanks
Hi Anjan,
Can you please share the snippet how you triggered Workflow instance from S4. Is it in Exit of Transaction Save or wherever it is.
Not sure how to call the workflow API, Post Method of Workflow instance (V1/workflow-instance). It would be helpful if you could share it.
Regards
Pavan Kumar
Hello Pavan,
Your answer is probably in this blog (see the last section)
https://blogs.sap.com/2018/12/04/hunting-zombies-the-scp-way/
Regards,
Archana
Hello Anjan Paul,
In my development, i need to have valueHelp inside workflow HTML5 can it possible. Data will be consumed from S4 onPremise system.
Regards,
Sai Santhosh
Hi Anjan,
Can you please let me know how is your detail page with action buttons in MY INBOX coming? Are you using Workflow Forms or an HTML5 app to get the data from S/4 HANA?
Thanks & Regards,
Rutuja.