Models
Workflow Runs
WorkflowRun
Bases: Base
One particular run of a workflow.
Source code in germinate_ai/data/models/workflow_runs.py
id: Mapped[UUID] = mapped_column(primary_key=True, server_default=text('gen_random_uuid()'))
class-attribute
instance-attribute
Workflow run UUID
state_instance_by_name(name)
Find related state instance by name.
States
StateInstance
Bases: Base
An instance of a state in a Workflow State Machine.
Source code in germinate_ai/data/models/states.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | |
all_phases_complete
property
Are all phases in this state's tasks DAG complete?
current_phase_complete
property
Are all the tasks in the current phase complete?
phase_task_names
property
Get the names of all the tasks in the current phase.
phase_tasks: set[TaskInstance]
property
Return a set of tasks in the current phase.
final_phase()
Return the "final" phase of tasks in the state.
If a state has transitions, then the actual final phase is composed of transition condition evaluation tasks. In that case, this function instead returns the tasks in the penultimate phase which are actually the last phase of user defined tasks.
Note: End states, for example, might not have any transitions into other states.
Source code in germinate_ai/data/models/states.py
next_phase()
Enter next phase by incrementing the phase index and returning all the tasks in the new phase.
Note: Commit to persist the change.
Source code in germinate_ai/data/models/states.py
next_state()
Figure out the next state to transition to.
Source code in germinate_ai/data/models/states.py
state_output()
Returns the merged output from the final phase of tasks (see final_phase).
Tasks
TaskInstance
Bases: Base
An instance of a task.
Source code in germinate_ai/data/models/tasks.py
Enums
StateInstanceStateEnum
Bases: str, Enum
State progress state.
Source code in germinate_ai/data/models/enums.py
TaskInstanceStateEnum
Bases: str, Enum
Task progress state.
Source code in germinate_ai/data/models/enums.py
WorkflowRunStateEnum
Bases: str, Enum
Workflow Run progress state.