Giter VIP home page Giter VIP logo

Comments (7)

danielgerlag avatar danielgerlag commented on July 18, 2024

Hi Marc,

We don't have that functionality (yet), for now would it make sense to implement a single WaitFor and branch the workflow based on the data passed to that WaitFor?
Looking forward, I will definitely keep this scenario in mind for a future release.

from workflow-core.

marc-mueller avatar marc-mueller commented on July 18, 2024

Hi Daniel

Thanks for your reply. If this is the only option right know, we have to think about that. The logic is a little bit more complex then described above and we'll end up with a loop and multiple if statements.

I played around with your cancellable task, but without any success. Does the waitfor fully block the execution internally? Would a waitany task for a parallel fork be an easier solution?

Another short question: Is there any way to check if a published event was handled?

Thanks,
Marc

from workflow-core.

danielgerlag avatar danielgerlag commented on July 18, 2024

Hi Marc,

So the CancellableStep class is used internally, currently only by the .Recur fluent builder over here:

https://github.com/danielgerlag/workflow-core/blob/master/src/WorkflowCore/Services/FluentBuilders/StepBuilder.cs#L360

I don't see why we couldn't overload the .WaitFor methods to also use this wrapper, over here:

https://github.com/danielgerlag/workflow-core/blob/master/src/WorkflowCore/Services/FluentBuilders/StepBuilder.cs#L114

If we had to implement the cancellation functionality as per it's use on the Recur step, would that solve your problem?

from workflow-core.

marc-mueller avatar marc-mueller commented on July 18, 2024

Hi Daniel

Yes, that would really help if we could wrap the WaitFor in a CancellableStep. I tried exactly this with an extension method. Did I understood it correctly that I can provide an expression which is evaluated over and over and if true then the contained step is cancelled?

Could you show me how I correctly wrap it? I think I did it wrong.

Best,
Marc

from workflow-core.

danielgerlag avatar danielgerlag commented on July 18, 2024

Hi Marc,

I have just published version 1.3.3 to NuGet, which adds a parameter to the WaitFor methods, allowing you to specify a cancel condition. See usage in the test here: https://github.com/danielgerlag/workflow-core/blob/master/test/WorkflowCore.IntegrationTests/Scenarios/CancelledEventScenario.cs

Let me know if this solves your problem

from workflow-core.

marc-mueller avatar marc-mueller commented on July 18, 2024

Hi Daniel

Thanks for your support! We did a quick test last week and it looked good so far. This week, we will integrate it into the big solution and I'll give you the more detailed feedback when we finish the integration.

Thanks
Marc

from workflow-core.

danielgerlag avatar danielgerlag commented on July 18, 2024

Glad to help, let me know if you run into any other issues

from workflow-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.