Methods / Methods for Process Instances |
Name | Type | Description |
---|---|---|
PID | string | The process definition ID for a released process definition. |
PIID | string | A 32 character unique process instance ID for the process instance you are creating. If you set this value to null, the AgilePoint Server generates the ID. |
PIName | string | A unique process name that is associated with the process definition. The maximum length of process instance name is 1024 characters. |
workObjectID | string | A 256-character ID for an object, such as a document, that is associated with the process instance. (Even though the field size is 256 characters, in common practice, this will usually return a 32-character GUID.) |
superPIID | string | A 32-character unique process instance ID that acts as a parent process instance of the process instance that is intended to create. In other words, this is the ID of the process instance on which you want to base your new process instance. |
startImmediately | bool | An obsolete, legacy parameter that must be true. |
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.
IWFWorkflowService svc = GetWorkflowService(); string processDefinitionName = "EmployeeOnboardProcess"; // get UUID of released process definition string processDefinitionID = svc.GetReleasedPID(processDefinitionName); // assign UUID of process instance string processInstanceID = UUID.GetID(); // process instance name that has to be unique within process definition ID string processInstanceName = string.Format("{0}-{1}", processDefinitionName DateTime.Now.Ticks ); // work object ID string workObjectID = UUID.GetID(); // create process instance WFEvent event = svc.CreateProcInst( pID, piID, piName, workObjectID, null, true);