@onlineapps/service-wrapper 2.0.43 → 2.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/ServiceWrapper.js +5 -0
package/package.json
CHANGED
package/src/ServiceWrapper.js
CHANGED
|
@@ -1101,12 +1101,17 @@ class ServiceWrapper {
|
|
|
1101
1101
|
|
|
1102
1102
|
// Send response to workflow.completed if workflow_id is present
|
|
1103
1103
|
if (message.workflow_id && this.mqClient) {
|
|
1104
|
+
// Extract delivery configuration from context (passed from Gateway)
|
|
1105
|
+
// Delivery can specify how to deliver the result (webhook, email, etc.)
|
|
1106
|
+
const delivery = message.context?.delivery || null;
|
|
1107
|
+
|
|
1104
1108
|
const workflowResponse = {
|
|
1105
1109
|
workflow_id: message.workflow_id,
|
|
1106
1110
|
service: serviceName,
|
|
1107
1111
|
operation: message.step?.operation || message.operation,
|
|
1108
1112
|
status: 'completed',
|
|
1109
1113
|
output: result,
|
|
1114
|
+
delivery: delivery, // Delivery configuration from Gateway context
|
|
1110
1115
|
flags,
|
|
1111
1116
|
timestamp: new Date().toISOString()
|
|
1112
1117
|
};
|