Migrate Process Instances

API Type

Web Services

Description

Migrates process instances from one version to another version (called process migration).

Good to Know

  • It is required to provide Migration instruction with details of a list of activities.
  • It is required to suspend a process instance before migrating.
  • To call this method, the API account user must have the access right, Cancel a Process.
  • Once the migration is successful, it is required to call the method Suspend and Resume a Process, so that the process instance resumes with the newer version.
  • This method is provided for reference for very advanced users — mainly internal AgilePoint teams. If you need help with this method, contact AgilePoint Professional Services.

Syntax

public virtual void MigrateProcInst(WFProcessMigrationInstruction instruction, string processInstanceID, string reserved)

Parameters

NameDescription

instruction

Description:
Specifies the instructions for migrating a process to a new version.
Type
WFProcessMigrationInstruction
Allowed Values:
A WFProcessMigrationInstruction object.

processInstanceID

Description:
Specifies the unique ID of a process instance.
Type
string
Allowed Values:
A valid process instance ID

reserved

Description:
Reserved for future use.
Type
string
Allowed Values:
The literal string null.

You must pass this as a literal string at this time. This field will be used for other purposes in a later release.

Output

IWFWorkflowService svc = GetWorkflowService();
WFProcessMigrationInstruction pmi = new
WFProcessMigrationInstruction();

// some code...
svc.MigrateProcInst(pmi, currentProcessInstanceID, null);

// some more code...

Example

IWFWorkflowService svc = GetWorkflow();
string processInstanceID = "DB50CFEFDE464A78AAAA9BD7D6E6D9D0";
WFProcessMigrationInstruction pmi = new
WFProcessMigrationInstruction();
 
//add the correct CurrentActivityUniqueName
string currentActivityUniqueName = "BudgetRequest";
 
//add the correct TargetActivityUniqueName
string targetActivityUniqueName = "BudgetRequestNew";
bool bCurrentActivated = false;
pmi.AddMatchingActivity(currentActivityUniqueName,targetActivityUniqueName,
bCurrentActivated);
svc.MigrateProcInst(pmi, currentProcessInstanceID, null);

Supported Versions

4.0.1 and higher

Code Examples in the AgilePoint NX Documentation

The AgilePoint NX Product Documentation is intended as a basic reference to help you understand how to complete basic coding tasks, such as make API or JavaScript method calls. Code examples that show specific use cases, the solutions to specific business problems, or detailed implementation scenarios are outside the scope of the AgilePoint NX Product Documentation. For specific and/or advanced types of examples that may better meet your requirements, AgilePoint provides several resources:

  • AgilePoint Community Forums - A free, AgilePoint-moderated, crowd-sourcing user forum where you can ask questions about specific techniques, the solutions to use cases, workarounds, or other topics that may not be covered in the Product Documentation.
  • Professional Services - If you can not find the information you need for your specific business problem, mentoring is available through AgilePoint Professional Services.
  • Personalized Training - AgilePoint can provide personalized training for your organization. To request personalized training, contact AgilePoint Sales.