@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 +1 -1
- package/src/ServiceWrapper.js +4 -1
package/package.json
CHANGED
package/src/ServiceWrapper.js
CHANGED
|
@@ -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 ||
|
|
1263
|
+
current_step: message.current_step || firstStepId
|
|
1261
1264
|
};
|
|
1262
1265
|
|
|
1263
1266
|
// Validate normalized message has required fields
|