Setting Next Actions

The nextStep property is similar to the input, output, submittedSample, container, and step entities. However, nextStep can only be used on the left side of a dynamic expression; it cannot be used in the calculation on the right side of the expression.

The basic syntax is as follows:

nextStep = <next step value>

Depending on how the step is configured, a nextStep expression may set the next action for the step inputs or the step outputs. For example, in steps that do not produce output samples — such as QC steps, it is the step inputs that proceed (provided they pass QC) to the next step in the workflow.

When creating an expression that calls the nextStep property, there is no need to differentiate between step inputs and step outputs. The LIMS is able to determine this from how the API represents the entities that are available to set next actions on.

Note also that this property is evaluated for each input/output, and can set a different nextStep value for each.

Supported Values for nextStep

For samples to advance to the next step via an LLTK expression, the next step must be specified in the Configuration area of the LIMS.

Configure next steps on the protocol configuration form, in the Next Steps table.

The possible next step values listed in the following table are intended for non-QC protocols. There is no nextStep entity for a QC protocol. However, samples in a QC step in a QC protocol can move to REMOVE or ESCALATE via LLTK.

<next step value> can be one of the following:

  • Any Groovy expression that includes the top-level entity UDFs/custom fields on input, output, submittedSample, and evaluates to one of the options described.

  • A valid next step name, for example, ::Sample Pooling:: (remember that text / string values must be inside double colon delimiters).

  • One of the following 'special values' described in the following table.

Special Value

Description

::ADVANCE::

Used to move the samples to the logical next step in the protocol (provided only one next step is permitted)

::REPEAT::

Used to select Repeat this step.

::REMOVE::

Used to remove sample from workflow.

::ESCALATE::

Used to select Request Manager Review. Reviewer name is left unset.

::COMPLETE::

Used to select Mark protocol as Complete.

::COMPLETE_REPEAT::

Used to select Complete and Repeat this step.

::COMPLETE_REPEAT:<step name>::

Used to select Complete and Repeat option, selecting the named step as the next step to continue with.

::REWORK:<step name>::

Used to select Rework to a previous step, selecting the named step as the step to rework the samples from.

The following conditions must be met:

  • If <next step value> is not a valid next step, or is not one of the special values described in the table above, an error is raised and the script will fail by returning a nonzero value.

  • The <next step value> must be in 'choose next steps' or 'record details' transition when the script is executed. If not, the script will fail and will return an error message.

Example expressions:

-exp 'nextStep = ::ADVANCE::'
-exp 'if (input.QC == true) { nextStep = ::ADVANCE:: } else { nextStep = ::ESCALATE:: }'
-exp 'if (output.QC == true) { nextStep = ::ADVANCE:: } else { nextStep = ::ESCALATE:: }'
-exp 'if (input.::QC:: == true) { nextStep = ::TP53 Make Master Mix Deep Well Plate:: } else { nextStep = ::Dilute/Concentrate:: }'
-exp ‘if (step.::Concentration:: >= 25) { input.QC = true } else {input.QC = false }'
-exp 'if ( step.::Visual QC Result:: == ::Passed Visual QC:: ) { nextStep = ::SEMI-AUTOMATED - Make DNA Quant and Eval Standard Quant:: } else { nextStep = ::REMOVE:: }'
-exp 'if (input.::Avg Concentration:: > 25) { nextStep = ::Cluster Generation (LLT):: } else { nextStep = ::ESCALATE:: }'

Handling Control Samples

When working with control samples, single-use control samples cannot have their next steps set to anything other than REMOVE.

Supplying the optional -excludeControls parameter with a value of true ensures the following:

  • The script calculation is only evaluated for noncontrol samples.

  • If next steps are set, the value is set to REMOVE for control samples.

Note also that the Java contains() method provides a simple way of identifying controls to be removed:

-exp 'if (input.name.contains( ::No Template Control::)) { nextStep = ::REMOVE:: }' 
-exp 'if (input.name.contains( ::CTLl::)) { nextStep = ::REMOVE:: }’

Last updated