| Class | Ruote::Exp::RedoExpression |
| In: |
lib/ruote/exp/fe_redo.rb
|
| Parent: | FlowExpression |
Undoes and the redoes (re-applies) an expression identified by a tag.
pdef = Ruote.process_definition do
sequence :tag => 'kilroy' do
alpha
_redo :ref => 'kilroy', :unless => '${f:ok} == true'
end
end
will redo at tag ‘kilroy’ if the field ‘ok’ is not set to true.
(redo is escaped as _redo not to conflict with the "redo" Ruby keyword)
Maybe this case is better served by a cursor/rewind combination
pdef = Ruote.process_definition do
cursor do
alpha
rewind :unless => '${f:ok} == true'
end
end
(There is a big difference though, a redo will restart with the workitem as it was when the workitem entered the tagged region, while the rewind keeps the workitem as is)