5

How to trigger a Scheduled IFLOW explicitly via an endpoint in Cloud Integration...

 1 year ago
source link: https://blogs.sap.com/2023/02/16/how-to-trigger-a-scheduled-iflow-explicitly-via-an-endpoint-in-cloud-integration-ci/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
February 16, 2023 1 minute read

How to trigger a Scheduled IFLOW explicitly via an endpoint in Cloud Integration (CI)

Introduction:

As an Integration developer, sometimes you may use same sub-process or process multiple times and sometimes the same subprocess is required to use in another Integration process. For this kind of situations, we can handle via below approach. There may be multiple Integration processes in one single main Integration process (In one Artifact).

Motivation:
You have a scheduled flow and now you want to trigger it explicitly via an endpoint for adhoc or test
runs.

Solution:
Assume you have the following scheduled run that runs every day at 9am.

Capture-5.jpg

Now you also want to be able to trigger this flow through an endpoint.
Create a local sub-process and move all the above logic to it.

Now create 2 main integration flows:

1) Scheduled flow: will get triggered every day at 9am and pass the control to the sub process.
2) Externally triggerable flow: will receive the call and pass the control to the above sub-process.

Capture-6.jpg

Both will then receive the request and pass it to the common sub-process for processing.

Add an Exception Sub-process to the sub-process and end it with Error End Event so that the Exception.

state is sent back to the main process. Note that in monitoring, both the integration flow executions will have the same name.

You can move these into different integration flow artifacts and call each other through SOAP endpoints.

This however has a disadvantage. Every call to another integration flow (even if it is deployed on the
same tenant) shall be an out-of-the-tenant call. This will have performance implications on the process execution.

Note:

Please note that there is a development topic planned by SAP in future release that will solve this – so calls to other artifacts that are deployed on the same tenant shall be executed as in-process calls.

Conclusion –

Hope this document will help to beginners to understand CPI concept of Creating an endpoint and how to trigger a scheduled flow via endpoint. Happy Learning 🙂


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK