Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved

Chapter 4 Events Editor : Using the Events Editor

Using the Events Editor
The Events Editor is used to specify the PageBus events to which you would like a WCC component to subscribe. (For information about the PageBus, see Communications Overview.)
Opening the Events Editor causes it to query all of the TIBCO iProcess Workspace (Browser) components in the application to determine their public events, and present them in a dialog so that you can choose which to subscribe to. (All public events in the application are shown except for those published by the component you are configuring — it would not make sense for a component to subscribe to its own events.)
To subscribe to events for a particular component, in the Component Hierarchy palette, click on the component that will be subscribing to events published by other components:
If the Properties/Events Editor is already displayed when you click on the component, it will now show the properties/events for the component you selected in the Component Hierarchy palette.
If the Properties/Events Editor is not currently displayed when you click on the component, a button appears in the TIBCO® General Interface Builder taskbar that, when clicked, displays the Properties/Events Editor:
If the Properties/Events Editor is not displayed on the taskbar, double click on a component in the Component Hierarchy palette to open the editor.
Click on the Events tab to display the Events Editor. A dialog similar to the following is displayed.
This dialog presents all of the events published by all of the components currently defined in the application (with the exception of the component you are currently configuring). The following describes the information presented on this dialog:
In the example above, the wccCases component (the one we are configuring) can subscribe to events published by the wccLogin and wccStartHistoryProcs components — they are the other components that have been added to the application so far. The wccLogin component is publishing one event to which the wccCases component can subscribe; the wccStartHistoryProcs component is publishing five different events to which the wccCases component can subscribe.
Note that although all events published to the PageBus are shown in the Events Editor, it may not make sense to subscribe to some events in the context of the component you are configuring. For instance, when configuring the wccCases component, it does not make sense to subscribe to the “Login Completeevent on the wccLogin component. It does make sense, however, to subscribe to the “List Item Select (single click)” event on the wccStartHistoryProcs component to display the case list for the procedure that was selected.
When you attempt to subscribe to an event, the Event Editor verifies via schema files that the data that will be passed by the event is the data that the component expects. For example, if the component subscribing to the event expects a work queue tag, but the schema indicates the event is going to pass a work item tag, the Event Editor will warn you by displaying the following:
The editor will allow you to continue with the subscription if that is what you want.
For more information about the individual events for each component, see the TIBCO iProcess Workspace (Browser) Components Reference.
Subscribing to Events
The check box to the left of each event name in the Event Editor indicates whether or not the component you are configuring will subscribe to that event:
To specify that you want the component to subscribe to an event, double-click on the desired event name. This causes the event’s check box to become checked:
To unsubscribe to an event, double-click the event name again to remove the check mark.
After checking the appropriate event check boxes in the Events Editor, commit your changes by clicking on the Commit button. This immediately applies the changes you’ve made.
Composite Components Events
There are composite components available that combine more than one component into a single component to provide an easy way to display multiple lists of elements without the need to add multiple components to your project and set up the events between those components — the events between the components provided in the composites are already configured.
For example, the composite component wccWorkQsItems includes the wccUserWorkQs and wccWorkItems components:
With this composite component, the wccWorkItems component automatically subscribes to the “List Item Select (single click)” event on the wccUserWorkQs component — you do not need to configure any events between those components. You will only need to specify the event to which the wccWorkQsItems composite component will subscribe (which is likely the “Login Complete” event on the wccLogin component).
In fact, if you select a composite’s underlying component in the Component Hierarchy, then display the Properties/Event Editor, the Events tab is disabled, as those components cannot subscribe to events. (Note, however, other components may subscribe to the events published by the underlying components.)
Events From External Applications
Because TIBCO iProcess Workspace (Browser) components need to communicate with applications that exist outside of their own application, the Events Editor provides an Import function that is used to import event definition files that contain the definitions of events in external applications. This allows you to see, and subscribe to, events in the Events Editor that are being published by external applications.
TIBCO® General Interface Builder provides an Application Publish Definer that is used to create an event definition file from within the external application. You can then import that file into another WCC application and subscribe to the events published by the external application.
Event definition files must conform to the schema defined in the file:
WorkspaceDir\JSXAPPS\WCCProjectName\defs\app.pub.schema.xsd
where WorkspaceDir is the workspace directory you specified after starting TIBCO® General Interface Builder, and WCCProjectName is the name you gave the WCC Project when creating your custom application with the iProcess Workspace (Browser) components.
The following subsections describe the steps necessary to create the event definition file, then import that file into another WCC application to it can subscribe to the events defined in that file.
Creating the External Application Event Definition
1.
The Project Settings dialog is displayed.
2.
Click the WCC Settings button.
3.
Click the Open Application Publish Definer button.
The Create new WCC Application File dialog is displayed. This dialog allows you to enter an application model name that will be used in the name of the event definition file, as follows:
WCCProjectName.app.pub.xml
where WCCProjectName is the name of the current WCC project/application.
It defaults to using the application model name for your current application.
4.
Click the Create button.
A dialog is displayed that allows you to point to the prototype file for your external application.
5.
Click the Include button.
The Include Files window is displayed.
6.
WorkspaceDir\JSXAPPS\WCCProjectName\application\prototypes\appMain.xml
where WorkspaceDir is the workspace directory you specified after starting TIBCO® General Interface Builder, and WCCProjectName is the name you gave the WCC Project when creating your application with the iProcess Workspace (Browser) components.
7.
From the Include Files dialog, click the Include button.
8.
Click the Save button to save the event definition file, then click Close to close the dialog.
9.
Click the Cancel button to close the Project Settings dialog.
The new event definition file is saved in the following location:
   WorkspaceDir\JSXAPPS\WCCProjectName\defs\WCCProjectName.app.pub.xml
where WorkspaceDir is the workspace directory you specified after starting TIBCO® General Interface Builder, and WCCProjectName is the name you gave the WCC Project when creating your custom application with the iProcess Workspace (Browser) components.
The new event definition file can now be imported into another WCC application.
Importing the Event Definition File
1.
2.
3.
Click the Import button in the Events Editor.
The Import Files dialog is displayed.
4.
5.
The Events Editor will now include the components and events from the external application. In the following example, the external application (named “ExternalApp”) contains two components whose events your custom application can subscribe:
6.
Note - The external application’s components / events can be removed from the Events Editor by clicking on the Remove button. This displays the Remove Files dialog from which you can select the desired event definition file for removal.
 

Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved