Before continuing, ensure that you completed the Code Requirements. If you haven't already saved the file, return to the beginning of the Configuration page and follow the instructions there.

Open a terminal program on your computer, and navigate to the directory in which you saved actions_status.py during Code Configuration.

From the command line, run the program. When first running the program, your serial console should look something like the following.

Workflow Run Statuses

There are four possible responses when the workflow run status is fetched:

  1. queued
  2. in progress
  3. completed - success
  4. completed - failure
  5. completed - cancelled

Each response triggers a different set of actions for the tower light.

Queued

When the status is queued, it will print to the serial console.

The light will begin blinking yellow. This will continue as long as the current Actions run remained queued.

In Progress

When the status is in progress, it will print to the serial console.

The light will turn on solid yellow. This will continue as long as the current Actions run remained in progress.

Completed - Success

When the status is completed - success, the ID for that Actions run will be added to the already-shown workflow ID list.

The light will turn green and the buzzer will sound. The length of time for the light to remain on and the buzzer to sound was determined by you in configuration. After the chosen duration, each will turn off.

Completed - Failure

When the status is completed - failure, the ID for that Actions run will be added to the already-shown workflow ID list.

The light will turn red and the buzzer will sound. The length of time for the light to remain on and the buzzer to sound was determined by you in configuration. After the chosen duration, each will turn off.

Completed - Cancelled

When the status is completed - cancelled, the ID for that Actions run will be added to the already-shown workflow ID list.

The light will blink red and the buzzer will sound. The length of time for the light to remain on and the buzzer to sound was determined by you in configuration. After the chosen duration, each will turn off.

Already Followed

If the latest Actions run reached either completed status, and the code fetches again, it will simply print to the serial console, "Already followed the current run." This will continue until a new Actions run is triggered, at which point, it will return one of the four statuses above, and the light (and maybe the buzzer) will turn on as explained.

Exiting the Code

Press CTRL+C to exit the code. You will see the following printed to the serial console.

This guide was first published on Jul 06, 2022. It was last updated on 2022-07-06 09:21:47 -0400.

This page (Code Usage) was last updated on Aug 01, 2022.

Text editor powered by tinymce.