Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Infinite Looping in Event Activity in v3 #5409

Closed
sagargolu opened this issue May 17, 2024 · 8 comments · Fixed by #5444
Closed

[BUG] Infinite Looping in Event Activity in v3 #5409

sagargolu opened this issue May 17, 2024 · 8 comments · Fixed by #5444
Labels
bug Something isn't working
Milestone

Comments

@sagargolu
Copy link

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:

  1. Detailed Steps: I am attaching video and json of that workflow so that you will have some idea about it.

  2. Attachments:

  3. Video/Screenshots:

2024-05-17.1.mp4

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.

@sagargolu sagargolu added the bug Something isn't working label May 17, 2024
Copy link

glime-ai bot commented May 17, 2024

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:

  1. 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.

  2. 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.

  3. 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.

  4. Consult Documentation: Review the Elsa documentation for guidance on creating workflows that require user intervention and how to properly use blocking activities.

  5. 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.

  6. 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.

@sagargolu sagargolu changed the title [BUG] Infinity Looping in Event Activity in v3 [BUG] Infinite Looping in Event Activity in v3 May 17, 2024
@NrujalSharma
Copy link
Contributor

Is there any update on this @sfmskywalker?
I am facing the same issue

@sfmskywalker
Copy link
Member

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.

@sfmskywalker sfmskywalker added this to the Elsa 3.2 milestone May 21, 2024
@sfmskywalker
Copy link
Member

sfmskywalker commented May 27, 2024

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.

@NrujalSharma
Copy link
Contributor

Sounds good. Thanks for the update!
Looking forward to the release.

@sagargolu
Copy link
Author

sagargolu commented Jun 6, 2024

Hi @sfmskywalker,

When is this expected to get merged into main branch?

@sfmskywalker
Copy link
Member

I’m aiming for sometime next week, contingent on progress on some remaining tasks and bugs.

@sagargolu
Copy link
Author

@sfmskywalker ,

Thanks for doing this on Priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants