Comments (9)
Hi @richardjharding thanks for bringing this up. I haven't added this method to the API yet.
It might make sense to add a new function to Orchestrator
module, something like Orchestrator.runEternal
. Would that make sense?
from durablefunctions.fsharp.
Yes that sounds perfect, btw my approach didn't work I think because I couldn't await the result of the Orchestrator.run and so continue as new ended up replaying some of the already running orchestration (that's at least what it looked like)
I tried adding the function to the Orchestrator myself but couldn't work out what I needed to add to the CE to make it work
from durablefunctions.fsharp.
I pushed a quick-n-dirty version of it into #14. Is there a way you could try it for your scenario before I merge?
from durablefunctions.fsharp.
Great I'll give a test first thing tomorrow, one thing occurred to me there may be a scenario where the call to continue as new would need to be conditional - or some check on stored state, or external event would mean that continue as new would not be called and orchestration would terminate? Do you think that would be accommodated?
from durablefunctions.fsharp.
Great!
Do you think that would be accommodated?
Not now. I want to give it another thought tomorrow. My first idea is to return something from the workflow that would indicate whether continuation is needed. It could be just a boolean or an Option<T>
with Some T
meaning continue and pass T
as the parameter to ContinueAsNew
(means we need to support getting that value too, which makes sense). Although passing Some null
doesn't sound awesome, maybe I'd come up with a brand-new DU.
Any ideas are more than welcome!
from durablefunctions.fsharp.
ok have given #14 a quick test and its working perfectly - I can see the new execution id in the history table so looks good to me
As for the options you mention - I do think it needs some way to pass a param to the ContinueAsNew
as it would match the C# implementation - agree passing Some null
doesn't seem very F# - as you say perhaps some new DU - something like a Result type maybe?
from durablefunctions.fsharp.
@richardjharding I took a stab at stoppable orchestration - see the latest commit in the same PR.
Now, the word "eternal" looks really weird in the context of stopping... Any ideas about better names? On the other hand, this is what the original library uses...
from durablefunctions.fsharp.
Works great - I like the "command" approach - I think Eternal is fine - I think in this case its better to match the C# implementation/docs - makes it easier to discover and translate other samples
from durablefunctions.fsharp.
I merged the PR and bumped a new version of the nuget package - let me know if you get any issues with it. Thanks for helping out!
from durablefunctions.fsharp.
Related Issues (9)
- Implement orchestrators calling suborchestrators HOT 1
- Multiple Activity.All in single orchestration ce ? HOT 1
- Move to use DurableOrchestrationContextBase to facilitate unit testing via mocks HOT 5
- The Hello World application inside getting started doesn't start the orchestrator HOT 1
- A version of All for fire-fire-and-forget fan-out HOT 3
- POSTing input parameter HOT 3
- Function will not start when using Paket for package management HOT 4
- Catch exceptions raised by ActivityFunctions HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from durablefunctions.fsharp.