sendEvent


Purpose

Sends an event to a selected web application.

Signature

sendEvent( data, destination, options, callbacks )

Returns

This method does not return anything.

Parameter

The sendEvent method takes the following three four parameters:

Name Description Type Use
data A message sent by the sender web application. It may be a JSON object. object required
destination A URL address or application ID of the target web application. string optional
options A configuration object that contains only one parameter. The "start" boolean parameter is passed to specify if the target application should be started. It will be ignored if the destination parameter has not been set. The default value of this parameter is "true". object optional
callbacks

Passed to verify whether it was possible to deliver the event. It may be used only if the destination parameter has been set.

object optional

Note

If the destination parameter is "null", the event will be broadcast to all registered recipient web applications, except for the sender application. If it is set to the sender application, the event will be ignored.

The sendEvent method's callbacks object can be structured as follows:

{
  onSuccess: function() {...},
  onFailure: function(error) {...}
}

The table below lists all callbacks supported by the method.

Name Description Return type
onSuccess

Called when the function finishes without an error.

undefined
onFailure

Called when an error occurs. Possible failure types are listed in the Constants section of the InterAppCommunicator article).

undefined

Related topics

InterAppCommunicator
Legal notice | Copyright © 2015 and Confidential to Pegasystems Inc. All rights reserved. | Feedback
Advanced...