Skip to content
This repository has been archived by the owner on Dec 23, 2019. It is now read-only.

Architecture overview

Sean Dunn edited this page Jul 31, 2013 · 6 revisions

The below diagram represents the main part of the extraction pipeline, which uses index.html. It should be noted that the reception app and lab activities sections are separate from this, and do not use the workflow engine to decide when to move on to the next controller.

Architecture

Main

Entry point of application is main.js. Creates the app (app.js)

App

  • Created with a controller factory
  • Initialises app, depending on the css in the currently loaded HTML page
  • Main roles of the app
    • store the user
    • store the root for that user - the root is needed for any interaction with the server
    • load the next page, with the help of the workflow engine

Controller factory

  • Creates controllers by name
  • Typical usage: controllerFactory.create('some_presenter', owner, configurationParameters), where the configuration parameters vary from presenter to presenter.
  • If it can't find the controller name, the default presenter (default_presenter.js) will be created.
  • Note: if creating new controller, remember to add it to the presenter factory! This is simple: you only need to add the path of the new presenter to the list of paths at the top of the presenter_factory file (in the define list), for example:
'extraction_pipeline/controllers/your_new_page_presenter'

Workflow engine

  • Finds the next workflow, using the app's model
  • Searches the pipeline config
  • If the config is found, the workflow returns the configuration for the next page
  • If no done role is found, the app is directed to the spent batch page
  • If there is no controller to deal with the role, the app is directed the unknown role page
  • If no user, or if no batch and no labware, then undefined is returned. The controller factory deals with this, and the user is taken to the default page.

Pipeline config

  • JSON file used by the workflow engine to decide which page to go to next
  • Role priority indicates an order for the processes: for instance, dna and rna extraction has precedence over dna only extraction. In the case where a workflow has multiple outputs, role priority will govern which role will get searched for first.
  • "Workflows" is a list of configurations (workflows), with each configuration containing all the needed information for a page.
Clone this wiki locally