@onlineapps/conn-orch-orchestrator 1.0.14 → 1.0.17

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.14",
3
+ "version": "1.0.17",
4
4
  "description": "Workflow orchestration connector for OA Drive - handles message routing and workflow execution",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -266,11 +266,8 @@ class WorkflowOrchestrator {
266
266
  */
267
267
  async _executeTaskStep(step, context) {
268
268
  // Resolve variable references in step.input (e.g. ${steps[0].output.message})
269
- console.log(`[WorkflowOrchestrator] [RESOLVE] Step ${step.id} input BEFORE:`, JSON.stringify(step.input));
270
- console.log(`[WorkflowOrchestrator] [RESOLVE] Context.steps:`, JSON.stringify(context.steps?.map(s => ({ id: s.id, output: s.output }))));
271
-
269
+ // Resolve variable references in step.input (e.g. ${api_input.file}, ${steps[0].output.message})
272
270
  const resolvedInput = this._resolveInputReferences(step.input, context);
273
- console.log(`[WorkflowOrchestrator] [RESOLVE] Step ${step.id} input AFTER:`, JSON.stringify(resolvedInput));
274
271
 
275
272
  // Use API mapper to call the service with resolved input
276
273
  const result = await this.apiMapper.callOperation(
@@ -331,7 +328,15 @@ class WorkflowOrchestrator {
331
328
  */
332
329
  _getValueFromPath(path, context) {
333
330
  // Normalize bracket notation to dot notation: steps[0] -> steps.0
334
- const normalized = path.replace(/\[(\d+)\]/g, '.$1');
331
+ let normalized = path.replace(/\[(\d+)\]/g, '.$1');
332
+
333
+ // Strip prefixes - we're already searching in context object
334
+ // Supports: ${context.X}, ${api_input.X}, ${steps[N].X}
335
+ if (normalized.startsWith('context.')) {
336
+ normalized = normalized.substring(8); // Remove 'context.'
337
+ }
338
+ // api_input is a top-level key in context, so keep it as-is
339
+
335
340
  const parts = normalized.split('.');
336
341
 
337
342
  let current = context;