Non-WCC Code Publishing Events
Non-WCC code can also publish an event to the PageBus.
This causes one of the following to be displayed in the mash-up application:
- work item list
- process instance list
- event list(1) (also called the Event Viewer)
This allows non-WCC code to display a specific work item list or process instance list, and control it from the non-WCC part of the mash-up application. (Note that if you want the user to be able to display custom lists (that is, work item or process instance views), rather than a specific work item or process instance list, then a better option would be to actually display the Work Views or Process Views component.)
The non-WCC code must use the Pagebus.publish method to publish the appropriate event, depending on whether you want a work item list or process instance list displayed. (A publishPassThruEvent method is provided in the IframeContainer class to publish the event if you are using the PageBus Managed Hub in an iframe-to-iframe configuration — see Using the TIBCO PageBus Managed Hub with WCC Components.)
To display the work item list or process instance list, the WCC client application must subscribe to the event that was published by the non-WCC code. This is done using TIBCO General Interface builder. See Subscribing to an Event Published by Non-WCC Code.
Two sample applications are provided that assist you in generating the event that represents the desired work item or process instance list, then publish that event so that the work item or process instance list is displayed:
- pageBusPayloadHelperApp - This application provides a wizard that guides you through building the desired work item or process instance list, then generates the PageBus event payload.
For more information, see pageBusPayloadHelperApp.
- pageBusPayloadPublishApp - This application is used to publish the event message payload you generated with the pageBusPayloadHelperApp application. It renders the work item or process instance list that is described in the payload.
For more information, see pageBusPayloadPublishApp.
Both of these sample applications display a Login dialog. Therefore, you must have a valid user name and password to use these applications.
Also note that an applicationName.create.war.cmd file is provided for both of the pageBus sample applications. These file are used to create a WAR file that can be used to deploy the sample application to a runtime node. For more information, see the "Deploying an Application After Customizing" topic in the TIBCO Workspace Configuration and Customization guide.
The information here is specifically about displaying a work item or process instance list. An event list (the Event Viewer) can also be displayed by non-WCC code by using the showEvent method (or the publishExternalShowEvents method when using the PageBus Managed Hub). For information about showEvents, see showEvents; for information about publishExternalShowEvents, see Using the TIBCO PageBus Managed Hub with WCC Components.