Module: Trailblazer::Activity::TaskWrap::VariableMapping
- Defined in:
- lib/trailblazer/activity/task_wrap/variable_mapping.rb
Overview
Creates taskWrap steps to map variables before and after the actual step. We hook into the Normalizer, process ‘:input` and `:output` directives and translate them into a DSL::Extension.
Note that the two options are not the only way to create filters, you can use the more low-level Scoped() from the ‘dsl` gem, too, and write your own filter logic.
Class Method Summary collapse
-
.merge_instructions_for(input, output, id:) ⇒ Object
Places filters before/after the call_task.
Class Method Details
.merge_instructions_for(input, output, id:) ⇒ Object
Places filters before/after the Trailblazer::Activity::TaskWrap.call_task. Note that input and output are automatically wrapped.
12 13 14 15 16 17 |
# File 'lib/trailblazer/activity/task_wrap/variable_mapping.rb', line 12 def self.merge_instructions_for(input, output, id:) [ [TaskWrap::Pipeline.method(:insert_before), "task_wrap.call_task", ["task_wrap.input", TaskWrap::Input.new(input, id: id)]], [TaskWrap::Pipeline.method(:insert_after), "task_wrap.call_task", ["task_wrap.output", TaskWrap::Output.new(output, id: id)]], ] end |