Akshay07
Contributor

Process Completion info via API Calls

We are using Databricks for Anaplan API and Airflow for job execution.

Context : Process 2 (Spoke) is dependent on Process 1 (Hub). This means Process 2 should only start when Process 1 is completed and both should not run parallelly.

Issue : Right now the backend only tells you whether the process was successfully triggered or not… it doesn’t check whether the process actually completed. This leads to Process 2 and Process 1 running simultaneously.

Question : . Is there any way to capture Process 1 completion info in backend via api calls?

1 ACCEPTED SOLUTION

接受的解决方案
christophe_keom
Contributor

Hi,


You can achieve that by checking the status of the process triggered before starting the new one.
Basically, after executing your POST request that starts your process, check the progress of your execution by using GET request with the task ID Anaplan sends you after a successful POST.


The GET request is like this:

https://api.anaplan.com/2/0/workspaces/{{workspaceID}}/models/{{modelID}}/processes/112000000031/tas...}}
Usually we do a loop with those GET requests until you get a status similar to this:

christophe_keom_0-1625508723472.png

You then can start the second process.

Christophe K

View solution in original post

3 REPLIES3
christophe_keom
Contributor

Hi,


You can achieve that by checking the status of the process triggered before starting the new one.
Basically, after executing your POST request that starts your process, check the progress of your execution by using GET request with the task ID Anaplan sends you after a successful POST.


The GET request is like this:

https://api.anaplan.com/2/0/workspaces/{{workspaceID}}/models/{{modelID}}/processes/112000000031/tas...}}
Usually we do a loop with those GET requests until you get a status similar to this:

christophe_keom_0-1625508723472.png

You then can start the second process.

Christophe K

Akshay07
Contributor

Hi Christophe,

Thank you for your reply. I found this on theAnaplan Integration API Guide and Reference · Apiary

Akshay07_0-1626069219807.pngAkshay07_1-1626069240956.png

Is this what you're talking about ?

Thanks,

Akshay

christophe_keom
Contributor


Yes indeed!

Just be sure you are using Process information (what you've shown is for imports). There are no real difference though.