elsa-core
elsa-core copied to clipboard
[BUG]Timing trigger exception.
Description
Triggering the workflow every second via Cron or Timer can lead to repetitive workflow triggering and confusing timing.
Steps to Reproduce
CRON(0/1 * * * * ?)->A time-consuming custom activity
Expected Behavior
Triggered once per second according to the expression or after the first real column workflow has completed execution, then triggered the second workflow.
Actual Behavior
A second or even more workflows are triggered during the execution of the first workflow instance
Screenshots
Environment
- Elsa Package Version: 3.2.0-rc4
- Operating System: Windows 10
- Browser and Version: Edge 127.0.2651.95
Log Output
No error logging output
Troubleshooting Attempts
When the execution time of a custom activity (which is a time-consuming activity) is controlled within the trigger interval or the trigger time is set beyond the activity execution time, the abnormal workflow real column will be greatly reduced or even no.
This setting does not appear to be working.
@clown599 If I understand correctly, everything works as expected, except for the Singleton setting, is that right?
@sfmskywalker no. None of the above Settings work. And the trigger cycle is not expected. Refer to the image above, I set it to trigger once a second, cron expression is: 0/1 * * * *? But the actual trigger time is not one second.
Got it. So none of the Activation strategy settings work, and the cron trigger doesn't trigger every one second, but it does trigger regularly.
- What is the average trigger interval, give or take?
- What timer provider are you using? Quartz.NET, Hangfire, or the default one?
Yes.
- There is no specific average trigger time. Sometimes it takes several seconds or even more than 10 seconds to trigger, and sometimes it triggers multiple times a second. The activity is triggered as expected only if the execution time is less than the trigger interval. 2, tried the default Settings and Quartz.NET, both have this problem.
Quartz.NET I set it up like this:
@sfmskywalker Follow these image steps to reproduce it::