# File lib/ruote/exp/commanded.rb, line 39 def reply(workitem) workitem = h.command_workitem || workitem h.command_workitem = nil # command/answer may come from # # a) a child, regular case, easy # b) somewhere else, which means we have to cancel the current child # and then make sure the comand is interpreted # a) if Ruote::FlowExpressionId.direct_child?(h.fei, workitem['fei']) return move_on(workitem) end # b) h.command_workitem = workitem h.command_workitem['fei'] = h.children.first do_persist or return @context.storage.put_msg('cancel', 'fei' => h.children.first) # iteration will be done at when cancelled child replies end