         # TODO: support roundtrip
         @connections[edgeId].srcQueue = findQueue fromId, 'outports', fromPort
         @connections[edgeId].tgtQueue = findQueue toId, 'inports', toName
+        @emit 'graph-changed'
         @broker.addBinding {type: 'pubsub', src:edge.srcQueue, tgt:edge.tgtQueue}, (err) =>
           return callback err
 

    @library._updateDefinition definition.component, definition
    @emit 'participant-added', definition
    @emit 'participant', 'added', definition

  removeParticipant: (id) ->
    definition = @participants[id]
    @emit 'participant-removed', definition
    @library._updateDefinition definition.component, null
    @emit 'participant', 'removed', definition

  addComponent: (name, language, code, callback) ->
    @library.addComponent name, language, code, callback

    @broker.removeBinding { type: 'pubsub', src: edge.srcQueue, tgt: edge.tgtQueue }, (err) =>
      return callback err if err
      delete @connections[edgeId]
      @emit 'graph-changed'
      return callback null

  checkParticipantConnections: (action, participant) ->
