Migrating Process Instances with Subprocesses in Camunda 8

Hi Camunda Experts,

I’m currently facing an issue with migrating process instances that include subprocesses in Camunda 8. Here are the details of the problem and the steps I took to reproduce it:

Problem Description:

I am trying to migrate process instances from one version of a BPMN diagram to another. However, I encountered an error when attempting to migrate instances that contain event subprocesses. The error message is as follows:

“Failed to migrate process instance: Command ‘MIGRATE’ rejected with code ‘INVALID_STATE’: Expected to migrate process instance but process instance has an event subprocess. Process instances with event subprocesses cannot be migrated yet.”

Environment Setup:

  • Zeebe Client Version: 8.4.1
  • Camunda Platform Version: 8.4

BPMN Diagram:
I have a BPMN diagram with the following structure:
A main process flow.
An event subprocess within the main process.

I used the newMigrateProcessInstanceCommand method to attempt the migration

Question:

Is there a way to migrate process instances that include event subprocesses? If not, are there any recommended workarounds or upcoming updates that will address this issue?

Any guidance or suggestions on how to handle this migration would be greatly appreciated.

Thank you!

1 Like

I’m experiencing a very similar issue on 8.5.2. (FAILED_PRECONDITION: Command ‘MIGRATE’ rejected with code ‘INVALID_STATE’: Expected to migrate process instance ‘2251799813717717’ but a concurrent command was executed on the process instance.)

The docs don’t make it clear that this isn’t supported: Process instance migration | Camunda 8 Docs

But given issue Migrate call activity instances · Issue #15921 · camunda/camunda · GitHub (tagged with 8.5.2) in this epic [EPIC] Process Instance Migration Phase 3: Nesting and common events · Issue #17349 · camunda/camunda · GitHub, it seems they are still actively working on these features and it is now supported in zeebe 8.5.2.
See the zeebe release notes here Release 8.5+gen3 · camunda/camunda-platform · GitHub

However, I’m running zeebe 8.5.2 in a dev environment and still encountering the same issue.