Class | Ruote::Exp::UndoExpression |
In: |
lib/ruote/exp/fe_undo.rb
|
Parent: | FlowExpression |
Undoes (cancels) another expression referred by its tag.
pdef = Ruote.process_definition do concurrence do alpha :tag => 'kilroy' undo :ref => 'kilroy' end end
This example is rather tiny, but it shows a process branch (undo) cancelling another (alpha).
This expression is aliased to ‘cancel‘
cancel :ref => 'invoicing_stage'
It‘s OK to shorten
cancel :ref => 'invoicing_stage'
to
cancel 'invoicing_stage'
kill :ref => 'invoicing stage'
will cancel the target expression and bypass any on_cancel handler set for it.
concurrence do sequence :tag => 'x', :on_cancel => 'y' do # ... end sequence do # ... kill 'x' end end
In this example the :on_cancel => ‘y’ will get ignored if kill ‘x’ kicks in.