Skip to content

Commit

Permalink
docs(concepts): rm reverted event migration section (#3144)
Browse files Browse the repository at this point in the history
Process instance migration can no longer deal with event subscriptions.
While this is documented in the limitations with some specific
scenarios, it should also be clear in the rest of the concept
documentation. So, this removes the section discussing event
subscriptions because it implies behavior that is not available.

I've also clarified the case where an active service task receives a
boundary event in the target process definition which is also not
supported at this time. It could be implied from the rule above it, but
I'd rather have the limitations be explicit.
  • Loading branch information
korthout authored Jan 3, 2024
1 parent c0b70ff commit d1d5cc6
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 212 deletions.
Binary file not shown.
Binary file not shown.
39 changes: 4 additions & 35 deletions docs/components/concepts/process-instance-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,41 +104,9 @@ You are free to migrate your process instance:
You do not have to provide a mapping instruction from the process instance's process ID to the target process ID.
:::

## Event subscriptions

When migrating, the process instance's event subscriptions are recreated, i.e. the process instance unsubscribes from errors, escalations, messages, signals, and timers in its current process definition, and subscribes to the events in the target process definition. We subscribe to the events in the target process by evaluating the related expressions again.

:::note
This means that once migrated, new timers, message subscriptions, and signal subscriptions are created with new keys and potentially different values.
:::

Let's consider an active service task and a signal event sub-process.
The [signal](../modeler/bpmn/signal-events/signal-events.md#signals) name is defined as a static value (`order placed`).

![The process instance is subscribed to the signal event sub process.](assets/process-instance-migration/migration-with-recreated-signal-event-subprocess_before.png)

In the target process, we add a user task after the service task.
We leave the signal event sub process unchanged.
On migrating the process instance, we unsubscribe it from the `order_placed` signal and subscribe to the signal again in the target process.
Once migrated, a broadcasted `order_placed` signal will trigger the event sub process just like before.

![The process instance is subscribed to the same signal event sub process again.](assets/process-instance-migration/migration-with-recreated-signal-event-subprocess_after.png)

:::warning
Recreation of the event subscription can produce unwanted results when re-evaluating the related expressions.
:::

Consider an active service task with a timer boundary event.
The timer is defined as a static duration of three hours (`PT3H`).
Just before we migrate the process instance, there are only 30 minutes left until the timer triggers.
But, this timer is canceled and a new timer is created with a duration of three hours when migrating the process instance.
Once migrated, the timer will not trigger in three hours instead of 30 minutes.

<!-- TODO: we could mention that we plan to support timer migration in a future version -->

## Jobs, expressions, and input mappings

While event subscriptions are recreated for migrated elements, we do not recreate jobs, reevaluate expressions, and reapply input mappings of the active elements.
We do not recreate jobs, reevaluate expressions, and reapply input mappings of the active elements.
Any existing variables and jobs continue to exist with the same values as previously assigned.

Let's consider an active service task that created a job when it was activated with type `send_mail`.
Expand Down Expand Up @@ -178,8 +146,9 @@ The following limitations exist that may be supported in future versions:
- A process instance with an incident
- A process instance that is started from a call activity, i.e. a child process instance
- A process instance with an active service task that has a boundary event
- A process instance that contains event subprocess
- A target process definition that contains event subprocess
- A process instance with an active service task that has a boundary event in the target process definition
- A process instance that contains an event subprocess
- A target process definition that contains an event subprocess
- An element that becomes nested in a newly added sub-process
- An element that was nested in a sub-process is no longer nested in that sub-process
- Mapping instructions cannot change the element type
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit d1d5cc6

Please sign in to comment.