@onlineapps/conn-orch-orchestrator 1.0.3 → 1.0.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlineapps/conn-orch-orchestrator",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Workflow orchestration connector for OA Drive - handles message routing and workflow execution",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -149,8 +149,8 @@ class WorkflowOrchestrator {
149
149
  // Route to next step
150
150
  await this._routeToNextStep(nextStep, cookbookDef, updatedContext, workflow_id);
151
151
  } else {
152
- // Workflow completed
153
- await this._completeWorkflow(workflow_id, updatedContext);
152
+ // Workflow completed - pass serviceName for monitoring
153
+ await this._completeWorkflow(workflow_id, updatedContext, serviceName);
154
154
  }
155
155
 
156
156
  return {
@@ -325,12 +325,14 @@ class WorkflowOrchestrator {
325
325
  * @async
326
326
  * @param {string} workflow_id - Workflow ID
327
327
  * @param {Object} finalContext - Final workflow context
328
+ * @param {string} serviceName - Service name that completed the workflow
328
329
  */
329
- async _completeWorkflow(workflow_id, finalContext) {
330
+ async _completeWorkflow(workflow_id, finalContext, serviceName = 'unknown') {
330
331
  try {
331
332
  console.log(`[WorkflowOrchestrator] [PUBLISH] Preparing to publish workflow.completed for ${workflow_id}`);
332
333
  this.logger.info(`[WorkflowOrchestrator] [PUBLISH] Preparing to publish workflow.completed`, {
333
334
  workflow_id,
335
+ serviceName,
334
336
  hasMqClient: !!this.mqClient,
335
337
  mqClientConnected: this.mqClient?._connected
336
338
  });
@@ -343,6 +345,7 @@ class WorkflowOrchestrator {
343
345
  const workflowCompletedMessage = {
344
346
  workflow_id,
345
347
  status: 'completed',
348
+ service: serviceName, // Service that completed the workflow (for monitoring)
346
349
  delivery: delivery, // Delivery configuration from Gateway context (must be object)
347
350
  context: finalContext, // Full context for output resolution
348
351
  steps: finalContext?.steps || {}, // Steps results for output resolution