Skip to content

Commit b5327b9

Browse files
committed
fix: pull input paramater values from correct place
1 parent cac36e1 commit b5327b9

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

tests/test_workflow_engine_examples.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,5 +311,5 @@ def test_workflow_engine_simple_python_molprops(basic_engine):
311311
assert response["running_workflow_steps"][1]["done"]
312312
assert response["running_workflow_steps"][1]["success"]
313313
# This test should generate a file in the simulated project directory
314-
assert project_file_exists(output_file_a)
315-
assert project_file_exists(output_file_b)
314+
assert project_file_exists(output_file_1)
315+
assert project_file_exists(output_file_2)

workflow/workflow_engine.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,12 @@ def _validate_step_command(
366366
inputs = step.get("inputs", [])
367367
outputs = step.get("outputs", [])
368368
previous_step_outputs = previous_step.get("outputs", [])
369+
369370
step_vars = self._set_step_variables(
370371
inputs=inputs,
371372
outputs=outputs,
372373
previous_step_outputs=previous_step_outputs,
374+
workflow_variables=all_variables,
373375
)
374376

375377
all_variables |= step_vars
@@ -483,6 +485,7 @@ def _set_step_variables(
483485
inputs: list[dict[str, Any]],
484486
outputs: list[dict[str, Any]],
485487
previous_step_outputs: list[dict[str, Any]],
488+
workflow_variables: dict[str, Any],
486489
) -> dict[str, Any]:
487490
"""Prepare input- and output variables for the following step.
488491
@@ -496,7 +499,7 @@ def _set_step_variables(
496499
p_val = ""
497500
val = item["from"]
498501
if "workflow-input" in val.keys():
499-
p_val = val["workflow-input"]
502+
p_val = workflow_variables[val["workflow-input"]]
500503
elif "step" in val.keys():
501504
for out in previous_step_outputs:
502505
if out["output"] == val["output"]:

0 commit comments

Comments
 (0)