REST API for process Instance Migration

Fellow mates, I am currently facing hard time in doing the process instance migration ( Process modified and want to apply to already instances in-progress) using the Rest APIs for process engine.

Flowable version: 7.0.0

https://documentation.flowable.com/latest/assets/core-swagger/bpmn.html#/Process%20Instances/migrateProcessInstance

I have provided the processInstanceId as required in path param. There is body section which just says “String”. I tried multiple inputs here like BusinessKey, processDefinitiinId etc but every time I am getting “process key cannot be null”. What I am suspecting is because of no documentation and swagger yaml not telling correct request payload to pass, we are getting this error.

Can anyone from Flowable team please provide the correct documentation for Process Instance migration.

PS: Google search returns only one link which talks about process instance migration using runtime service and not REST APIs.

Hi @tech-gainers

In the flowable source-code you find some samples of migration documents:

For instance if you would like to upgrade an existing process instance to the latest process definition you can call the REST api as follows:

POST /runtime/process-instances/{processInstanceId}/migrate
{
  "toProcessDefinitionId": "<lastProcessDefinitionId>",
}

or

POST /runtime/process-instances/{processInstanceId}/migrate
{
  "toProcessDefinitionKey": "<processDefinitionKey>",
}

if you pass the process definition key only, it will always take the latest process definition. (requires v7)

Regards,
Simon