danielgerlag / danielgerlag/workflow-core

Can the default error handling come from the host / global configuration?

Open
#1,007 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
5.9k
Forks
1.3k
Avg merge
1d 1h
Merged PRs (30d)
5

Description

https://github.com/danielgerlag/workflow-core/blob/30c98f83c5d70bae11dd2b65bada0db5619340f3/src/WorkflowCore/Services/FluentBuilders/WorkflowBuilder.cs#L18

I wasn't expecting Retry to be the default error handler for workflows. On error, I wanted my workflow to terminate. Turns out it repeated over and over on a step that could never pass because the data was bad, calling hundreds of times to a third-party API.

It was only after digging into the source code (above) that I saw the default is retry. I'm solving for this by creating a base class that sets the default to Terminate, which is what I want for my workflows.

I could see how each workflow is unique and that setting at the host might not be desirable. If that's the case, I'd like to throw in my vote to have the default error handler be to Terminate (or Suspend? Do you have to manually resume a Suspended workflow?). I would think the default should be more restrictive (less permissive) to protect the workflow runner, and allow you to opt-in to more permissive handling.

Cheers!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.