Skip to content

Commit

Permalink
fix(): handle namespace variable in eval
Browse files Browse the repository at this point in the history
  • Loading branch information
Skraye committed Jun 5, 2024
1 parent b7b43f3 commit 74784a4
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,9 @@ public EvalResult eval(

Task task = flow.findTaskByTaskId(taskRun.getTaskId());

RunContext runContext = runContextFactory.of(flow, task, execution, taskRun, false);

try {
return EvalResult.builder()
.result(runContext.render(expression))
.result(runContextRender(flow, task, execution, taskRun, expression))
.build();
} catch (IllegalVariableEvaluationException e) {
return EvalResult.builder()
Expand All @@ -261,6 +259,10 @@ public EvalResult eval(
}
}

protected String runContextRender(Flow flow, Task task, Execution execution, TaskRun taskRun, String expression) throws IllegalVariableEvaluationException {
return runContextFactory.of(flow, task, execution, taskRun, false).render(expression);
}

@SuperBuilder
@Getter
@NoArgsConstructor
Expand Down

0 comments on commit 74784a4

Please sign in to comment.