workflow-core
workflow-core copied to clipboard
CancelConditon on Schedule seems to be ignored
Describe the bug When I add a cancel condition to a Schedule, when the cancelation condition is true it still seems to run the schedule.
To Reproduce
I have modified WorkflowCore.Sample16 to make sure I had a clean example. ` builder .StartWith(context => Console.WriteLine("Hello")) .Schedule(data => TimeSpan.FromSeconds(5)).Do(schedule => schedule .StartWith(context => Console.WriteLine("Doing scheduled tasks")) ) .CancelCondition(s => true, true) .Then(context => Console.WriteLine("Doing normal tasks"));
Basically I have added the.CancelCondition(s => true, true)` to the Schedule to force it to always be cancelled but the output is still showing "Doing scheduled tasks" after 5 seconds has passed.
Expected behavior I would expect the schedule to cancel and not write "Doing scheduled tasks" to the console.
Additional context Add any other context about the problem here.