sendEvent function
If your task is an event requestor, call the sendEvent function to send an event to the Application Linking Manager. The sendEvent function initiates the application linking process.
Overview
The sendEvent function is typically attached to a user interface control, such as a link, a button, or an action. When the user interacts with this control, the task calls the sendEvent function, which supplies the event type ID and parameters to the Application Linking Manager. The Application Linking Manager performs several actions to identify the handler to be launched, and then it launches the handler.
To complete the application linking process, the event type specified for the sendEvent must be registered with the Application Linking Manager, and at least one handler must be available to process the request.
To minimize errors during the application linking process, call the getHandlers function and verify that at least one handler is available to handle the event. If no handlers are available, consider hiding or disabling the user interface control that calls the sendEvent function.
Invoking the function
To call the sendEvent function, use the syntax shown in Figure 1.
win.global.applinker.sendEvent(eventTypeId, params);
- eventTypeId
- ID that identifies the type of event.
- params
- JSON object array that contains the name and value for each parameter
that your task will provide with the event. Specifying parameters
is optional. The syntax to use follows:
{parm1: value1, parm2: value2, parm3: value3}
Example
win.global.applinker.sendEvent("IBM.ZOSMF.VIEW_DATASET",{"dataSetName":"myDataSet"});