Sergii Kram

Results 9 comments of Sergii Kram

Looks like using middleware with Polly can workaround the issue: https://workflow-core.readthedocs.io/en/latest/workflow-middleware/#step-middleware E.g. implement retries for the step with Polly and add `.OnError(WorkflowErrorHandling.Suspend)` after the step.

@danielgerlag could you please review this PR? The workflow will never run if the application crashes or stops between PersistWorkflow and CreateEventSubsctiption. See https://github.com/danielgerlag/workflow-core/pull/1078/files#diff-716d3b6475bbc125167970522ffbf9b96c77437efed7c8a421441f02b5ebc335L58 and https://github.com/danielgerlag/workflow-core/pull/1078/files#diff-716d3b6475bbc125167970522ffbf9b96c77437efed7c8a421441f02b5ebc335L106.

@danielgerlag I believe the tests must be fixed by a different PR, please take a look https://github.com/danielgerlag/workflow-core/pull/1039

I have faced the same issue, so I have created a PR that implements idempotency for workflows creation, see https://github.com/danielgerlag/workflow-core/pull/921.

> **tracking active workflow instances separately** The PR solves a different problem and does not encourage using WFC as a business/domain-specific job tracking etc. For the context - imagine you...

> Of course I would! I catch all exceptions in debugger so it would just break on it. People use TrySmth methods for achieving the result without throwing exceptions. Is...

> this PR implies that in distributed system multiple nodes that try to activate workflow would generate the same idempotency id? No, each node would generate a unique idempotency key...

Quick update: I've created a nuget for PostgreSQL with Reference as an idempotency key. See https://github.com/SergiiKram/workflow-core#idempotent-workflow-core The diff SergiiKram@b1b54c9 I'm closing the PR mentioned above until better times. Thanks, guys!

Meanwhile, the approach mentioned here https://github.com/danielgerlag/workflow-core/pull/237 with `Parallel` flow and `CancelCondition` seems to work, so we can build a workaround to stop workflow from inside. ```c# .Parallel() .Do(then => then...