How to use the Workload Management API
This guide will give an explanation into the Workload Management (WLM) API that is being used for the ROFS application.
Background
The workload management (WLM) api, is a service developed by TC's MAACE team to assist teams in the creation of applications that use a work item like structure. In ROFS we are tying each occurrence to a singular work item as defined by the api.
Work Item Structure
WLM defines a work item in JSON format, with the following structure. A few key properties that are important to us are highlighted below:
lineOfBusinessId: Since many teams are using WLM for their applications, the line of business Id separates the work items for each business. For ROFS is it always “005”
detail: This property is where business specific objects are stored, in our case the entirety of our OccurrenceFollowUp class is stored here. This object is stored as a complex JSON type, it is loaded and saved by JSON serialization/ deserialization
initialDetail : Initially the same as detail but doesn’t contain updates to the work item. For tracking purposes.
workItemStatus: This property is used for the status of the work item as a whole. In ROFS it is used as the status of the occurrence followup
workItemAttachments: Used to reference an ID of a file attached to the work item. In ROFS we use this to reference the notification letter that is stored with the document management API.
How to use the API endpoints
Navigate to API swagger page based on your environment
Click Authorize at the top of the page
In the popup window select the scopes you need and click Authorize and login to your Microsoft account when prompted
Go to the endpoint of your choosing and click Try it out to enable the text input fields. Then click execute to execute the endpoint.
Useful endpoints
Get all work items for a specific line of business.
Get a work item by a specific column in the detail property