           process.hasImages = true
           collection.processes.push(process)
         callback null, collection
+
     process = new Process()
     if (collection.hasFiles)
       process.hasFiles = true

        requestCallback null, collection.result

  preprocessCollection = (collection, req, serviceInfo, parameterHelper,executionType, callback) ->
    #process a collection

    #check if collection exists
    if(collection.hasImages)
      if(not ImageHelper.checkCollectionAvailable(req.body.images[0].value))
        err =
          statusCode: 500

          statusText: 'The collection ' + req.body.images[0].value + ' does not exist on the server'
        callback err, null
        return
      folder = nconf.get('paths:imageRootPath') + path.sep + collection.name
      collection.inputParameters = _.clone(req.body.inputs)
      setCollectionHighlighter(collection, req)
