Start Orchestrator Function from another Orchestrator Function (Fire and Forget) python #2305
-
Below is a sample Eternal Function that I have written.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi @kanupriya15025, thanks for reaching out. Our As with any Activity, do recall that these may be called more than once, so it's important that you start your orchestrator in an idempotent fashion. You can do this in your Activity by first verifying that the orchestrator instanceID doesn't currently exist. This can be done via Please let me know if you need more guidance. Thanks! |
Beta Was this translation helpful? Give feedback.
-
This is the code that I improved : And the activity function looks like this. :
|
Beta Was this translation helpful? Give feedback.
Hi @kanupriya15025, thanks for reaching out.
Our
yield
'able APIs unfortunately cannot be invoked as fire-and-forget, and that means thatcall_sub_orchestrator
is a blocking operation. However, you should be able to start an orchestrator in a fire-and-forget way, but it needs a bit more work. The easiest path would be to replace yourcall_sub_orchestrator
call with acall_activity
. In that Activity, you can request a DurableOrchestrationClient object that you may use to start an orchestrator throughclient.start_new
. Does that make sense?As with any Activity, do recall that these may be called more than once, so it's important that you start your orchestrator in an idempotent fashion. You…