org.jbpm.services.api.admin

## Interface ProcessInstanceMigrationService

- All Known Subinterfaces:
    ProcessInstanceMigrationServiceEJBLocal, ProcessInstanceMigrationServiceEJBRemote
  All Known Implementing Classes:
    ProcessInstanceMigrationServiceCDIImpl, ProcessInstanceMigrationServiceEJBImpl, ProcessInstanceMigrationServiceImpl

      public interface ProcessInstanceMigrationService

  Provides migration service for process instances. Migration usually is required when new version of the process definition is deployed and active instances should be moved to it instead of staying at the current one.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<MigrationReport>` | `migrate(String sourceDeploymentId, List<Long> processInstanceIds, String targetDeploymentId, String targetProcessId)` Migrates given process instances that belong to source deployment, into target process id that belongs to target deployment.
    `List<MigrationReport>` | `migrate(String sourceDeploymentId, List<Long> processInstanceIds, String targetDeploymentId, String targetProcessId, Map<String,String> nodeMapping)` Migrates given process instances (with node mapping) that belong to source deployment, into target process id that belongs to target deployment.
    `MigrationReport` | `migrate(String sourceDeploymentId, Long processInstanceId, String targetDeploymentId, String targetProcessId)` Migrates given process instance that belongs to source deployment, into target process id that belongs to target deployment.
    `MigrationReport` | `migrate(String sourceDeploymentId, Long processInstanceId, String targetDeploymentId, String targetProcessId, Map<String,String> nodeMapping)` Migrates given process instance (with node mapping) that belongs to source deployment, into target process id that belongs to target deployment.

- - ### Method Detail

    - #### migrate

          MigrationReport migrate(String sourceDeploymentId,
                                  Long processInstanceId,
                                  String targetDeploymentId,
                                  String targetProcessId)

      Migrates given process instance that belongs to source deployment, into target process id that belongs to target deployment. Following rules are enforced:
      - source deployment id must be there
      - process instance id must point to existing and active process instance
      - target deployment must exist
      - target process id must exist in target deployment
      Migration returns migration report regardless of migration being successful or not that needs to be examined for migration outcome.
      Parameters:
        `sourceDeploymentId` - deployment that process instance to be migrated belongs to
        `processInstanceId` - id of the process instance to be migrated
        `targetDeploymentId` - id of deployment that target process belongs to
        `targetProcessId` - id of the process process instance should be migrated to
      Returns:
        returns complete migration report

    - #### migrate

          MigrationReport migrate(String sourceDeploymentId,
                                  Long processInstanceId,
                                  String targetDeploymentId,
                                  String targetProcessId,
                                  Map<String,String> nodeMapping)

      Migrates given process instance (with node mapping) that belongs to source deployment, into target process id that belongs to target deployment. Following rules are enforced:
      - source deployment id must be there
      - process instance id must point to existing and active process instance
      - target deployment must exist
      - target process id must exist in target deployment
      Migration returns migration report regardless of migration being successful or not that needs to be examined for migration outcome.
      Parameters:
        `sourceDeploymentId` - deployment that process instance to be migrated belongs to
        `processInstanceId` - id of the process instance to be migrated
        `targetDeploymentId` - id of deployment that target process belongs to
        `targetProcessId` - id of the process process instance should be migrated to
        `nodeMapping` - node mapping - source and target unique ids of nodes to be mapped - from process instance active nodes to new process nodes
      Returns:
        returns complete migration report

    - #### migrate

          List<MigrationReport> migrate(String sourceDeploymentId,
                                        List<Long> processInstanceIds,
                                        String targetDeploymentId,
                                        String targetProcessId)

      Migrates given process instances that belong to source deployment, into target process id that belongs to target deployment. Following rules are enforced:
      - source deployment id must be there
      - process instance id must point to existing and active process instance
      - target deployment must exist
      - target process id must exist in target deployment
      Migration returns list of migration report - one per process instance, regardless of migration being successful or not that needs to be examined for migration outcome.
      Parameters:
        `sourceDeploymentId` - deployment that process instance to be migrated belongs to
        `processInstanceIds` - list of process instance id to be migrated
        `targetDeploymentId` - id of deployment that target process belongs to
        `targetProcessId` - id of the process process instance should be migrated to
      Returns:
        returns complete migration report

    - #### migrate

          List<MigrationReport> migrate(String sourceDeploymentId,
                                        List<Long> processInstanceIds,
                                        String targetDeploymentId,
                                        String targetProcessId,
                                        Map<String,String> nodeMapping)

      Migrates given process instances (with node mapping) that belong to source deployment, into target process id that belongs to target deployment. Following rules are enforced:
      - source deployment id must be there
      - process instance id must point to existing and active process instance
      - target deployment must exist
      - target process id must exist in target deployment
      Migration returns list of migration report - one per process instance, regardless of migration being successful or not that needs to be examined for migration outcome.
      Parameters:
        `sourceDeploymentId` - deployment that process instance to be migrated belongs to
        `processInstanceIds` - list of process instance id to be migrated
        `targetDeploymentId` - id of deployment that target process belongs to
        `targetProcessId` - id of the process process instance should be migrated to
        `nodeMapping` - node mapping - source and target unique ids of nodes to be mapped - from process instance active nodes to new process nodes
      Returns:
        returns list of migration reports one per each process instance

Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.