The LCATR job harness communicates with LIMS in order to register job parameters, allocate job identifiers, provide status updates and upload result summaries. Communication with LIMS is also required for registering and later retrieval of job result summary schema. This document describes the communication interface.
All communication is initiated by a query from the client (harness) in the form of an HTTP POST. Any GET methods are not specified here. There are two sets of commands and each set is rooted in a base URL:
/Results/<command>/Schema/<command>All POST data uses a single keyword jsonObject and a value which is a JSON-encoded string. All responses, including errors, from LIMS are of a MIME type application/json and contain a JSON-encoded string. The form of the JSON strings in a POST query and their return are described for each command below. A successful HTTP query will be indicated with the usual code 200 and this is independent of any potential application-level logic errors.
There are three LIMS commands related to running a job which the job harness calls. One for registering a new job, one for updating its status and one for uploading a summary of its results. For each command there is specified a query data structure and either nominal return and exceptional data structures. These data structures are, at top level, in the form of a dictionary.
Beyond the command-specific entries, every query data structure has the following:
jobidnull)
stamp
The registration command is requestID. It is used to attempt to
register a new job with LIMS and to deliver to the harness a list of
any prerequisite jobs that must have completed before the registering
one may begin.
The query contains a specific subset of the job's input parameters.
unit_typeunit_idjobversionoperatorThe nominal return gives a LIMS job identifier string and a list of the registered information of any jobs on which the requesting one depends.
jobidprereqjobid
giving the registered job identifier for each.
If an exception occurs no job identifier is allocated and an error message is returned:
jobiderror
Status updates are sent to LIMS through the course of the job. The
command is update.
The query includes these entries:
stepstatusnull if the step completed successfully, otherwise it
contains a human readable string that indicates the
nature of the failure.
Note, reported failures are fatal and no follow-up status updates should be expected from the job.
The current list of step values is:
configuredstagedproducedvalidatedarchivedpurgedBoth the nominal and the exceptional response has a single key:
acknowledgenull if the status is accepted. If the job
should abort this will contain a human readable
message explaining why.
When the job successfully produces a result it will upload a summary
via the ingest command. In addition to the common entries this
command expects a single additional one:
resultEach schema-compliant result summary data structure is a dictionary that contains at least these entries:
schema_nameschema_versionThe payload of the actual result summary is sent as additional entries. More information about schemas is in the "LCATR Schema" document.
Both the nominal and the exceptional response has a single key:
acknowledgenull if the status is accepted. If the job
should abort this will contain a human readable
message explaining why.
The values that may be reported as described in one of the three
sections above can be retrieved by querying LIMS with the status
command.
Note: this allows the job harness to rerun individual steps of a job
and is intended to facilitate job software development and not to be
used for production. As such it is only implemented in the
fakelims server and not currently supported by real LIMS
instances.
The call indicates which of the three sections is being queried and the job ID the query applies:
jobidstatusregistration, update or summary.
A dictionary is returned which parrots back the same jobid and
status key/value pairs used in the call and an additional key/value
pair which depends on the value of status or if there was an error.
If an unknown jobid is passed or another error occurs the returned
dictionary contains the key error with a string value that indicates
the nature of the error. If an error key is included the existence
of any other keys is undefined.
If the status argument is registration the returned dictionary has
a prereq key that is filled as defined is in the requestID
function but additionally has an entry for the requested job ID.
If the status argument is update the return value includes a
steps key, the value of which holds a list of dictionaries, one for
each status update that has been reported for the job. The keys to
these dictionaries are: state (the step name), status (the status
which is null unless an error occurred) and stamp (the reported
time stamp).
If the status argument is summary the return value includes a
result key the value of which is the same list that was reported
with the result key in the prior ingest command.
The LIMS commands related to job result summary schema are described in this section.
Before any result summary that follows a particular schema may be accepted to LIMS the schema that describes the result must first be registered. This is done with the LIMS register command. The query consists of a single parameter:
schemaSchema representation is described in the LCATR Schema document. Note, only schema descriptions in JSON representation is allowed.
All registered schema descriptions can be retrieved with the all command which takes no parameters. The value returned is schema and is a list of the requested schema
.
Registered schema descriptions can be retrieved with the retrieve command. The query consists of a list of dictionaries held in the match parameter, each element of the list is a dictionary with the following parameters:
nameversionIf the version is not specified the highest (assuming lexical ordered) version is returned.
The value returned is a dictionary with the key schema pointing to a list of the requested schema.
Date: 2014-10-03 11:46:47 PDT
HTML generated by org-mode 6.21b in emacs 23