Mandatory disclosure rules
This microservice is used to submit an XML file to EIS.
Overview:
This microservice receives an upscan url from mandatory-disclosure-rules-frontend. It loads the XML and then validates it against XML schema. If this fails validation we pass errors back to the frontend to be displayed to the user. If it passes schema validation the submission undergoes a second layer of validation against business rules handled by CADX. If the submission passes this validation and is submitted successfully an Accepted status is returned. If the submission fails business rule validation a Rejected status containing error codes is returned which is then passed back to the frontend.
This service notifies users if the submission is successfully submitted or has problems.
This service interacts with mandatory disclosure rules frontend, Upscan, Email Service & EIS/CADX.
API
PATH | Supported Methods | Description |
---|---|---|
/callback |
POST | Upscan callback |
/upscan/details/:uploadId |
GET | Retrieves upscan session details containing UploadId, Reference & Status |
/upscan/status/:uploadId |
GET | Retrieves only the upload Status |
/upscan/upload |
POST | Request an upload |
/validate-submission |
POST | Performs XML schema validation & returns either messageSpecData containing messageRefID & messageTypeIndic or errors |
/files/:conversationId/details |
GET | Retrieves specific file details from Mongo store containing subscriptionID, messageRefID, file status, file name & timestamps |
/files/details |
GET | Retrieves details of all submitted files from Mongo store |
/files/:conversationId/status |
GET | Retrieves file status for a specific file from Mongo store |
/dac6/dct72a/v1 |
POST | Submits disclosure to EIS |
/dac6/dct70d/v1 |
POST | Retrieves Subscription Details (Contact Details) |
/dac6/dct70e/v1 |
POST | Updates Subscription Details (Contact Details) |
/validation-result |
POST | Retrieves & Processes result from CADX validation |
API specs:
- MDR Read Subscription API
- MDR Update Subscription API
- File Submission MDTP to CADX
- Result of MDR Business Rule Check
Run Locally
This service runs on port 10019 and is named MANDATORY_DISCLOSURE_RULES in service manager.
Run the following command to start services locally:
sm --start MDR_ALL -r
Acceptance test repo:
mandatory-disclosure-rules-file-upload-ui-tests
Requirements
This service is written in Scala and Play, and requires a Java 8 [JRE] to run.