0

We are trying to see if Durable function can replace Siebel has our Workflow orchestrator. Most of my questions were answer by the online doc, but one remain.

Can it be stop by and external events and put to wait? In our case our workflow doesn’t know that another WF can stop it. So we can’t use “waitForExternalEvent”.

Let’s say WF A is running and the client launch WF B.

B need to put A in a wait state until it’s completed.

So the question is : is it possible to do so with durable functions in some way ?

Thank you for your help.

JRajot
  • 1

1 Answers1

1

Yes, and in fact there's such pattern "External Event":

https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-external-events?tabs=csharp

Thiago Custodio
  • 17,332
  • 6
  • 45
  • 90
  • I’ve read that article already and I’m not sure to understand. The WF A is not waiting for anything... does it mean we will have to implement WaitForExternalEvent and check if an event is raise? Cause in our wf it doesn’t mean they will be stop by WF B all the time. Most of the time it continues till the end ... – JRajot Mar 17 '21 at 18:07
  • if you scroll down, You'll see a POST approving: – Thiago Custodio Mar 17 '21 at 19:08
  • POST /runtime/webhooks/durabletask/instances/MyInstanceId/raiseEvent/Approval&code=XXX Content-Type: application/json "true" – Thiago Custodio Mar 17 '21 at 19:08
  • so it will await until the external event happens. You can also specify a "cancelation" e.g. if nothing happens in 48 hours, discard the await... – Thiago Custodio Mar 17 '21 at 19:11
  • Ok I’ll look at it with our dev team to see if this could work for us! Thank you for your help! – JRajot Mar 19 '21 at 15:47