Initiate¶
Initiates a new workflow instance with the specified arguments.
$Domain.Initiate(inputData: ( string | Xml ), process: string, options?: CaseId : string
The case to associate with the initiated instance.
Culture : string
The culture of the new instance. If not specified, the current instance culture is used.
Initiator : ( string | Identity )
The identity of the initiator. If not specified, a null value is used.
Parent : ( string | WorkItem )
The parent work item. If not specified, the current work item is set as the parent.
Task : string
The name or ID of the task to initiate. If not specified, the initiator task is used if exactly one exists; otherwise, an error is thrown.
TestMode : boolean
Specifies whether to initiate in test mode. If not specified, the current instance's test mode state is used.
Version : string
The version of the process to initiate.):WorkItem
Parameters¶
( string | Xml ) inputData
Specifies the input data of the new instance, as an XML string or Xml node.
string process
Specifies the process of the new instance, either by name or ID number. If not specified, the current process is used.
CaseId : string
The case to associate with the initiated instance.
Culture : string
The culture of the new instance. If not specified, the current instance culture is used.
Initiator : ( string | Identity )
The identity of the initiator. If not specified, a null value is used.
Parent : ( string | WorkItem )
The parent work item. If not specified, the current work item is set as the parent.
Task : string
The name or ID of the task to initiate. If not specified, the initiator task is used if exactly one exists; otherwise, an error is thrown.
TestMode : boolean
Specifies whether to initiate in test mode. If not specified, the current instance's test mode state is used.
Version : string
The version of the process to initiate. options optional
Specifies the options for the new instance.
Returns¶
The first work item of the initiated workflow.
Remarks¶
inputData must be an XML string or Xml; other values are rejected before the process is started. Both camel-case and Pascal-case option names are accepted. If a parent work item is supplied, omitted Culture and TestMode values inherit from that parent instance, and the parent completion identity is retained for the new instance.
The process/task selection must resolve to exactly one start configuration. No matching configuration, or more than one match, raises a script error rather than choosing arbitrarily.