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

Step Presenter

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

The step controller contains a list of other presenters, and through other presenters as "steps". Once one presenter (or step) is done, we move on to the next presenter (the next step).

In the pipeline config this is represented as a list of controllers. The step presenter displays these presenters in the order that they are given in this list. The step presenter does not actually change the role. Instead, one of the sub-presenters will change the role (examples are connected and racking). Note: The presenter that changes the role here must be last in the list of presenters. Otherwise, the role will be changed, and the process will move on without us having seeing the presenters that were listed after the role changing presenter!

The step controller can also contain buttons, which are displayed at the bottom of the page. The step presenter can be configured to have as many buttons as needed. Each button has an action and a title. If there are no buttons listed given to the presenter when it is setup, then by default it will have the following four buttons:

{action: "print", title: "Print labels"  },
{action: "start", title: "Start process" },
{action: "end",   title: "End process"   },
{action: "next",  title: "Next"          }

The step controller, depending on what it is doing, may also need a printer.

Example from pipeline config: kit binding

{
  "accepts":        [ "samples.extraction.manual_dna_and_rna.input_tube_nap.batched" ],
  "processTitle":   "Manual DNA and RNA Binding",
  "controllerName":  "step_presenter",
  "defaultPrinter": "e367bc",
  "printerType":    2,
  "buttons":        [ 
    {
      "action": "print",
      "title":  "Print spin column & labels"
    },
    {
      "action": "next",
      "title":  "Done"
    }
  ],
  "controllers":     [
    {
      "controllerName": "kit_presenter",
      "kitType":       "DNA & RNA"
    },
    // The last controller in this list must change the role, so the process can move on.
    {
      // This controller will change the role of the current items; it has outputs.
      // It must have at least one output.
      "controllerName": "connected_presenter",
      "behaviours":    {
        "start":    "row",
        "operate":  "row",
        "complete": "row",
        "done":     "next",
        "outputs":  "print"
      },
      "input":         {
        "role":  "samples.extraction.manual_dna_and_rna.input_tube_nap.batched",
        "model": "tubes",
        "title": "Input tube"
      },
      "output":        [
        {
          "role":        "samples.extraction.manual_dna_and_rna.spin_column_dna",
          "aliquotType": "DNA",
          "purpose":     "stock",
          "model":       "spin_columns",
          "title":       "Spin Column"
        },
        {
          "role":        "samples.extraction.manual_dna_and_rna.byproduct_tube_rnap",
          "aliquotType": "RNA+P",
          "purpose":     "stock",
          "model":       "tubes",
          "title":       "Collection Tube"
        }
      ]
    }
  ]
}

In this example, the kit controller is the first presenter. Once the kit barcode has successfully been scanned, this presenter is "done". We then move on to the next part of the process, which is governed by the connected presenter (used for n->m tube transfers).

The last sub-controller here (the role changing presenter, connected in this example) must have at least one output. The role-changing presenter can have multiple output roles.