Open wseegersatdealx opened 7 months ago
To address the issue you're experiencing with the SingletonStrategy
not being respected when using the Timer
activity in Elsa, it's important to ensure that the SingletonStrategy
is properly configured and that there are no conflicting configurations that might cause the workflow to behave differently than expected.
Based on the information provided, it seems like you have already configured the SingletonStrategy
for your workflow. However, the behavior you're observing suggests that new workflow instances are being created every 5 seconds, which is not the expected behavior for a singleton workflow.
Here are a few troubleshooting steps you can take:
Check for Conflicting Configurations: Ensure that there are no other configurations that might be overriding the SingletonStrategy
. This includes checking for any other workflow definitions that might be using the same Timer
activity with different activation strategies.
Review Elsa Version: Make sure you are using a version of Elsa that supports the SingletonStrategy
as expected. If you are using an older version, consider upgrading to the latest stable release.
Review Quartz Configuration: Since you are using Quartz with Elsa, ensure that the Quartz configuration is correct and that it's not causing any unexpected behavior with the scheduling of the Timer
activity.
Check for Known Issues: Review the Elsa GitHub issues and discussions to see if there are any known issues related to the SingletonStrategy
and Timer
activities. It's possible that you might be encountering a bug that has already been reported.
Create a Minimal Reproducible Example: If possible, create a minimal reproducible example that isolates the issue. This can help in identifying whether the problem is with your specific configuration or with Elsa itself.
Seek Support from the Community: If you're unable to resolve the issue on your own, consider reaching out to the Elsa community for support. You can ask questions on the Elsa GitHub repository, Stack Overflow, or the official Elsa Slack channel.
If you have any log output or error messages, please include them as they can provide additional context that might help diagnose the issue.
If you've already tried some of these steps, please let me know which ones and what the outcomes were, so we can further narrow down the problem.
This comment was generated by Glime.
While poking around it seems like IWorkflowActivationStrategy.GetAllowActivationAsync
is never reached.
Have I incorrectly configured the workflow?
Same problem for me:
GetAllowActivationAsync() gets never called.
IWorkflowActivationStrategy.GetAllowActivationAsync
is called only from WorkflowHost.CanStartWorkflowAsync
which is not called from anywhere across the codebase. All activities which trigger new workflow, like Event, Timer, etc. just create a new workflow and do not respect the activation strategy. It seems the activation strategy doesn't affect anything at all.
@sfmskywalker was this resolved in #3559 ?
Looks like it, but later it got broken, which was fixed more recently via https://github.com/elsa-workflows/elsa-core/pull/6076
Description
The timer trigger does not seem to respect the
SingletoneStrategy
.Elsa v3.1.3
Steps to Reproduce
Due to a bug with the default scheduler where it doubles on each trigger instance I used the quartz scheduler.
Using the
Elsa.Samples.AspNet.Heartbeats
project and updating theHeartbeatWorkflow
to the following.Expected Behavior
This workflow should print out
Start ...
thenFinish ...
in sequence.Actual Behavior
Every 5 seconds a
Start ...
and a correspondingFinish ...
is printed.Log Output
Include any relevant log output or error messages that might help diagnose the issue.
Troubleshooting Attempts
This does not happen when I trigger the same work from
HttpEndpoint
trigger.