@onlineapps/service-wrapper 2.0.55 → 2.0.58

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/service-wrapper",
3
- "version": "2.0.55",
3
+ "version": "2.0.58",
4
4
  "description": "Thin orchestration layer for microservices - delegates all infrastructure concerns to specialized connectors",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -1254,10 +1254,13 @@ class ServiceWrapper {
1254
1254
  }
1255
1255
 
1256
1256
  // Normalize message format: Gateway sends workflowId, orchestrator expects workflow_id
1257
+ // V2 format uses step_id, V1 used id - support both for backwards compatibility during migration
1258
+ const firstStep = message.cookbook?.steps?.[0];
1259
+ const firstStepId = firstStep?.step_id || firstStep?.id;
1257
1260
  const normalizedMessage = {
1258
1261
  ...message,
1259
1262
  workflow_id: message.workflow_id || message.workflowId,
1260
- current_step: message.current_step || (message.cookbook?.steps?.[0]?.id)
1263
+ current_step: message.current_step || firstStepId
1261
1264
  };
1262
1265
 
1263
1266
  // Validate normalized message has required fields