 
       # If all pass, forward to OUT; FAIL otherwise
       if success
-        @outPorts.out.send data
+        @output 'out', data
       else
-        @outPorts.fail.send data
+        @output 'fail', data
+
+  output: (portName, data) ->
+    port = @outPorts[portName]
+
+    port.beginGroup group for group in @groups
+    port.send data
+    port.endGroup() for group in @groups
 
 exports.getComponent = -> new Match

  constructor: ->
    @matches = null
    @methods = null

    @inPorts =
      in: new noflo.Port 'object'

      @methods ?= []
      @methods.push method.toLowerCase()

    @inPorts.in.on 'connect', =>
      @groups = []
    @inPorts.in.on 'begingroup', (group) =>
      @groups.push group
    @inPorts.in.on 'endgroup', (group) =>
      @groups.pop()
    @inPorts.in.on 'disconnect', =>
      @outPorts.out.disconnect()
      @outPorts.fail.disconnect()

    @inPorts.in.on 'data', (data) =>
      success = true
