Skip to content
webbo89 edited this page Jun 21, 2012 · 2 revisions

Transfers results from agent & agentstate specific objects into a collection called results, with a record for each year, for each agent.

Operating the PreProcessor

Call the file, processor.php?simid=X JSON output is expected from the result.

{"ISO":"CS7","success":"true","percentage":60,"totalAgents":"10","nextAgent":7}

Json array explained

  1. ISO: indicates the Agent that is currently in the process of being saved.
  2. success: false indicates a recall required/true means call the next page/complete means finished preprocessing.
  3. percentage: percentage completion of the preprocessor.
  4. totalAgents: indicates to preprocessor how many steps are required.(Done to minimise the number of queries and maximise time spent on useful DB processing)
  5. nextAgent: indicates the next step to be processed

How to use

  • using JS, call the file, processor.php?simid=X
  • use the JSON response to call the next step by a repeat JSON call to the file address: processor.php?simid=X&agent={nextAgent}&agentno={totalAgents}
  • repeat until success:complete
Clone this wiki locally