Generates a migration plan for two process definitions. The generated migrationplan contains migration instructions which map equal activities between thetwo process definitions.

Method

POST /migration/generate

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.
updateEventTriggers A boolean flag indicating whether instructions between events should be configured to update the event triggers.

Result

A JSON object corresponding to the migration plan interface in the engine.Its properties are as follows:

Name Value Description
sourceProcessDefinitionId String The id of the source process definition for the migration.
targetProcessDefinitionId String The id of the target process definition for the migration.
Name Value Description
——-
instructions Array 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.

Response codes

Code Media type Description
200 application/json Request successful.
400 application/json The requested migration was invalid. See Introduction for the error response format.

Example

Request

POST /migration/generate

Request Body:

  1. {
  2. "sourceProcessDefinitionId": "aProcessDefinitionId1",
  3. "targetProcessDefinitionId": "aProcessDefinitionId2",
  4. "updateEventTriggers": true
  5. }

Response

Status 200.

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

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