Validates a migration plan statically without executing it. Thiscorresponds to the creation time validation described in the userguide.

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.
Name Value Description
——-
instructions A list of migration instructions which map equal activities. Each migration instruction is a JSON object with the following properties:

NameValueDescription
sourceActivityIdsArrayThe activity ids from the source process definition being mapped.
targetActivityIdsArrayThe activity ids from the target process definition being mapped.
updateEventTriggerBoolean Configuration flag whether event triggers defined are going to be updated during migration.

|sourceActivityIds|Array|The activity ids from the source process definition being mapped.|targetActivityIds|Array|The activity ids from the target process definition being mapped.|updateEventTrigger|Boolean| Configuration flag whether event triggers defined are going to be updated during migration.
|Name|Value|Description
|——-
|sourceActivityIds|Array|The activity ids from the source process definition being mapped.
|targetActivityIds|Array|The activity ids from the target process definition being mapped.
|updateEventTrigger|Boolean| Configuration flag whether event triggers defined are going to be updated during migration.

Result

A JSON object which contains a list of instruction reportsif 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.

The properties of a instruction report are as follows:

Name Value Description
Name Value Description
——-
instruction Object A migration instruction JSON object with the following properties:

NameValueDescription
sourceActivityIdsArrayThe activity ids from the source process definition being mapped.
targetActivityIdsArrayThe activity ids from the target process definition being mapped.
updateEventTriggerBoolean Configuration flag whether event triggers defined are going to be updated during migration.

|sourceActivityIds|Array|The activity ids from the source process definition being mapped.|targetActivityIds|Array|The activity ids from the target process definition being mapped.|updateEventTrigger|Boolean| Configuration flag whether event triggers defined are going to be updated during migration.
|Name|Value|Description
|——-
|sourceActivityIds|Array|The activity ids from the source process definition being mapped.
|targetActivityIds|Array|The activity ids from the target process definition being mapped.
|updateEventTrigger|Boolean| Configuration flag whether event triggers defined are going to be updated during migration.
|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 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/generate

Request Body:

  1. {
  2. "sourceProcessDefinitionId": "aProcessDefinitionId1",
  3. "targetProcessDefinitionId": "aProcessDefinitionId2",
  4. "instructions": [
  5. {
  6. "sourceActivityIds": ["aUserTask"],
  7. "targetActivityIds": ["aUserTask"]
  8. },
  9. {
  10. "sourceActivityIds": ["anEvent"],
  11. "targetActivityIds": ["anotherEvent"],
  12. "updateEventTrigger": true
  13. }
  14. ]
  15. }

Response

Status 200.

  1. {
  2. "instructionReports": [
  3. {
  4. "instruction": {
  5. "sourceActivityIds": [
  6. "aUserTask"
  7. ],
  8. "targetActivityIds": [
  9. "aUserTask"
  10. ],
  11. "updateEventTrigger": false
  12. },
  13. "failures": [
  14. "failure1",
  15. "failure2"
  16. ]
  17. },
  18. {
  19. "instruction": {
  20. "sourceActivityIds": [
  21. "anEvent"
  22. ],
  23. "targetActivityIds": [
  24. "anotherEvent"
  25. ],
  26. "updateEventTrigger": true
  27. },
  28. "failures": [
  29. "failure1",
  30. "failure2"
  31. ]
  32. }
  33. ]
  34. }

原文: https://docs.camunda.org/manual/7.9/reference/rest/migration/validate-migration-plan/