def dispatch_cancel(msg)

      flavour = msg['flavour']

      participant = @context.plist.instantiate(msg['participant'])

      result = begin

        Ruote.participant_send(
          participant,
          [ :on_cancel, :cancel ],
          'fei' => Ruote::FlowExpressionId.new(msg['fei']),
          'flavour' => flavour)

      rescue => e
        raise(e) if flavour != 'kill'
      end

      @context.storage.put_msg(
        'reply',
        'fei' => msg['fei'],
        'workitem' => msg['workitem']
      ) if result != false
    end
def dispatch_cancel(msg)

      flavour = msg['flavour']

      participant = @context.plist.instantiate(msg['participant'])

      result = begin

        Ruote.participant_send(
          participant,
          [ :on_cancel, :cancel ],
          'fei' => Ruote::FlowExpressionId.new(msg['fei']),
          'flavour' => flavour)

      rescue => e
        raise(e) if flavour != 'kill'
      end

      @context.storage.put_msg(
        'reply',
        'fei' => msg['fei'],
        'workitem' => msg['workitem']
      ) if result != false
    end
Instantiates the participant and calls its cancel method.