21 Matching Annotations
  1. Mar 2021
    1. When nesting an activity with multiple outcomes, you can wire each terminus to a different route.
    2. For example, an output using Track(:create) will snap to the next possible task that is “magnetic to” :create. That’s how tracks or paths are created.
    3. Semantics are mostly relevant for nesting
    4. Remember, in a railway activity each task has two standard outputs with the “semantics” success and failure.
    5. By using Output(:semantic), you can select an existing output of the task and rewire it.
    6. Why don’t we put the “create user” task onto the failure track, and in case of successfully persisting the new user, we deviate back to the happy path?
    7. the Activity component is the heart of TRB
    8. To implement such an activity, we only need to rewire the second step’s failure output to a new terminus.
    9. Since you can reference outputs by their semantic, you as a modeller only connect conceptual termini to ongoing connections!
    10. it’s a bit as if the following wiring is applied to every task added via #step
    11. Additionally, you may add debugging steps, error handler or rewire the conditions dynamically without touching the original snippet.
    12. Suppose that the validate task was getting quite complex and bloated. When writing “normal” Ruby, you’d break up one method into several. In Trailblazer, that’s when you introduce a new, smaller activity.
    13. Knowing about the wiring mechanics in Trailblazer is one thing. However, the real fun starts with nesting activities. That’s when the ideas of encapsulation, interfaces and reducing dependencies really come into play.
    14. Nesting an activity into another is a bit like calling a library method from another method
    15. the explicit modelling has one massive advantage: all possible outcomes of the nested activity are visible and have to be connected in the outer diagram
  2. Feb 2021