Non-WCC Components Publishing Events

Non-WCC components can publish events to the PageBus using the PageBus.publish method. WCC components can then subscribe to those events.

The PageBus.publish method passes the following parameters:

Name Type Description
topic string Topic name on which to publish the message. This must not be a wildcard topic.
message any Message content. This data value should be serializable as JSON. If the event cache is used, this data value must be serializable as JSON.

For WCC components, the topic has the form:

com.tibco.wcc.appModelName.prototypeModelName.componentModelName.eventName

where:

  • com.tibco.wcc.appModelName - The application model name (see: app.getModelName() )
  • prototypeModelName - The model name given to the prototype that contains the component, wccPrototype, by default.
  • componentModelName - The model name given to the component, wccWorkItems, for example.

The message parameter is a JavaScript object and has the form:

{
     jss  : "org.pagebus.msg.Message",
     jssv : "2.0.0",
     head : {topic : eventName},
     body : bodyObject
}

where:

  • bodyObject is a JavaScript object that contains the data expected by the WCC component that will subscribe to that event.

    For information about the data in this object for each event, see Component PageBus Event Payloads.

For more details about using the publish method, see the TIBCO PageBus™ Developer’s Guide.