Publish method: PSEvent class
Syntax
Publish(event_name)
Description
Use the Publish method to publish a notification for an event.
Parameters
| Parameter | Description |
|---|---|
|
event_name |
A string representing the name of the event as defined on the Define Server Side Events page. |
Returns
A Boolean value: True if the method completes successfully, False otherwise.
Example
The following example uses a method definition to set event data and then publish a notification named WORKFLOWAPPROVAL.
method SendApprovalNotification
/+ &category as String, +/
/+ &message as String, +/
/+ &actionsLink as String, +/
Local object &EventObject;
&EventObject = CreateObject("PSEvent");
&EventObject.SetKeyValuePair("CATEGORYNAME", &category);
&EventObject.SetKeyValuePair("MESSAGE", &message);
&EventObject.SetKeyValuePair("ACTIONSLINK", &actionsLink);
&EventObject.Publish("WORKFLOWAPPROVAL");
end-method;