transflow
transflow copied to clipboard
[DISCONTINUED] Business transaction flow DSL
It would be nice to be able to fail a transaction without raising an exception.
Fixes issue #2 ``` Transflow(container: operations) { steps(:aggregate, :persist) } # order is :aggregate, :persist Transflow(container: operations) { step(:aggregate, publish: true) step(:persist, publish: true) } # order is :persist, :aggregate...
``` ruby require 'bundler' Bundler.require container = { increment: -> i { i + 1 }, square: -> i { i * i } } class Responder def self.increment_success(input) puts...
``` ruby noop = -> input { input } container = { validate: noop, persist: noop } class Responder def self.validate_failure(input, error) # handle error here end end transaction =...