Execute Migration Plan
Executes a migration plan synchronously for multiple process instances. To execute a migration plan asynchronously, use the Execute Migration Plan Async (Batch) method.
For more information about the difference between synchronous and asynchronous execution of a migration plan, please refer to the related section of the user guide.
Method
POST /migration/execute
Parameters
Request Body
A JSON object with the following properties:
Name | Description |
---|---|
migrationPlan | The migration plan to execute. A JSON object corresponding to the migration plan interface in the engine as explained below. |
processInstanceIds | A list of process instance ids to migrate. |
processInstanceQuery |
A process instance query like the request body described by
POST /process-instance
.
|
skipCustomListeners | A boolean value to control whether execution listeners should be invoked during migration. |
skipIoMappings | A boolean value to control whether input/output mappings should be executed during migration. |
The migration plan JSON object has the following properties:
Name | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sourceProcessDefinitionId | The id of the source process definition for the migration. | ||||||||||||
targetProcessDefinitionId | The id of the target process definition for the migration. | ||||||||||||
instructions |
A list of migration instructions which map equal activities. Each
migration instruction is a JSON object with the following properties:
|
||||||||||||
variables |
A map of variables which will be set into the process instances' scope.
Each key is a variable name and each value a JSON variable value object with the following properties:
|
Result
This method returns no content.
Response codes
Code | Media type | Description |
---|---|---|
204 | Request successful. | |
400 | application/json |
The provided migration plan is not valid, so an exception of type MigrationPlanValidationException is returned. See the Introduction for the error response format.
|
400 | application/json |
The provided migration plan is not valid for a specific process instance it is applied to, so an exception of type MigratingProcessInstanceValidationException is returned. See the Introduction for the error response format.
|
400 | application/json | Invalid variable value, for example if the value could not be parsed to an Integer value or the passed variable type is not supported. See the Introduction for the error response format. |
400 | application/json |
In case additional parameters of the request are unexpected, an exception of type InvalidRequestException is returned. See the Introduction for the error response format.
|
Example
Request
POST /migration/execute
Request Body:
{
"migrationPlan": {
"sourceProcessDefinitionId": "aProcessDefinitionId1",
"targetProcessDefinitionId": "aProcessDefinitionId2",
"instructions": [
{
"sourceActivityIds": ["aUserTask"],
"targetActivityIds": ["aUserTask"]
},
{
"sourceActivityIds": ["anEvent"],
"targetActivityIds": ["anotherEvent"],
"updateEventTrigger": true
}
],
"variables": {
"foo": {
"type": "Object",
"value": "[5,9]",
"valueInfo": {
"objectTypeName": "java.util.ArrayList",
"serializationDataFormat": "application/json"
}
}
}
},
"processInstanceIds": [
"aProcessInstance",
"anotherProcessInstance"
],
"processInstanceQuery": {
"processDefinitionId": "aProcessDefinitionId1"
},
"skipCustomListeners": true
}
Response
Status 204. No content.