Adding a label

It is very useful to see task specific information in the ecflow_ui. This can be achieved by defining a label, i.e. a string that is attached to a task, and that can be populates using the child command ecflow_client --label.

Update Task Script

To create a new family label with a task t1, start by creating the task script at $HOME/course/test/label/t1.ecf

Listing 45 $HOME/course/test/label/t1.ecf
%include <head.h>

n=1
while [[ $n -le 5 ]]                      # Loop 5 times
do
   msg="The date is now $(date)"
   ecflow_client --label=info "$msg"      # Set the label
   sleep 30                               # Wait half a minute
   (( n = $n + 1 ))
done

ecflow_client --label=info "Job is done!" # Set the final label

%include <tail.h>

Update Suite Definition

Update the suite definition file to add the new family label and task t1.

suite test
  edit ECF_INCLUDE "{{HOME}}/course" # replace '$HOME' appropriately
  edit ECF_HOME    "{{HOME}}/course"

  [... previous families omitted for brevity ..]

  family label
    task t1
      label info ""
  endfamily
endsuite

What to do

  1. Create the new task script file, as shown above.

  2. Modify the suite definition to include the new family and task, as shown above.

  3. Replace the suite, using:

    ecflow_client --suspend /test
    ecflow_client --replace /test test.def
    
  4. Observer the label change using the ecflow_ui.

  5. Customise the label colouring in ecFlowUI, at Tools > Preferences… > Appearance > Node Labels