public WorkflowInstance StartProcess( WorkflowProcess process, string instanceName, Object context )
Start a process
Syntax
public WorkflowInstance StartProcess( WorkflowProcess process, string instanceName, Object context )
Parameters
- process
- Type: WorkflowProcess
Process. Object. Access path: PublicAPI.Processes.WorkflowProcess
- instanceName
- Type: System String
Instance name
- context
- Type: System Object
Process context
Return Value
Type: WorkflowInstanceExamples
//load the process by ID var process = PublicAPI.Processes.WorkflowProcess.Load(3); //process instance name var instanceName = "Process instance name"; //create an anonimous object for conveying the context to process //names of the context variables which can be found in the designer, "Processes" section, "Context" tab object objectContext = new {CeloeChislo = 29, Stroka = "String via object"}; //CeloeChsilo and Stroka are the context variable names //These names must coincide with the context variables names, otherwise an exception is invoked //start the process PublicAPI.Processes.WorkflowInstance.StartProcess(process, instanceName, objectContext); //WARNING!! This method will return exception, if the names in objectContext will not coincide with the context variables names
See Also