Publishing and Subscribing to Events
Communication between components in your application is accomplished by publishing, and subscribing to, events.
For example:
- WCC component <-> WCC component - When communicating between WCC components, the Events Editor is used to set up the connection between the components. There is no coding required. When you add a WCC component to your application, the events available from that component are automatically pushed to the PageBus. When you add another WCC component, the Events Editor shows you all of the events that are available to which that component can subscribe.
For information about using the Events Editor, see Events Editor.
- WCC component <-> WCC component in external application - WCC components can also subscribe to events published by other WCC components that reside in an external application. This involves creating an event definition file (using the Application Publish Definer utility — see Events From External Applications) that defines the events published by the WCC components in the external application. The event definition file can then be imported (using the Events Editor) so that a WCC component can subscribe to the events from the external application.
For more information, see Events From External Applications.
- non-WCC component <-> WCC component - When communicating between a non-WCC component and a WCC component, you will need to use the PageBus API to either publish to, or subscribe from, the PageBus, as follows:
- non-WCC component publishing an event - Non-WCC components can publish events to the PageBus using the PageBus.publish method. WCC components can then subscribe to those events.
For more information, see Non-WCC Components Publishing Events.
- non-WCC component subscribing to an event - Non-WCC components can subscribe to events on the PageBus that have been published by WCC components. This is done using the PageBus.subscribe method.
For more information, see Non-WCC Components Subscribing to Events.
- non-WCC component publishing an event - Non-WCC components can publish events to the PageBus using the PageBus.publish method. WCC components can then subscribe to those events.
- non-WCC component <-> non-WCC component - When communicating between non-WCC components, you must use the PageBus publish and subscribe methods to publish to, and subscribe from, the PageBus. For more information, refer to the TIBCO PageBus Developer’s Guide.
Copyright © Cloud Software Group, Inc. All rights reserved.