Jump to: navigation, search

CometD notifications

You can subscribe to the /v2/me/workitems topic to receive CometD notifications for the Workitem API. This topic provides messages related to workitems, including changes to workitem state and updates to workitem data. It supports the following message types:

WorkitemStateChangeMessage

Property Description
data The data element is present in all CometD notifications and is the root JSON element. You can use data.messageType to identify the message and determine what other properties should be present.
data.messageType This property identifies the message type, in this case WorkitemStateChangeMessage.
data.notificationType This property further identifies the type of notification and can have one of the following values:
  • StatusChange — The status of the workitem has changed.
  • PropertiesUpdated — The workitem data has changed.
  • Error — This is sent when an operation on the workitem resource fails.
data.workitem A workitem resource with the updated state and capabilities.
data.referenceId The reference identifier is used to link the notification to the original request that created it.

Example

{  
   "data":{  
      "workitem":{  
         "state":"Processing",
         "capabilities":[  
            "Transfer",
            "AttachUserData",
            "UpdateUserData",
            "DeleteUserData",
            "SetInFocus",
            "Complete"
         ],
         "id":"03W0GH2KD56YV000",
         "workitemType":"Inbound",
         "uri":"http://10.10.15.212:9090/api/v2/workitems/03W0GH2KD56YV000"
      },
      "referenceId":8,
      "notificationType":"StatusChange",
      "messageType":"WorkitemStateChangeMessage"
   }
}
This page was last edited on March 25, 2016, at 18:23.
Comments or questions about this documentation? Contact us for support!