Skip to content

WorkItem.Trigger

Overview

string[] WorkItem.Trigger ( eventName, inputData )
Triggers the specified event with input data and returns triggered listener work items.

Arguments

string eventName Name of event to be trigger. Multiple events can be specified with ";" delimeter.

XmlNode | String inputData Input data to be sent listeners.

Remarks

If input data is not a instance of XmlNode or string exception is thrown.

If no listener triggered return value is a empty array.

Examples

var workItems = $WorkItem.Trigger('Customer.Created', $Xml.SelectSingle('Customer'));

if (workItems.length) {
   var workItem = workItems[0];
}

See Also