@onlineapps/conn-orch-orchestrator 1.0.13 → 1.0.15

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/README.md CHANGED
@@ -135,4 +135,6 @@ npm run test:integration
135
135
 
136
136
  - [Complete Connectors Documentation](../../../docs/modules/connector.md)
137
137
  - [Workflow Architecture](../../../docs/modules/workflow.md)
138
- - [Testing Standards](../../../docs/modules/connector.md#testing-standards)
138
+ - [Testing Standards](../../../docs/modules/connector.md#testing-standards)
139
+ ## Version History
140
+ - 1.0.13: Added variable reference resolution in step inputs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlineapps/conn-orch-orchestrator",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "Workflow orchestration connector for OA Drive - handles message routing and workflow execution",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -267,6 +267,8 @@ class WorkflowOrchestrator {
267
267
  async _executeTaskStep(step, context) {
268
268
  // Resolve variable references in step.input (e.g. ${steps[0].output.message})
269
269
  console.log(`[WorkflowOrchestrator] [RESOLVE] Step ${step.id} input BEFORE:`, JSON.stringify(step.input));
270
+ console.log(`[WorkflowOrchestrator] [RESOLVE] Context keys:`, Object.keys(context || {}));
271
+ console.log(`[WorkflowOrchestrator] [RESOLVE] Context.input_file:`, context?.input_file);
270
272
  console.log(`[WorkflowOrchestrator] [RESOLVE] Context.steps:`, JSON.stringify(context.steps?.map(s => ({ id: s.id, output: s.output }))));
271
273
 
272
274
  const resolvedInput = this._resolveInputReferences(step.input, context);
@@ -331,7 +333,15 @@ class WorkflowOrchestrator {
331
333
  */
332
334
  _getValueFromPath(path, context) {
333
335
  // Normalize bracket notation to dot notation: steps[0] -> steps.0
334
- const normalized = path.replace(/\[(\d+)\]/g, '.$1');
336
+ let normalized = path.replace(/\[(\d+)\]/g, '.$1');
337
+
338
+ // Strip prefixes - we're already searching in context object
339
+ // Supports: ${context.X}, ${api_input.X}, ${steps[N].X}
340
+ if (normalized.startsWith('context.')) {
341
+ normalized = normalized.substring(8); // Remove 'context.'
342
+ }
343
+ // api_input is a top-level key in context, so keep it as-is
344
+
335
345
  const parts = normalized.split('.');
336
346
 
337
347
  let current = context;