public WorkflowInstance StartProcess( WorkflowProcess process, string instanceName, Object context, bool offException )
Start a process
Syntax
public WorkflowInstance StartProcess( WorkflowProcess process, string instanceName, Object context, bool offException )
Parameters
- process
- Type: WorkflowProcess
Process. Object. Access path: PublicAPI.Processes.WorkflowProcess
- instanceName
- Type: System String
Instance name
- context
- Type: System Object
Process context
- offException
- Type: System Boolean
Disable the error message
Return Value
Type: WorkflowInstanceExamples
//load the process by ID var process = PublicAPI.Processes.WorkflowProcess.Load(3); //process instance name var instanceName = "Process instance name"; //disable the error message (yes or no) var offException = false; //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 и 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, offException); //WARNING!! This method will return exception, if the names in objectContext will not coincide with the context variables names //and the offException parameter takes the false value. If offException takes the true value, the exception will not be returned
See Also