Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

WorkItem myWorkItem.Initiate(inputData: object( string | Xml ), process: string, options: InitiateOptions)

Arguments

object ( string | Xml ) inputData
Input data to pass initiated processnew workflow instance in xml string or xml object.
string process
nameSpecifies the process of new instance. Can be Name or Id number of process. If not specified current process is used.
of initiateSpecifies the options of new instance.

Returns

...

Example

Basic Usage

Code Block
languagejs
var formData = '<Root><Name>Lady</Name><Surname>Gaga</Surname></Root>';
var childWorkItem = $WorkItem.Initiate(formData, 'My Process');

Example

Initiate by Task Name

Code Block
languagejs
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
languagejs
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 }

See Also