Validate Migration Plan
Validates a migration plan statically without executing it. This corresponds to the creation time validation described in the user guide.
Method
POST /migration/validate
Parameters
Request Body
A JSON object with 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 can 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
A JSON object which contains a list of instruction reports if any errors are detected, other wise it is empty.
Name | Value | Description |
---|---|---|
instructionReports | Array | The list of instruction validation reports. If no validation errors are detected it is an empty list. |
variableReports | Object | An object of variable validation reports. If no validation errors are detected it is an empty object. Each key is a variable name and each value a JSON variable validation report object. |
The properties of an instruction report are as follows:
Name | Value | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
instruction | Object |
A migration instruction JSON object with the following properties:
|
||||||||||||
failures | Array | A list of instruction validation report messages. |
The properties of a variable report are as follows:
Name | Value | Description |
---|---|---|
type | String | The value type of the variable. |
value | String/Number/Boolean/Object | The variable’s value. |
valueInfo | Object | A JSON object containing additional, value-type-dependent properties. |
failures | Array | A list of instruction validation report messages. |
Response codes
Code | Media type | Description |
---|---|---|
200 | Request successful. The validation report was returned. | |
400 | application/json | The instance could not be created due to an 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/validate
Request Body:
{
"sourceProcessDefinitionId": "aProcessDefinitionId1",
"targetProcessDefinitionId": "aProcessDefinitionId2",
"instructions": [
{
"sourceActivityIds": ["aUserTask"],
"targetActivityIds": ["aUserTask"]
},
{
"sourceActivityIds": ["anEvent"],
"targetActivityIds": ["anotherEvent"],
"updateEventTrigger": true
}
],
"variables": {
"foo": {
"type": "Object",
"value": "...",
"valueInfo": {
"objectTypeName": "java.util.ArrayList",
"serializationDataFormat": "application/x-java-serialized-object"
}
}
}
}
Response
Status 200.
{
"instructionReports": [
{
"instruction": {
"sourceActivityIds": [
"aUserTask"
],
"targetActivityIds": [
"aUserTask"
],
"updateEventTrigger": false
},
"failures": [
"failure1",
"failure2"
]
},
{
"instruction": {
"sourceActivityIds": [
"anEvent"
],
"targetActivityIds": [
"anotherEvent"
],
"updateEventTrigger": true
},
"failures": [
"failure1",
"failure2"
]
}
],
"variableReports": {
"foo": {
"type": "Object",
"value": "...",
"valueInfo": {
"objectTypeName": "java.util.ArrayList",
"serializationDataFormat": "application/x-java-serialized-object"
},
"failures": [
"Cannot set variable with name foo. Java serialization format is prohibited"
]
}
}
}