elsa-workflows / elsa-workflows/elsa-core

Critical: Parallel Branch loses bookmarks after loop-back when using Fork/Join (Elsa 3.4)

Open
#7,724 2 comments 0 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
7.9k
Forks
1.5k
Avg merge
15h 22m
Merged PRs (30d)
114

Description

Hello Elsa Team,

First of all, thank you for your work on Elsa 3.

We are currently using Elsa Workflows **3.4.0** in a production system built on **.NET 9** with code-based workflows (`WorkflowBase`) and custom activities.

Before upgrading to the latest version (currently 3.7.x), I would like to ask about a few issues we are experiencing and whether they have been fixed in newer versions.

## 1. Parallel Branch / Bookmark Loss Issue

We have a workflow with a `Fork/Join` pattern containing two parallel branches:

* Mission Report branch
* Mission Expense branch

Each branch contains human tasks and approval steps. If an approval is rejected, that branch loops back to its first activity.

Example:

* Branch A is rejected and returns to its first activity.
* Branch B successfully reaches the `Join` activity.

The problem is that after Branch B reaches `Join`, the bookmarks of Branch A disappear and the workflow can no longer continue correctly.

Our expectation is that the `Join` activity should wait until the restarted branch finishes again, while preserving its bookmarks and execution state.

Has this issue been fixed in versions newer than **3.4.0** (such as 3.7.x)?

Is this behavior considered a bug, or is this workflow pattern unsupported?

## 2. Workflow Registry / Multiple Workflows

Previously, I reported an issue where:

```csharp
await _workflowRegistry.RegisterAsync(result.Workflow);
```

appeared to overwrite existing rows in `Elsa.WorkflowDefinitions` when registering multiple workflows.

Additionally, using:

```csharp
_bookmarkResumer.ResumeAsync(...)
```

sometimes resulted in the following error:

```text
Workflow graph with handle DefinitionVersionId: not found.
```

Has this issue been fixed in newer versions?

Is there any recommended migration path from 3.4.0 to the latest version for code-based workflows?

## 3. Database Migration and Existing Data

Our production system has been running for several months and contains existing workflow data, including:

* WorkflowDefinitions
* WorkflowInstances
* Bookmarks
* Triggers

If we upgrade from **3.4.0** to the latest version:

1. Have there been any database schema changes between these versions?
2. Will existing tables be automatically migrated?
3. Will existing workflow instances and bookmarks remain compatible?
4. Are there any known breaking changes that may affect resuming existing workflows?

Any guidance or migration recommendations would be greatly appreciated.

Thank you for your support.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.