@onlineapps/conn-orch-orchestrator 1.0.44 → 1.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlineapps/conn-orch-orchestrator",
3
- "version": "1.0.44",
3
+ "version": "1.0.45",
4
4
  "description": "Workflow orchestration connector for OA Drive - handles message routing and workflow execution",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -253,6 +253,34 @@ class WorkflowOrchestrator {
253
253
  // Ignore - use default 0
254
254
  }
255
255
 
256
+ // IMPORTANT: Publish progress event for FAILED step (so it appears in trace)
257
+ // This ensures every cookbook step is visible in monitoring, even failed ones
258
+ const { publishToMonitoringWorkflow } = require('@onlineapps/mq-client-core').monitoring;
259
+ try {
260
+ await publishToMonitoringWorkflow(this.mqClient, {
261
+ event_type: 'progress',
262
+ workflow_id: workflow_id,
263
+ service_name: serviceName,
264
+ step_index: failedStepIndex,
265
+ step_id: current_step,
266
+ cookbook: cookbookDef,
267
+ context: context,
268
+ output: null,
269
+ error: {
270
+ message: error.message,
271
+ attempt: attemptNumber
272
+ },
273
+ status: 'failed',
274
+ timestamp: new Date().toISOString()
275
+ }, this.logger, { workflow_id, step_id: current_step });
276
+ } catch (monitoringError) {
277
+ // Don't fail workflow if monitoring publish fails
278
+ this.logger.warn('Failed to publish failed step progress to monitoring', {
279
+ workflow_id,
280
+ error: monitoringError.message
281
+ });
282
+ }
283
+
256
284
  // Add attempt to DLQ history
257
285
  const attemptRecord = {
258
286
  step_id: current_step,