[BUG] Infinite Looping in Event Activity in v3
Description
We have a workflow with events 1, 2, 3, and 4. The execution sequence 1 -> 2 -> 3 works as expected. However, once event 3 is completed, event 4 is triggered, which loops back to event 3. This is where the problem starts. After event 4 is completed, the workflow enters an infinite loop, continuously cycling through events 2, 3, and 4 without waiting for user intervention. The workflow repeats in the following manner: 2 -> 3 -> 4 -> 2 -> 3 -> 4 -> 2 -> 3 -> 4, and so on. This looping happens without pausing to allow the user to manually complete the events. Ideally, the execution should wait for the user to manually complete each event, even if the event has been completed before and is triggered again. The workflow should only proceed once the user has manually completed the event. This is a minimum reproducible example. In a real-world scenario, there would be an if block before triggering event 4.
Steps to Reproduce
To help us identify the issue more quickly, please follow these guidelines:
-
Detailed Steps: I am attaching video and json of that workflow so that you will have some idea about it.
-
Attachments:
- Workflow JSON: workflow-2.json
-
Video/Screenshots:
https://github.com/elsa-workflows/elsa-core/assets/79979623/25be56cf-a3cd-4ee4-aa19-8478cc00185a
Providing a comprehensive and clear description will greatly assist in diagnosing the problem quickly and accurately. If you're unable to share some of the requested information publicly, please note that, and we can arrange for secure information transfer.
Expected Behavior
Workflow should not continue further automatically when it returns to the Event2. It should wait to complete the Event2. This flow was working perfectly in v2 of elsa.
Actual Behavior
You can see it in the uploaded video it is autocompleting Event2 /Event3 and going into infinite loop.
Based on the description provided, it seems that the workflow is not behaving as expected when it loops back from event 4 to event 3. Instead of waiting for user intervention at each event, it is automatically progressing through the events in a loop.
To address this issue, it is important to ensure that the workflow is designed to wait for an explicit user action before proceeding to the next event. This can typically be achieved by using blocking activities that pause the workflow until a certain condition is met or an event is received.
Without access to the actual workflow JSON and the video, it is difficult to provide a precise solution. However, here are some general steps you can take to troubleshoot and potentially resolve the issue:
-
Review Workflow Design: Examine the workflow design in the JSON file to ensure that there are appropriate blocking activities at each event that require user intervention.
-
Check for Conditions: If there are conditional branches in the workflow, make sure that the conditions are set up correctly to prevent unintended automatic progression.
-
Update to Latest Version: If you are not already using the latest version of Elsa, consider updating to the latest version as it may contain bug fixes that address this issue.
-
Consult Documentation: Review the Elsa documentation for guidance on creating workflows that require user intervention and how to properly use blocking activities.
-
Seek Support: If the issue persists, consider reaching out to the Elsa community or support channels for assistance. Provide them with the workflow JSON and any relevant screenshots or videos to help them understand the issue.
-
Report a Bug: If you believe this is a bug in Elsa, you can report it on the Elsa GitHub repository by creating an issue with all the relevant details, including the workflow JSON and the behavior you are experiencing.
If you can provide the actual workflow JSON and access to the video, I can offer more specific advice on how to resolve the issue.
This comment was generated by Glime.
Is there any update on this @sfmskywalker? I am facing the same issue
Although I have yet to look into this issue specifically, I’m pretty certain that, based on the description, it will be a non-issue after the refactoring I’m currently performing, which includes a significant change in the way events are processed.
I can confirm that the issue exists in the current main branch, but that it has been fixed with the feature branch with the refactorings that I mentioned. Once that gets merged, I will close this issue as fixed.
Sounds good. Thanks for the update! Looking forward to the release.
Hi @sfmskywalker,
When is this expected to get merged into main branch?
I’m aiming for sometime next week, contingent on progress on some remaining tasks and bugs.
@sfmskywalker ,
Thanks for doing this on Priority.