     @network = null
     @ready = true
     @started = false
+    @starting = false
     @baseDir = null
     @loader = null
     @load = 0

          notReady = true unless @checkComponent name, node
        do @setToReady unless notReady
    , true

  start: (callback) ->
    unless callback
      callback = ->
    return callback() if @started
    unless @isReady()
      @on 'ready', =>
        @start callback
      return
    super()
    return callback null unless @network
    @network.start (err) ->
      return callback err if err
      do callback

  checkComponent: (name, process) ->
    unless process.component.isReady()

  isSubgraph: ->
    true

  setUp: (callback) ->
    @starting = true
    unless @isReady()
      @once 'ready', =>
        @setUp callback
      return
    return callback null unless @network
    @network.start (err) ->
      return callback err if err
      @starting = false
      do callback

  tearDown: (callback) ->
    @starting = false
    return callback null unless @network
    @network.stop (err) ->
      return callback err if err
      do callback

exports.getComponent = (metadata) -> new Graph metadata
