The aim is to have a simple API to be able to recreate a case/when block with TRB.
Here the flowchart of an operation using a Switch macro:

class ChargeSwitch < Trailblazer::Operation
class Braintree < Trailblazer::Activity::Signal; end
.....
step Switch(condition: :set_condition) {
option "stripe", Trailblazer::Operation::Nested(ChargeStripe)
option "braintree", :braintree, Output(Braintree, :success) => Track(:braintree)
option /./, :unsupported
}
......
end
The aim is to have a simple API to be able to recreate a case/when block with TRB.

Here the flowchart of an operation using a
Switchmacro:Requirements:
Possible API solution:
Here the branch where a draft implementation has been done (not the best but the tests are reusable): https://github.com/trailblazer/trailblazer-macro/tree/macro_switch