Existing Reference Architecture
Repos
WorkLoadManagementService:
WLMDemoPortal:
MTOA API SERVICE(Wrapper around MTOA, SIAPI, SPAPI AND TMAPI):
Creating new request flow in WLM
The following diagram shows the data flow between, the WLM Demo Portal, WLMWorkloadManagementService and MTOA for a new request:
Topics
workload-servicerequest-topic: The WorkloadManagmentService will push new work item request to this topic:
Payload structure:
public class WorkItemCreatedEvent : EventModel
{
public int UserId { get; set; }
public string RequestTypeId { get; set; }
public int? OrganizationId { get; set; }
public string RequestStatus { get; set; }
public string EnglishDisplayName { get; set; }
public string FrenchDisplayName { get; set; }
public int? MetadataStructureId { get; set; }
public List<KeyValuePair<string, string>> Metadata { get; set; }
}
workload-serviceresponse-topic: this topic would be used to send service order creation response back to WorkloadManagement Service.
Below is the payload:
public class MtoaServiceRequestResponse
{
public int ServiceRequestId { get; set; }
public string WorkLoadItemId { get; set; }
}
Subscribers
workload-servicerequest-sub: subscribes workload-servicerequest-topic. Listener is setup in MTOAAPIService.api.
workload-serviceresponse-sub: Subscribes in WorkloadManagement to update the external reference number in Database.
Observations:
Few values are hardcoded while service request is created in MTOAApiService.api. below is the screenshot (considering these values to be received from CRSM Test Service)
Updating service request flow
Current Status Mapping:
WLM Status | MTOS Status |
001 | Submitted |
002 | In Progress |
003 | Information Required |
004 | Document Issued |
005 | Rejected |
006 | Cancelled |
007 | Initiated |
011 | On Hold |
The following diagram shows the data flow between, the WLM Demo Portal, WLMWorkloadManagementService and MTOA when the status is changed in WLM Demo Portal:
Topic
workload-servicestatus-topic: WLMPortal pushes the payload to this topic whenever status of work item is changed by used. Below is the payload.
public class WorkItemStatusChangedEvent : EventModel
{
public int WorkItemId { get; set; }
public string ExternalServiceRequestId { get; set; }
public string PreviousWorkItemStatusCode { get; set; }
public string CurrentWorkItemStatusCode { get; set; }
}
Subscribers
workload-servicestatus-sub: Subscribed by MTOAPIService and updates the status to MTOAOn- PremService.