Process instance migration with Cockpit in a cluster

Servus,

I’ve got a problem with process instance migration. Our setup is as follows:

  • Single PostgreSQL database running a camunda database
  • spring-boot application running Camunda Webapps
  • spring-boot application running a Camunda BPM process and offer access to this process via custom REST API
  • all spring-boot apps have the same process engine configuration, e.g. deployment-aware is true

I want to perform a process instance migration by utilizing camunda cockpit. I can perform process instance migration with the help of the migration plugin. It creates the instance-migration batch job. But it does not do anything. The job remains at 0% progress.

Any hints?

Thanks,
Torsten

Which plugin are you using exactly?
Are you able to trigger a job directly jusing the REST API?

Hi Niall,

I’m talking about the Process Instance Migration | docs.camunda.org Plugin. We do not use the Camunda Rest API as we provide our custom APIs to manage our processes.

When I want to migrate process instances to the latest version I do the following:

  • Open Cockpit and go to Dashboard / Processes / <process containing instances to migrate>
  • Click the -Link in the process definition menu under “Instances Running” / “current versions”
    camunda-migration-issue-1
    • This starts the process instance migration Cockpit plugin
  • Press the “Select instances” button
  • Press the “Migrate all instance” button which leads to the summary page
  • Press the “Execute Migration” button which leads to the Success page
  • Press the “Observe” button which leads to the Batches page

Thanks,
Torsten

What I see when I dive into the code is that the job executor of the spring-boot application running the Camunda BPM process just looks for jobs regarding the latest version of the deployment. But, the migration job contains the deployment ID of the previous version.

So, how exactly shall migration work in an clustered environment?

Which job executor shall perform the migration? The one running in the Cockpit web application or the one running in the process application?

Thanks,
Torsten

As I got a solution from our enterprise support I’d like share this to the community.

We did not use the @EnableProcessApplication annotation yet. This one registers the application to all existing deployments and thus, actions on the old deployments such as process migrations and task completions will be properly handled by the process application.

The process application is desrcibed here: Process Applications | docs.camunda.org

Steps to solve our problem:

  • Add @EnabledProcessApplication annotation to one configuration of our SpringBootApplication
  • Add an empty processes.xml into src/main/resources/META-INF folder (if you run on maven)

Thanks
Torsten