Migrate Process Instances

API Type

Web Services

Description

Migrates a process definition from one version to another version.

Syntax

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

Parameters

Name Description

instruction

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

processInstanceID

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

reserved

Definition:
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