ecFlow's documentation is now on readthedocs!

Variable or Meter as selector
#!/usr/bin/env python
from ecf import *

def family_case(): return (
        Family("case_var").add(
            Task("case").add(
                Defstatus("complete"), 
                Edit(VAR=1)),

            Task("when_1").add(
                Trigger("case:VAR==1"),
                Complete("case:VAR != 1")),

            Task("when_2").add(
                Trigger("case:VAR eq 2"),
                Complete("case:VAR ne 2"))),

        Family("case_meter").add(
            Task("case").add(
                Meter("VAR", -1, 100)),
            Task("when_1").add(
                Trigger("case:VAR==1"),        
                Complete("case==complete")),

            Task("when_2").add(
                Trigger("case:VAR eq 2"), 
                Complete("case eq complete"))))

case block in a shell suite definition example
#!/bin/bash

family case_var
  task case
    defstatus complete
    edit VAR 1

  task when_1; trigger case:VAR == 1; 
    complete case:VAR != 1

  task when_2; trigger case:VAR eq 2; 
    complete case:VAR ne 2
endfamily # case_var

family case_meter
  task case; meter VAR -1 100

  task when_1; trigger case:VAR == 1; 
    complete case==complete

  task when_2; trigger case:VAR eq 2; 
    complete case eq complete
endfamily # case_meter