Skip to main content

Hello everyone, 

I’m trying to use Action Flow to trigger chained data jobs, meaning job A is executed, once it’s done job B is executed, once it’s done job C is executed. 
Ideally, I would like to launch Data Model Schedule from Action Flow, but I’m only able to launch data jobs and load data model. 

What I’ve done so far is: 

1. Creating json file with all my jobs ID (A,B,C) - Parse Json Module
2. Creating a POST request using API Celonis Key, to access data pool and launch jobs, load data model -    HTTP Make a request Module
3. Using Iterator module to repeat step 2 for all job ID

The issue I’m facing is, job A need to be completed before launching job B and same for job B and C (this is what I’m calling chained data jobs). Configuring a Sleep in the iterator loop greater than the running time of my jobs is working, but not optimized. 

My question is: 

Do you know if there is a way to trigger chained data jobs in Action Flow, meaning triggering Data Model Schedule or launching several jobs at the same time, that put in a queue until the previous one is ended. 

Thank you for your help :) 

Hi ​@alexandre.vilan12

 

It is possible to run a schedule via an Action Flow. 
You should use the HTTP module as described. The Endpoint should be:

https://<TEAM>.<REALM>.celonis.cloud/integration/api/pools/<POOL_ID>/scheduling/<SCHEDULE_ID>/execute

Note that this is using the legacy API of Celonis. Somehow, the functionality to trigger schedules got removed in the second version of the API. To illustrate, this will not work:

https://<TEAM>.<REALM>.celonis.cloud/integration/api/v2/data-pools/<POOL_ID>/scheduling/<SCHEDULE_ID>/executeo

 

I hope this helps!


Hello ​@janpeter.van.d,

Thank you very much for you answer. Of course this is much more simple knowing it’s possible to launch data model schedule. Interesting to get the details between legacy api and current one. It’s working for me now! 

Have a nice day, 

Alex


@alexandre.vilan12

Would be interesting indeed to know the differences, but as far as I know, this was never shared. I guess it’s more a back-end thingy.


Hi ​@alexandre.vilan12,

Have you considered using the ML Workbench instead?

There is an option to set the wait parameter to true for a Data Job Execution.
data_job.execute(wait=True)

This way you can just execute your schedule sequentially.

Hope this help.
 


Hi ​@jakob.hanse

I considered doing with ML workbench but it’s easier to use Action Flows in our case and being able to trigger a schedule already answers my need! But thank you for you answer, it’s still interesting to get it in mind. 

Have a nice day.