Batch Status

When a run is started, all directories and sheets are resolved to their contained transformations, and these transformations are inserted into the transformation queue (sqts_action_queue) in status "D" for Dependency Wait. For the run, the higher element levels (sheet/directory) are no longer relevant.

During the run, transformations in a batch are set to status "Waiting" when they have no source that has not yet been successfully executed. If a transformation does not depend on any transformation within this batch, it is also set to status "Waiting".

When creating a run, dependencies are determined once and stored in the sqts_batch_instance_dependency table.

A run can be manually halted and restarted. There is only one final status "Finished" which cannot be restarted. When halting a run, the status is set to interrupted, and after the last active task has finished, the run is set to status halted.

flowchart TB
  classDef run fill:#ff9800,stroke:#e67e22,color:#1a252f,stroke-width:1.5px,fill-opacity:1
  classDef done fill:#43a047,stroke:#2e7d32,color:#fff,stroke-width:1.5px,fill-opacity:1
  classDef fail fill:#e57373,stroke:#c62828,color:#1a252f,stroke-width:1.5px,fill-opacity:1
  classDef point fill:#2c3e50,stroke:#2c3e50,color:#fff,fill-opacity:1

  start(( )) --> A

  subgraph L[" "]
    direction TB
    I([Interrupted])
    A([Active])
  end
  subgraph R[" "]
    direction TB
    H([Halted])
    F([Finished])
    E([Error])
  end

  A -->|User: Suspend| I
  I -->|Scheduler: halted remain| H
  H -->|User: Resume| A
  A -->|Scheduler: only halted| H
  A -->|Scheduler: all successful| F
  A -->|Scheduler: task error| E
  H -->|User: Abort| F
  E -->|User: Abort| F
  E -->|User: Resume| A
  F --> stop(( ))

  class A,I,H run
  class F done
  class E fail
  class start,stop point
  style L fill:none,stroke:none
  style R fill:none,stroke:none

State Diagram Run