Skip to content

Commit

Permalink
Allow JS expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
jyeshe committed Jan 15, 2025
1 parent 8d13440 commit 289df05
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions lib/lightning/workflows/edge.ex
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ defmodule Lightning.Workflows.Edge do
only: [
:id,
:condition_type,
:condition_expression,
:condition_label,
:enabled,
:source_job_id,
:source_trigger_id,
Expand Down
11 changes: 6 additions & 5 deletions test/lightning_web/workflows_controller_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -1212,11 +1212,12 @@ defmodule LightningWeb.API.WorkflowsControllerTest do
} ->
Map.merge(workflow, %{
edges: [
%{
new_edge
| source_trigger_id: new_trigger.id,
target_job_id: new_job1.id
}
Map.merge(new_edge, %{
source_trigger_id: new_trigger.id,
target_job_id: new_job1.id,
condition_expression: "state.age > 18",
condition_label: "adult_age"
})
| other_new_edges
],
jobs: new_jobs,
Expand Down

0 comments on commit 289df05

Please sign in to comment.