Click or drag to resize

RuntimeServiceReplaceProcessVersion Method

Replaces a version of a process into WorkflowGen. Intended for web use only.

Namespace:  Advantys.Workflow.Web.Services.Processes.Runtime
Assembly:  Advantys.Workflow.Web.Services.Processes.Runtime (in Advantys.Workflow.Web.Services.Processes.Runtime.dll) Version: 7.5.0.0 (7.5.0.0)
Syntax
public int ReplaceProcessVersion(
	string processDefinition,
	string folderName,
	string processStatus,
	string processName,
	int processVersion
)

Parameters

processDefinition
Type: SystemString
Definition of the process as an XML string. Element names are case sensitive.
folderName
Type: SystemString
Name of the folder. Can be empty if FolderId is specified. Optional parameter. By default if there are no folderName or folderId, the imported process uses the same folder as the version it is replacing.
processStatus
Type: SystemString
Status of the new instance of the version. If ACTIVE is selected, any other previous ACTIVE versions will be archived. - Default = TEST - Accepted values: string.Empty, "DEV", "TEST", "ACTIVE"
processName
Type: SystemString
Name of the process to replace.
processVersion
Type: SystemInt32
Version of the process to replace.

Return Value

Type: Int32
Returns the created process ID.
Remarks
Available since WorkflowGen version: 6.2.0

Optional Parameters.

These parameters can be used in the query string or as parameters of the Headers object in the RuntimeService class instance. See example below.

ProcessId (int)Use the process ID instead of the process name and process version to identify which process to replace.
FolderId (int)Specifies the folder ID. Supercedes the Folder name.
AddNewParticipantsAsGlobal (bool)Specifies whether or not to import process participants as global participants. Can only be used users who have an Administrator profile. Default = false.
AddGlobalParticipantAssociations (bool)Specifies whether or not to import global participant associations. Can only be used users who have an Administrator profile or process managers when the web config parameter AdministrationRe
UseVersionNumber (bool)Specifies whether or not to import the process version number. Default = false.
Sample code:
RuntimeServiceWebService.RuntimeService myRuntimeService = new RuntimeServiceWebService.RuntimeService();
RuntimeServiceWebService.CreateProcessHeader myCreateProcessHeader = new RuntimeServiceWebService.CreateProcessHeader();
myRuntimeService.CreateProcessHeaderValue = myCreateProcessHeader;

myCreateProcessHeader.FolderId = folderId;
myCreateProcessHeader.AddGlobalParticipantAssociations = addGlobalParticipantAssociations;
myCreateProcessHeader.ImportNewParticipantsAsGlobal = importNewParticipantsAsGlobal;
myCreateProcessHeader.ProcessId = processId;

int replacedProcessId = myRuntimeService.ReplaceProcessVersion(processDefinition, folderName, processStatus);

See Also