JSON Message Format
The following examples show the JSON serialized format of the Openspace published ManagedEvent messages. These values are returned in the onDataCallback which looks like this:
function onDataCallback(topic, message, subscriberData) { // Process topic and message here. }
where:
- topic = A JavaScript String.
- message = A JavaScript Object.
- subscriberData = The value passed on the subscribe method.
The onDataCallback function is passed as a parameter to the JavaScript iframeHubClient.subscribe method.
Note: The format of the message parameter of the OnData callback is a JavaScript Object that looks like this:
{ message : "A JSON serialized string for the data that the ManagedEvent class defines", messageType : "com.tibco.bpm.web.client.model.pagebus.message.PageBusMessage", schemaId : "com.tibco.bpm.web.client.model.managedevents.ManagedEventClassName_Ext_ManagedEvent_1.0.0", topic : "com.tibco.bpm.web.client.model.managedevents.ManagedEventClassName_Ext_ManagedEvent" }
BusinessService Event |
---|
topic :"com.tibco.bpm.web.client.model.managedevents.BusinessServiceEvent_Ext_ManagedEvent" message : { message : "{\"action\":\"START\",\"processInstanceId\":\"processInstanceId\",\"moduleName\":\"moduleName\",\"processName\":\"processName\",\"version\":\"version\",\"category\":\"category\",\"managedEventVersion\":\"1.0.0\"}", messageType : "com.tibco.bpm.web.client.model.pagebus.message.PageBusMessage", schemaId : "com.tibco.bpm.web.client.model.managedevents.BusinessServiceEvent_Ext_ManagedEvent_1.0.0", topic : "com.tibco.bpm.web.client.model.managedevents.BusinessServiceEvent_Ext_ManagedEvent" } or { message : "{\"action\":\"one of: CANCEL, COMPLETE, UPDATE\",\"processInstanceId\":\"processInstanceId\",\"managedEventVersion\":\"1.0.0\"}", messageType : "com.tibco.bpm.web.client.model.pagebus.message.PageBusMessage", schemaId : "com.tibco.bpm.web.client.model.managedevents.BusinessServiceEvent_Ext_ManagedEvent_1.0.0", topic : "com.tibco.bpm.web.client.model.managedevents.BusinessServiceEvent_Ext_ManagedEvent" } |
LocaleChangedEvent |
---|
topic :"com.tibco.bpm.web.client.model.managedevents.LocaleChangedEvent_Ext_ManagedEvent" message : { message : "{\"locale\":\"en_us\",\"names\":[\"GadgetClassName1\",\"GadgetClassName2\"],\"managedEventVersion\":\"1.0.0\"}", messageType : "com.tibco.bpm.web.client.model.pagebus.message.PageBusMessage", schemaId : "com.tibco.bpm.web.client.model.managedevents.LocaleChangedEvent_Ext_ManagedEvent_1.0.0", topic : "com.tibco.bpm.web.client.model.managedevents.LocaleChangedEvent_Ext_ManagedEvent" } |
or |
{ message : "{\"locale\":\"en_us\",\"names\":[],\"managedEventVersion\":\"1.0.0\"}", messageType : "com.tibco.bpm.web.client.model.pagebus.message.PageBusMessage", schemaId : "com.tibco.bpm.web.client.model.managedevents.LocaleChangedEvent_Ext_ManagedEvent_1.0.0", topic : "com.tibco.bpm.web.client.model.managedevents.LocaleChangedEvent_Ext_ManagedEvent" } |
LoginEvent |
---|
topic :"com.tibco.bpm.web.client.model.managedevents.LoginEvent_Ext_ManagedEvent" message : { message : "{\"username\":\"username\",\"guid\":\"guid\",\"managedEventVersion\":\"1.0.0\"}" messageType : "com.tibco.bpm.web.client.model.pagebus.message.PageBusMessage", schemaId : "com.tibco.bpm.web.client.model.managedevents.LoginEvent_Ext_ManagedEvent_1.0.0", topic : "com.tibco.bpm.web.client.model.managedevents.LoginEvent_Ext_ManagedEvent" } |
LogoutEvent |
---|
topic :"com.tibco.bpm.web.client.model.managedevents.LogoutEvent_Ext_ManagedEvent" message : { message : "{\"username\":\"username\",\"managedEventVersion\":\"1.0.0\"}", messageType : "com.tibco.bpm.web.client.model.pagebus.message.PageBusMessage", schemaId : "com.tibco.bpm.web.client.model.managedevents.LogoutEvent_Ext_ManagedEvent_1.0.0", topic : "com.tibco.bpm.web.client.model.managedevents.LogoutEvent_Ext_ManagedEvent" } |
PersistenceEvent |
---|
topic : "com.tibco.bpm.web.client.model.managedevents.PersistenceEvent_Ext_ManagedEvent" message : { message : "{\"action\":\"one of: SAVE_DEFAULTS, DROP_USER, RESET_PERSONAS\",\"persona\":\"persona\",\"managedEventVersion\":\"1.0.0\"}", messageType : "com.tibco.bpm.web.client.model.pagebus.message.PageBusMessage", schemaId : "com.tibco.bpm.web.client.model.managedevents.PersistenceEvent_Ext_ManagedEvent_1.0.0", topic : "com.tibco.bpm.web.client.model.managedevents.PersistenceEvent_Ext_ManagedEvent" } |
or |
{ message : "{\"action\":\"RESET_PERSONA\",\"managedEventVersion\":\"1.0.0\"}", messageType : "com.tibco.bpm.web.client.model.pagebus.message.PageBusMessage", schemaId : "com.tibco.bpm.web.client.model.managedevents.PersistenceEvent_Ext_ManagedEvent_1.0.0", topic : "com.tibco.bpm.web.client.model.managedevents.PersistenceEvent_Ext_ManagedEvent" } |
ProcessInstanceEvent |
---|
topic :"com.tibco.bpm.web.client.model.managedevents.ProcessInstanceEvent_Ext_ManagedEvent" message : { message : "{\"action\":\"START\",\"processInstanceId\":\"processId\",\"moduleName\":\"moduleName\",\"processName\":\"processName\",\"version\":\"version\",\"managedEventVersion\":\"1.0.0\"}", messageType : "com.tibco.bpm.web.client.model.pagebus.message.PageBusMessage", schemaId : "com.tibco.bpm.web.client.model.managedevents.ProcessInstanceEvent_Ext_ManagedEvent_1.0.0", topic : "com.tibco.bpm.web.client.model.managedevents.ProcessInstanceEvent_Ext_ManagedEvent" } |
or |
{ message : "{\"action\":\"one of: CANCEL, RESUME, SUSPEND\",\"processInstanceId\":\"processId\",\"managedEventVersion\":\"1.0.0\"}", messageType : "com.tibco.bpm.web.client.model.pagebus.message.PageBusMessage", schemaId : "com.tibco.bpm.web.client.model.managedevents.ProcessInstanceEvent_Ext_ManagedEvent_1.0.0", topic : "com.tibco.bpm.web.client.model.managedevents.ProcessInstanceEvent_Ext_ManagedEvent" } |
or |
{ message : "{\"action\":\" SELECT\",\"processInstanceId\":\"managedEventVersion\":\"1.0.0\"}", messageType : "com.tibco.bpm.web.client.model.pagebus.message.PageBusMessage", schemaId : "com.tibco.bpm.web.client.model.managedevents.ProcessInstanceEvent_Ext_ManagedEvent_1.0.0", topic : "com.tibco.bpm.web.client.model.managedevents.ProcessInstanceEvent_Ext_ManagedEvent" } |
Process Template Event |
---|
topic : "com.tibco.bpm.web.client.model.managedevents.ProcessTemplateEvent_Ext_ManagedEvent" message : { message : "{\"action\":\"SELECT\",\"moduleName\",\"processName\":\"version\":\"description\",\"managedEventVersion\":\"1.0.0\"}", messageType : "com.tibco.bpm.web.client.model.pagebus.message.PageBusMessage", schemaId : "com.tibco.bpm.web.client.model.managedevents.ProcessTemplateEvent_Ext_ManagedEvent_1.0.0", topic : "com.tibco.bpm.web.client.model.managedevents.ProcessTemplateEvent_Ext_ManagedEvent" } |
SystemActionsEvent |
---|
topic :"com.tibco.bpm.web.client.model.managedevents.SystemActionsEvent_Ext_ManagedEvent" message : { message : "{\"systemActions\":[{key:{\"entityType\":\”entityGuid\":\"actionComponent\":\"actionComponent1\",\"actionName\":\"actionName1\"},value:true},{key:{\"entityType\":\"entityGuid\":\"actionComponent\":\"actionComponent2\",\"actionName\":\"actionName2\"},value:true}],\"managedEventVersion\":\"1.0.0\"}", messageType : "com.tibco.bpm.web.client.model.pagebus.message.PageBusMessage", schemaId : "com.tibco.bpm.web.client.model.managedevents.SystemActionsEvent_Ext_ManagedEvent_1.0.0", topic : "com.tibco.bpm.web.client.model.managedevents.SystemActionsEvent_Ext_ManagedEvent" } |
WebviewChangedEvent |
---|
topic : "com.tibco.bpm.web.client.model.managedevents.WebviewChangedEvent_Ext_ManagedEvent" message : { message : "{\"subject\":\"subject\",\"managedEventVersion\":\"1.0.0\"}", messageType : "com.tibco.bpm.web.client.model.pagebus.message.PageBusMessage", schemaId : "com.tibco.bpm.web.client.model.managedevents.WebviewChangedEvent_Ext_ManagedEvent_1.0.0", topic : "com.tibco.bpm.web.client.model.managedevents.WebviewChangedEvent_Ext_ManagedEvent" } |
WorkItemDataEvent |
---|
topic :"com.tibco.bpm.web.client.model.managedevents.WorkItemDataEvent_Ext_ManagedEvent" message : { message : "{\"action\":\"OPEN\",\"workItemId\":1234,\"version\":12,\"processId\":\"processId\",\"dataFeed\":\"dataFeed\",\"managedEventVersion\":\"1.0.0\"}", messageType : "com.tibco.bpm.web.client.model.pagebus.message.PageBusMessage", schemaId : "com.tibco.bpm.web.client.model.managedevents.WorkItemDataEvent_Ext_ManagedEvent_1.0.0", topic : "com.tibco.bpm.web.client.model.managedevents.WorkItemDataEvent_Ext_ManagedEvent" } |
WorkItemEvent |
---|
topic : "com.tibco.bpm.web.client.model.managedevents.WorkItemEvent_Ext_ManagedEvent" message : { message : "{\"action\":\"one of: OPEN, CLOSE, COMPLETE, CANCEL, SELECT\",\"workItemId\":1234,\"version\":12,\"processId\":\"processId\",\"managedEventVersion\":\"1.0.0\"}", messageType : "com.tibco.bpm.web.client.model.pagebus.message.PageBusMessage", schemaId : "com.tibco.bpm.web.client.model.managedevents.WorkItemEvent_Ext_ManagedEvent_1.0.0", topic : "com.tibco.bpm.web.client.model.managedevents.WorkItemEvent_Ext_ManagedEvent" } |
or |
{ message : "{\"action\":\"CLOSE_LIST\",\"workItemId\":0,\"version\":0,\"closeListItems\":[{\"workItemId\":123,\"version\":12},{\"workItemId\":124,\"version\":13},{\"workItemId\":125,\"version\":14}],\"managedEventVersion\":\"1.0.0\"}", messageType : "com.tibco.bpm.web.client.model.pagebus.message.PageBusMessage", schemaId : "com.tibco.bpm.web.client.model.managedevents.WorkItemEvent_Ext_ManagedEvent_1.0.0", topic : "com.tibco.bpm.web.client.model.managedevents.WorkItemEvent_Ext_ManagedEvent" } |
Copyright © Cloud Software Group, Inc. All rights reserved.