Class: FlowCore::Steps::ParallelSplit

Inherits:
FlowCore::Step show all
Defined in:
app/models/flow_core/steps/parallel_split.rb

Instance Attribute Summary

Attributes inherited from FlowCore::Step

#append_to

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from FlowCore::Step

#barrier_step?, #branch_arc_guard_attachable?, branch_arc_guard_attachable?, #branch_configurable?, fallback_branch_required?, #fallback_branch_required?, #multi_branch_step?, #redirectable_steps, #redirection_configurable?, redirection_configurable?, #redirection_step?, redirection_step?, #transition_callback_attachable?, transition_callback_attachable?, transition_trigger_attachable?, #transition_trigger_attachable?, #transition_trigger_required?, transition_trigger_required?

Class Method Details

.barrier_step?Boolean

Returns:

  • (Boolean)


37
38
39
# File 'app/models/flow_core/steps/parallel_split.rb', line 37

def barrier_step?
  true
end

.branch_configurable?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'app/models/flow_core/steps/parallel_split.rb', line 33

def branch_configurable?
  true
end

.creatable?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'app/models/flow_core/steps/parallel_split.rb', line 25

def creatable?
  true
end

.multi_branch_step?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'app/models/flow_core/steps/parallel_split.rb', line 29

def multi_branch_step?
  true
end

Instance Method Details

#deploy_to_workflow!(workflow, input_transition) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'app/models/flow_core/steps/parallel_split.rb', line 5

def deploy_to_workflow!(workflow, input_transition)
  return input_transition if branches.empty?

  input_place = find_or_create_input_place(workflow, input_transition)
  parallel_split_transition =
    input_place.output_transitions.create! workflow: workflow,
                                           name: name,
                                           auto_finish_strategy: "synchronously",
                                           generated_by_step_id: id
  synchronization_transition =
    workflow.transitions.create! workflow: workflow,
                                 name: I18n.t("flow_core.pipeline.synchronization_transition_name"),
                                 auto_finish_strategy: "synchronously"

  deploy_branches_to(workflow, parallel_split_transition, synchronization_transition)

  synchronization_transition
end