How to use handle our execution result events
Following are the two examples:
-
Connector Package Execution Response
-
Orchestrator Package Execution Response
Both packages are using Bosch Foundation Message object to publish their execution response. After requesting to execute Connector or Orchestrator Package, ERP Connectivity will publish the execution result on the message topic (shown in the examples below). Caller should subscribe to that message topic so that they can receive the execution response.
Connector Package Example
-
correlationId
Example: 56c43883-05b6-4267-b46d-587a5637a6cd
Description: CorrelationId related to Connector Package response message. -
msgTopic
Example: bosch.nexeed.business.event.'packageType'.'area'.'operation'
Description:
packageType: In this case it is connector-package.
area: In this case it is batch-management.
operation: In this case it is batch-creation. -
url
Example:
'https://…/api/v1/5e259388-8e49-40ba-82ae-34ecedd1feea/connector-package/batch-management/batch-creation/result/debe50e5-728d-45e2-a5d7-d600f5be5c7b'
Description: Access Url that needs to be called to retrieve the execution response. -
messageState
Example: Failed
Description: Represents if the message was processed successfully or not, possible values (Timeout, Failed, FailedExternally, OverallTimeout, Succeeded). -
messageId
Example: debe50e5-728d-45e2-a5d7-d600f5be5c7b
Description: Id of the Connector Package Execution Response.
{
"correlationId": "56c43883-05b6-4267-b46d-587a5637a6cd",
"msgId": "cd4b0fad-cc49-4c71-97d7-9adf6e95ae13",
"msgSender": "https://.../erpconn",
"msgSendTime": "2023-09-05T17:44:39.3042866+02:00",
"msgTopic": "bosch.nexeed.business.event.connector-package.response.batch-management.batch-creation",
"payload": {
"tenantId": "5e259388-8e49-40ba-82ae-34ecedd1feea",
"eventId": "bf3190eb-e6de-4e5d-9173-65792ef4c48f",
"eventTime": "2023-09-05T17:44:39.3050548+02:00",
"url": "https://.../api/v1/5e259388-8e49-40ba-82ae-34ecedd1feea/connector-package/batch-management/batch-creation/result/debe50e5-728d-45e2-a5d7-d600f5be5c7b",
"messageState": "Failed",
"messageId": "debe50e5-728d-45e2-a5d7-d600f5be5c7b",
"$type": "urn:bosch:nexeed:erpconn:PackageResponse"
},
"$type": "urn:bosch:nexeed:BusinessEvent:v1"
}
Orchestrator Package Example
-
correlationId
Example: 15b03f19-8e3e-4ec9-867c-f3d135d28e64
Description: CorrelationId related to Orchestrator Package response message. -
msgTopic
Example: bosch.nexeed.business.event.'packageType'.'area'.'operation'
Description:
packageType: In this case it is orchestrator-package.
area: In this case it is packaging.
operation: In this case it is packing-confirmation. -
url
Example:
'https://…/api/v1/14f1daeb-8e7c-4265-b57e-a61d7de89042/orchestrator-package/packaging/packing-confirmation/result/6df4cf0d-67ce-4bde-a501-8f4c8d5d318b'
Description: Access Url that needs to be called to retrieve the execution response. -
messageState
Example: Succeeded
Description: Represents if the message was processed successfully or not, possible values (Timeout, Failed, FailedExternally, OverallTimeout, Succeeded). -
messageId
Example: 6df4cf0d-67ce-4bde-a501-8f4c8d5d318b
Description: ID of the Connector Package Execution Response.
{
"correlationId": "15b03f19-8e3e-4ec9-867c-f3d135d28e64",
"msgId": "fbe76043-6148-4b5e-a409-1287e2588dba",
"msgSender": "https://.../erpconn",
"msgSendTime": "2023-09-05T17:47:08.1359199+02:00",
"msgTopic": "bosch.nexeed.business.event.orchestrator-package.response.packaging.packing-confirmation",
"payload": {
"tenantId": "14f1daeb-8e7c-4265-b57e-a61d7de89042",
"eventId": "38858ddb-0f48-46de-9b8e-7d523fe152c6",
"eventTime": "2023-09-05T17:47:08.1365768+02:00",
"url": "https://.../api/v1/14f1daeb-8e7c-4265-b57e-a61d7de89042/orchestrator-package/packaging/packing-confirmation/result/6df4cf0d-67ce-4bde-a501-8f4c8d5d318b",
"messageState": "Succeeded",
"messageId": "6df4cf0d-67ce-4bde-a501-8f4c8d5d318b",
"$type": "urn:bosch:nexeed:erpconn:PackageResponse"
},
"$type": "urn:bosch:nexeed:BusinessEvent:v1"
}