elsa-workflows / elsa-workflows/elsa-core
A custom interruptible activity, when waiting in parallel, the resumption of one activity unexpectedly causes the cancellation of the other activity.
- Dominant language
- C#
- Stars
- 7.9k
- Forks
- 1.5k
- Avg merge
- 15h 22m
- Merged PRs (30d)
- 114
Description
## Description
A custom interruptible activity, when waiting in parallel, the resumption of one activity unexpectedly causes the cancellation of the other activity.
## Steps to Reproduce
To help us identify the issue more quickly, please follow these guidelines:

1. **Detailed Steps**:
The "Create Todo" and "Create Approval Item" in the diagram are two custom activities (similar to the Run Task activity), which are paused or resumed through bookmarks. When I run the workflow following the steps below, an unexpected result that does not match the expectation occurs:
1. After executing the workflow, the process is interrupted simultaneously at the "Create Todo" and "Create Approval Item" activities.
2. Resume the "Create Approval Item" activity through the bookmark and specify the subsequent execution of the "驳回" branch in the output.
3. The "Create Approval Item" activity resumes correctly. At the same time, because the "驳回" branch points to itself, this activity is interrupted again at this time.
4. Resume the "Create Todo" activity through the bookmark. At this time, the "Create Approval Item" activity that was interrupted for the second time in the previous step is unexpectedly canceled.
5. The final execution record stays at the "Join" activity (regardless of the previous problem, why didn't it execute to the "End" activity?), and the status of the entire workflow becomes "Finished".
2. **Code Snippets**:




4. **Reproduction Rate**:
The following attempts have been made:
1. When the "Create Todo" activity is resumed first, the "Create Approval Item" will still remain in the interrupted state and will not be unexpectedly canceled.
2. When the "Create Approval Item" is resumed first and the subsequent execution of the "通过" branch is specified in the output, and then the "Create Todo" activity is resumed, everything is normal.
Only when the "Create Todo" activity is resumed after the "Create Approval Item" is interrupted for the second time will the above problem occur.
5. **Video/Screenshots**:

## Expected Behavior
When the "Create Approval Item" activity is interrupted for the second time, resuming the "Create Todo" activity will not cause the status of the "Create Approval Item" activity to change to "Canceled".
## Environment
- **Elsa Package Version**: 3.3.1
- **Operating System**: Win11
- **Browser and Version**: If applicable, include your browser and version (e.g., Chrome 92).
Contributor guide
Assessment
This issue has not been assessed yet.