lib/ruote/exp/flow_expression.rb
# Wraps #reply (does the administrative part of the reply work).
#
Wraps #reply (does the administrative part of the reply work).
Wraps #reply ( does the administrative part of the reply work ) .
def do_reply(msg)
      workitem = msg['workitem']
      fei = workitem['fei']
      removed = h.children.delete(fei)
      if msg['flanking']
        (h.flanks ||= []) << fei
        if (not removed) 
          do_persist
          return
        end
      end
      if ut = msg['updated_tree']
        ct = tree.dup
        ct.last[Ruote::FlowExpressionId.child_id(fei)] = ut
        update_tree(ct)
      end
      if h.state == 'paused'
        (h.paused_replies ||= []) << msg
        do_persist
      elsif h.state != nil 
        if h.children.size < 1
          reply_to_parent(workitem)
        else
          do_persist
        end
      else 
        reply(workitem)
      end
    end
def do_reply ( msg ) workitem = msg [ 'workitem' ] fei = workitem [ 'fei' ] removed = h . children . delete ( fei ) if msg [ 'flanking' ] ( h . flanks ||= [ ] ) << fei if ( not removed ) do_persist return end end if ut = msg [ 'updated_tree' ] ct = tree . dup ct . last [ Ruote :: FlowExpressionId . child_id ( fei ) ] = ut update_tree ( ct ) end if h . state == 'paused' ( h . paused_replies ||= [ ] ) << msg do_persist elsif h . state != nil if h . children . size < 1 reply_to_parent ( workitem ) else do_persist end else reply ( workitem ) end end
Wraps #reply (does the administrative part of the reply work).
Wraps #reply ( does the administrative part of the reply work ) .
# accept without any check ? # then it's a timer # failing or timing out ... #persist_or_raise # for the updated h.children # vanilla reply
msg