The non-SAP automation engine provides the following REST APIs:
The APIs are accessible over the Internet.
Ideally, the automation engine supports context sensitive navigation to the operation flow execution via a URL that accepts the execution identifier as URL parameter.
Establish connectivity
Define mapping
The mapping file needs to define the request and response for the supported events.
You can take the following generic mapping as a template and adapt it to your automation engine. Please note: This mapping serves only as a template, it will not work out of the box and need to be adapted.
"switches":[ {
"name": "switchExternalStatus",
"cases":
[
{
"when": "Running”,
"then": "STARTED"
},
{
"when": "Failed",
"then": "FAILED"
},
{
"when": "Cancelled",
"then": "FAILED"
},
{
"when": "Finished",
"then": "COMPLETED"
}
],
"default": "FAILED"
}],
"structure": {
"request": {
"globalVariables":[{
"variableKey" : "<EventName>",
"variableValue": "#{eventName}"
},
{
"variableKey" : "<StartTime>",
"variableValue": "#{timestamp}"
},
{
"variableKey" : "<EventData>",
"variableValue": "#{eventDetailsTable}"
},
{
"variableKey" : "<ServiceName>",
"variableValue": "#{serviceName}"
}]},
"response": {
"externalResourceId":"#{<executionId>}",
"externalResourceStatus":"${SWITCH(switchExternalStatus,<status>)}",
"displayUrl":"https://<prefix>/#{<executionId>}"
}
},
"eventTypeMapping": {
"_comment":"Specific event type mapping",
"operationMappings":[{
"eventType":"OPERATIONFLOW.STARTED",
"operation":"POST",
"path":"/<prefix>/#{<automationId>}/<suffix>",
"responseRoot":"",
},
{
"eventType":"OPERATIONFLOW.GETDEFINITIONS",
"operation":"GET",
"responseRoot":"",
"structure": {
"response": {
"definitions": [{
"automationId": "<id>",
"name": "<name>"
},
{
"automationId": "002",
"name": "IDoc Re-Process"
},
{
"automationId": "003",
"name": "AIF Message Reprocess"
},
{
"automationId": "004",
"name": "Upscale CF APP"
},
{
"automationId": "005",
"name": "Restart failed jobs"
}]
}
}
},
{
"eventType": "OPERATIONFLOW.PING",
"operation": "GET",
"path": "/<prefix>/#{externalResourceId}/<suffix>",
"responseRoot": "",
"structure":
{
"response":
{
"externalResourceId":"#{executiond}",
"externalResourceStatus":"${SWITCH(switchExternalStatus,status)}"
}
}
}]}}
Please note that the mapping example above is only a template and cannot work out of the box. It needs to be adapted as explained below
Once you have completed the mapping verify that it has a valid JSON structure.
Upload mapping
Define subscription
Test the subscription
Prerequisites:
Testing the event OPERATIONFLOW.GETDEFINITIONS
Testing the event OPERATIONFLOW.STARTED
Testing the event OPERATIONFLOW.PING and the context sensitive navigation link.
Troubleshooting