danielgerlag / workflow-core

Lightweight workflow engine for .NET Standard
MIT License
5.4k stars 1.2k forks source link

Continuous Loop and Database Error When Event Name Exceeds [EventName] Column Size Limit in [ExecutionPointer] Table #1208

Open balyanarm opened 1 year ago

balyanarm commented 1 year ago

Describe the bug Due to the size of the [EventName] column in the [ExecutionPointer] table, when attempting to write an event with a name exceeding 100 characters, an error occurs while trying to update the database. As a result, subsequent workflow steps continue to execute continuously in a loop.

To Reproduce Attempt to write an event with a name that contains more than 100 characters.

Expected behavior The background service should attempt to insert event details into the [ExecutionPointer] table, but when it encounters an event name that exceeds the column's size limit, it should handle the error gracefully and not enter into a continuous loop.

Additional context This issue is particularly relevant for scenarios where event names are longer than the specified limit and need to be accommodated within the database schema. workflowCore.log

jamshally commented 1 year ago

I have also run into this issue. We are looking for a work-around prior to putting our workflows into production, to ensure we don't inadvertently hit 'infinite loop' scenarios. Some basic 'circuit breaker' functionality would be fine. Perhaps even bubbling internal error up to the consuming app, or having internal errors stop the workflow background processes, would be a sufficient safety net for production usage.