RuntimeServiceCreateProcess Method |
Namespace: Advantys.Workflow.Web.Services.Processes.Runtime
public int CreateProcess( string processDefinition, string folderName, string processStatus )
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.
ProcessName (string) | Specifies a process name for the creation of the new process or version. If this parameter is not used, we will take the name from the process definition. |
FolderId (int) | Specifies the folder ID. Supersedes 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 AdministrationRestrictManagerToModifyGlobalParticipant is set to true. Default = false. |
UseVersionNumber (bool) | Specifies whether or not to import the process version number from the process definition. Default = false. |
NewVersionsIfExists (bool) | Specifies whether or not to create a new version of the process if it already exists. Default = true. |
RuntimeServiceWebService.RuntimeService myRuntimeService = new RuntimeServiceWebService.RuntimeService(); RuntimeServiceWebService.CreateProcessHeader myCreateProcessHeader = new RuntimeServiceWebService.CreateProcessHeader(); myRuntimeService.CreateProcessHeaderValue = myCreateProcessHeader; myCreateProcessHeader.FolderId = folderId; myCreateProcessHeader.AddGlobalParticipantAssociations = addGlobalParticipantAssociations; myCreateProcessHeader.AddNewParticipantsAsGlobal = addNewParticipantsAsGlobal; myCreateProcessHeader.UseVersionNumber = useVersionNumber; myCreateProcessHeader.ProcessName = processName; myCreateProcessHeader.NewVersionIfExists = newVersionIfExists; int createdProcessId = myRuntimeService.CreateProcess(processDefinition, folderName, processStatus);