Skip to content

Commit

Permalink
fix Discovery.
Browse files Browse the repository at this point in the history
  • Loading branch information
apotonick committed Apr 19, 2024
1 parent 8917e35 commit 8b195cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/trailblazer/workflow/discovery.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def call(json_filename:, start_lane:, dsl_options_for_run_multiple_times: {})
initial_lane_positions = Collaboration::Synchronous.initial_lane_positions(collaboration.to_h[:lanes])
initial_lane_positions = Collaboration::Positions.new(initial_lane_positions.collect { |activity, task| Trailblazer::Workflow::Collaboration::Position.new(activity, task) }) # FIXME: initial_lane_positions should return {Collaboration::Positions}

start_activity = collaboration.to_h[:lanes].(json_id: start_lane)[:activity]
start_activity = collaboration.to_h[:lanes].(label: start_lane)[:activity]
start_task = start_activity.to_h[:circuit].to_h[:start_task]
start_task_position = Collaboration::Position.new(start_activity, start_task)

Expand Down Expand Up @@ -192,8 +192,8 @@ module DSL
module_function

def configuration_for_branching_from_user_hash(branch_cfg, lanes:, **)
branch_cfg.collect do |(json_id, cdt_task_label), cfg|
activity = lanes.(json_id: json_id)[:activity]
branch_cfg.collect do |(label, cdt_task_label), cfg|
activity = lanes.(label: label)[:activity]

# Find the catch event for the CDT task.
# TODO: in workflow, we should have an abstraction for label search.
Expand Down
2 changes: 1 addition & 1 deletion lib/trailblazer/workflow/introspect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def initialize(lanes_cfg)
def call(**options)
key, value = options.keys[0], options.values[0]

@ary.find { |options| options[key] == value } or raise
@ary.find { |options| options[key] == value } or raise "#{key.inspect} == #{value.inspect} not found"
end

def to_h
Expand Down

0 comments on commit 8b195cc

Please sign in to comment.