...
WorkItem myWorkItem.Initiate(inputData: object( string | Xml ), process: string, options: InitiateOptions)
Arguments
Returns
...
Example
Basic Usage
Code Block | ||
---|---|---|
| ||
var formData = '<Root><Name>Lady</Name><Surname>Gaga</Surname></Root>';
var childWorkItem = $WorkItem.Initiate(formData, 'My Process'); |
Example
Initiate by Task Name
Code Block | ||
---|---|---|
| ||
var formData = '<Root><Name>Lady</Name><Surname>Gaga</Surname></Root>';
var childWorkItem = $WorkItem.Initiate(formData, 'My Process', {
task : 'My Task'
}); |
Example
Initiate with User and Culture
Code Block | ||
---|---|---|
| ||
var formData = '<Root><Name>Lady</Name><Surname>Gaga</Surname></Root>';
var initiator = $Membership.Administrator;
var childWorkItem = $WorkItem.Initiate(formData, 'My Process', {
task : 'My Task',
initiator : initiator.id,
culture: 'tr-TR'
}); |
Types
InitiateOptions
{ // Culture of initiated workflow new instance. If not specified uses the current instance culture. Culture : string // Initiator identity of process Initiator Identity of initiator. If not specified null value used. Initiator : string // Parent work item. If not specified current work item is set as parent. Parent : string // Name or Id or name of task to initiate be initiated. If not specified, uses the Initiator task if found only one exist, otherwise throws error. Task : string // Test mode status of initiated workflowSpecifies the initiate in test mode or not. If not specified uses the current instance's test mode state. TestMode : boolean // Version of process to initiate Version : string }