Test the business process
After a business process is configured for an issue analysis, you can manually run the analysis on an issue through an API.
- Open VS Code in the virtual machine using the icon on the left of the desktop.
- Open the files
BPL-request-1.http, BPL-request-2.http, and BPL-request-3.http. These files contain the requests for the following steps. You can click Send Request at the top of each file to send the REST requests. - Send the request in
BPL-request-1.http, which creates a new issue.
- HTTP Action:
POST - URL:
http://server/api/scdata/v1/issues
- Header name:
Content-Type
- Header value:
application/json - Body:Begin code.
{
"uid": "ISSUE-1001",
"description": "Issue created from API",
"impactedObjectType": "SupplyShipment",
"impactedObjectId": "29",
"triggerType": "API",
"issueCategory": "ShipmentIssue",
"severity": 1
} End code.
- Next, using the second request file, run the issue analysis using the following REST call.
- HTTP Action:
POST
- URL:
http://server/api/scbi/v1/runissueanalysis/ISSUE-1001
- Header name:
Content-Type
- Header value:
application/json
- Body: Begin code.End code.
- If the second REST call is successful, run the following REST call to retrieve the analysis details using the third REST request file:
- HTTP Action:
GET
- URL:
http://server/api/scdata/v1/issues/ISSUE-1001
The following is a sample response of such an API call:
Begin code.{
"ID": "877",
"recordCreatedTime": "2022-10-15T14:32:55.472Z",
"lastUpdatedTime": "2022-10-17T09:50:35.180Z",
"description": "Sales orders which were shipped late compared to the committed ship date",
"triggerType": "KPI",
"triggerObjectId": "SalesOrderLateShipVsCommitted",
"impactedObjectType": "SalesOrder",
"impactedObjectId": "d60924c1-ec18-4de8-963d-c569d75fb201",
"severity": 2,
"urgency": 3,
"status": "workflow",
"latestAnalysis": {
"recordCreatedTime": "2022-10-17T09:50:35.174Z",
"lastUpdatedTime": "2022-10-17T09:50:35.179Z",
"issueId": 877,
"runSequence": 3,
"processName": "MfgOrderProcess",
"severity": 2,
"urgency": 3,
"rootCauseAnalysis": "Order expected to be late due to a delayed maintenance caused by a late shipment of a part needed. ",
"impactAnalysis": "Serious customer satisfaction concerns, and a penalty of $50K.",
"workflowId": "54",
"status": "workflow",
"resolution": "none",
"scenarios": [
{
"optionNumber": "A",
"optionName": "Option A",
"description": "Move the sales order to Hamburg plant",
"costImpact": 1500,
"timeImpact": 36,
"supportingData": "Impact: The order will be fulfilled on time, with extra $1500 shipping cost. Extra work load on Hamburg plant will require an early maintenance window.",
"feasibility": 1,
"recommended": 1
},
{
"optionNumber": "A",
"optionName": "Option B",
"description": "Wait for the part, complete the maintenance, and use expedited shipping once done.",
"costImpact": 500,
"timeImpact": 0,
"supportingData": "Impact: $2000 extra shipping cost. Order expected to be 2 days late.",
"feasibility": 1,
"recommended": 0
},
{
"optionNumber": "C",
"optionName": "Option C",
"description": "Leverage spare parts in Munich plant and redirect current shipment to Munich.",
"costImpact": 12000,
"timeImpact": 0,
"supportingData": "Impact: Current sales order will be done on time, but this will put $250,000 revenue at risk at Munich plant due to the delayed maintenance.",
"feasibility": 1,
"recommended": 0
}
]
}
}
End code.