Tetra Chromeleon Agent Update Sequence Command

The following procedure shows how to programmatically notify the Tetra Chromeleon Agent that updates have occurred for one or more Sequences by using the Sequence Update command and the Tetra Data Platform (TDP) Command Service.

Prerequisites

To run the Sequence Update command, you must have the following:

Step 1: Verify That the Agent Can Receive Commands

To allow the Agent to securely receive and run commands from the TDP, do the following:

  1. From the Tetra Chromeleon Agent Management Console, in the left navigation menu, under Menu, choose Configuration.
  2. Verify that the Receive Commands toggle is set to Yes (the default value).

For more information, see Enter TDP Connection Settings in the Tetra Chromeleon Agent Installation Guide.

Step 2: Run the Sequence Update Command

To run the Tetra Chromeleon Agent Sequence Update command, do the following:

  1. Create a valid Create Command in your code editor by using the following Sequence Update Command Example code snippet.
  2. Copy and run the updated command by using a tool that will allow you to run REST API calls, such as curl or Postman.

After the Agent receives the Update Sequence command, it does the following:

  • Connects to Chromeleon and authenticates by using the configured credentials
  • For each sequence URL in the payload, the Agent does the following:
    • Retrieves the sequence information from Chromeleon
    • Updates the sequence information in the Agent's database and triggers any necessary actions (for example, regenerating injections)
    • Raises events for successful or failed sequence updates

For an example response, see the Command Response section.

Command Structure

The Sequence Update command uses the following structure:

{
  "targetId": "7659ef3a-95e9-4e4c-9742-eaf18e4a8af8",
  "action": "TetraScience.Agent.chromeleon.SequenceUpdate",
  "expiresAt": "2023-12-31T23:58:43.749Z",
  "payload": {
    "sequenceUrls": [
      "chrom://localhost/ChromeleonLocal/Sequences/Sequence1",
      "chrom://localhost/ChromeleonLocal/Sequences/Sequence2"
    ]
  }
}

Sequence Update Command Example

🚧

IMPORTANT

You must enter values for the following variables:

curl --location --request POST 'https://api.tetrascience.com/v1/commands' \
--header 'ts-auth-token: <JWT Token>' \
--header 'x-org-slug: <Your Org Slug>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "targetId": "<Agent ID>",
  "action": "TetraScience.Agent.chromeleon.SequenceUpdate",
  "expiresAt": "2025-12-31T23:58:43.749Z",
  "payload": {
    "sequenceUrls": [
      "chrom://localhost/ChromeleonLocal/Sequences/Sequence1",
      "chrom://localhost/ChromeleonLocal/Sequences/Sequence2"
    ]
  }
}'

Request Body Data Fields

FieldDescriptionExample
targetId(Required) The ID of the Tetra Chromeleon Agent that receives the command7659ef3a-95e9-4e4c-9742-eaf18e4a8af8
action(Required) Command name (this field is a constant varible)TetraScience.Agent.chromeleon.SequenceUpdate
expiresAt(Required) Command expiration date in ISO-8601 format2023-12-31T23:58:43.749Z
payload.sequenceUrls(Required) Array of Chromeleon sequence URLs which have been updatedFor an example "payload", see the Sequence Update Command Example.

Command Response

The command response includes a message with the number of sequences processed.

Example Response

{
  "message": "Processed 2 sequences: 2 successfully and 0 with errors."
}

Troubleshooting

The Tetra Chromeleon Agent will send a FAILURE status back to the TDP after it receives a Sequence Update Command under any of the following conditions:

Potential IssueResolution
The command is expired.Update the request body's "expiresAt" value.
Sequence URLs that aren't validUpdate the request payload's payload.sequenceUrls so that it matches the sequence URLs that are configured in Chromeleon.
Authentication failuresFor ts-auth-token, make sure that you enter a valid service user JWT. For x-org-slug, make sure that you enter a valid organization slug.
Network connectivity issuesVerify that you've configured the Agent's data connection with the TDP correctly. For instructions, see Step 4: Configure the Data Connection in the Tetra Chromeleon Agent Installation Guide (v2.2.x).
"Failed to Fetch Injection" errorRegister the CM7RE.ocx component in Chromeleon on the Agent host server by running the following command from the Agent's local Windows Command Prompt as an administrator:

regsvr32 c:\Program Files (x86)\Thermo\Chromeleon\bin\CM7RE.ocx