This project is based on Mulesoft Dataweave and Salesforce to provide secure, reliable, API access for all the Scores apps and projects. It is hosted on Anypoint and acts as the transactional hub, in concert with the authentication API
Fixed the Issue GET /enrollments/{enrollmentId} with implementing a choice in the .xml flow as follows:
Success flow: If post get payload is not null and size of payload is not equal to Zero, then return the payload and set the status code as 200 OK
Error flow: otherwise, then set the payload message as Enrollment Not Found and status code as 404 Not Found and return.
[ ] Update the flow endpoint in the RAML file src/main/resources/api/salesforce-data-api.raml
[ ] Document the changes to the RAML file in docs/raml_changes
[X] Update the flow in the related .xml file
[ ] Update the flow into the Postman collection
[X] Test the new flow locally using Postman or Thunder (for testing, don't forget to point to local RAML in src/main/mule/global.xml: api="salesforce-data-api.raml").
Description:
Fixed the Issue
GET /enrollments/{enrollmentId}
with implementing a choice in the .xml flow as follows:not null
and size of payload is not equal to Zero, then return the payload and set the status code as200 OK
Enrollment Not Found
and status code as404 Not Found
and return.src/main/resources/api/salesforce-data-api.raml
docs/raml_changes
.xml
filesrc/main/mule/global.xml
:api="salesforce-data-api.raml"
).Test Example:
GET
{{base_url}}/enrollments/{enrollmentId}
Payload 1:
Payload 2:
Screenshots of Tests:
Payload 1:
Payload 2: