 
 GE.NodeVisitorConstants =  class NodeVisitorConstants
   # The log function defaults to the console
-  constructor: (@modelData, @serviceData, @assets, @actions, @log = GE.logToConsole) ->
+  constructor: (@modelData, @serviceData, @assets, @actions, @tools, @log = GE.logToConsole) ->
 
 GE.NodeVisitorResult = class NodeVisitorResult
   constructor: (@result = null, @modelPatches = [], @servicePatches = []) ->

# Otherwise, if inputServiceData is not null, this data is used instead of asking the services.
# Returns a list of model patches.
# TODO: refactor to accept a parameter object rather than a long list of parameters
GE.stepLoop = (node, modelData, assets, actions, services, log = null, inputServiceData = null, outputServiceData = null) ->
  if outputServiceData != null
    modelPatches = []
  else

      for serviceName, service of services
        inputServiceData[serviceName] = service.provideData(assets)

    result = GE.visitNode(node, new GE.NodeVisitorConstants(modelData, inputServiceData, assets, actions, tools, log))
    
    if GE.doPatchesConflict(result.modelPatches) then throw new Error("Model patches conflict: #{result.modelPatches}")
    modelPatches = result.modelPatches
