Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have one orchestration running (DurableOrchestrationContext) and I want it to queue up some work for another orchestration and then go to sleep until that is done.
I can make the first one go to sleep with context.WaitForExternalEvent() but it seems that the call to wake an orchestration can only be called from a DurableOrchestrationClient, not an OrchestrationContext.

Am I doing the wrong this altogether or...?

For background - the called orchestration just knows how to deal with projections to be run over a group of entities' event streams in a generic fashion. The caller wants this to happen for a specific projection and a specific set of entities... and to be woken up again for the next step when that is done.

What I have tried:

In the calling orchestration I wait for the called one with :
C#
Task<int> projectionsCompleted = context.WaitForExternalEvent <int>("ProjectionsRun");

..after the projection request has been put on a queue that triggers the second processor orchestration.

The processor runs all the projections, but how does it reply to the caller that all is done?

(I don't want to use the await because the caller must sleep for as long as it takes and not time out)

The nearest example I have found is this thread...
Posted
Updated 12-Jan-19 2:12am

1 solution

OK - I should be using sub orchestrations instead of inventing my own solution. Dicumented here...

Sub-orchestrations for Durable Functions - Azure | Microsoft Docs[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900