Generate Migration Plan

Generates a migration plan for two process definitions. The generated migration plan contains migration instructions which map equal activities between the two 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.
variables A map of variables which can be set into the process instances' scope.

Heads-up: this property is just passed through and no generation, only validation happens. It is for convenience to directly pass the result as part of the execution payload.

Each key is a variable name and each value a JSON variable value object with the following properties:

Name Description
value The variable's value. For variables of type Object, the serialized value has to be submitted as a String value.

For variables of type File the value has to be submitted as Base64 encoded string.

type The value type of the variable.
valueInfo A JSON object containing additional, value-type-dependent properties.

For serialized variables of type Object, the following properties can be provided:

  • objectTypeName: A string representation of the object's type name.
  • serializationDataFormat: The serialization format used to store the variable.

For serialized variables of type File, the following properties can be provided:

  • filename: The name of the file. This is not the variable name but the name that will be used when downloading the file again.
  • mimetype: The MIME type of the file that is being uploaded.
  • encoding: The encoding of the file that is being uploaded.

The following property can be provided for all value types:

  • transient: Indicates whether the variable should be transient or not. See documentation for more informations.

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.
instructions Array A list of migration instructions which map equal activities. Each migration instruction is a JSON object with the following properties:
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.
variables Object Each key is a variable name and each value a JSON variable value object.

Response codes

Code Media type Description
200 application/json Request successful.
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 The requested migration was invalid. See Introduction for the error response format.

Example

Request

POST /migration/generate

Request Body:

{
  "sourceProcessDefinitionId": "aProcessDefinitionId1",
  "targetProcessDefinitionId": "aProcessDefinitionId2",
  "updateEventTriggers": true,
  "variables": {
    "foo": {
      "type": "Object",
      "value": "[5,6]",
      "valueInfo": {
        "objectTypeName": "java.util.ArrayList",
        "serializationDataFormat": "application/json"
      }
    }
  }
}

Response

Status 200.

{
  "sourceProcessDefinitionId": "aProcessDefinitionId1",
  "targetProcessDefinitionId": "aProcessDefinitionId2",
  "instructions": [
    {
      "sourceActivityIds": ["aUserTask"],
      "targetActivityIds": ["aUserTask"],
      "updateEventTrigger": false
    },
    {
      "sourceActivityIds": ["anEvent"],
      "targetActivityIds": ["anotherEvent"],
      "updateEventTrigger": true
    }
  ],
  "variables": {
    "foo": {
      "type": "Object",
      "value": "[5,6]",
      "valueInfo": {
        "objectTypeName": "java.util.ArrayList",
        "serializationDataFormat": "application/json"
      }
    }
  }
}

目录: