definition
definition ¶
DomoWorkflow_Definition
dataclass
¶
DomoWorkflow_Definition(
schema_version: int = 2,
inputs: dict[str, DomoWorkflow_Parameter] = dict(),
outputs: dict[str, DomoWorkflow_Parameter] = dict(),
tiles: list[DomoWorkflow_Tile] = list(),
edges: list[DomoWorkflow_Edge] = list(),
data_list: list = list(),
Design: DomoWorkflow_Design | None = None,
raw: dict = dict(),
)
Parsed representation of a workflow's savedJson.
Separates designElements into typed tiles and edges, and exposes helpers for programmatic construction.
layouts
property
writable
¶
layouts: list
Alias for data_list to align with Design/Tiles/Layouts terminology.
add_boolean_branch_edges ¶
add_boolean_branch_edges(
gateway_id: str,
true_target_id: str,
false_target_id: str,
*,
true_label: str = "True",
false_label: str = "False",
condition_type: str = "Basic"
) -> tuple[DomoWorkflow_Edge, DomoWorkflow_Edge]
Add the required True/False branches for a conditional gateway.
Source code in src/crew_dcs/classes/DomoWorkflow/definition.py
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | |
add_edge ¶
add_edge(
source_id: str,
target_id: str,
title: str | None = None,
condition_type: str | None = None,
) -> DomoWorkflow_Edge
Create and append an edge between two tile IDs.
Source code in src/crew_dcs/classes/DomoWorkflow/definition.py
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | |
add_input ¶
add_input(param: DomoWorkflow_Parameter) -> None
Add a parameter to the schema inputs.
Source code in src/crew_dcs/classes/DomoWorkflow/definition.py
256 257 258 | |
add_output ¶
add_output(param: DomoWorkflow_Parameter) -> None
Add a parameter to the schema outputs.
Source code in src/crew_dcs/classes/DomoWorkflow/definition.py
260 261 262 | |
add_tile ¶
add_tile(
tile: DomoWorkflow_Tile,
x: float | None = None,
y: float | None = None,
) -> DomoWorkflow_Tile
Append a tile, auto-positioning if x/y not given (stack vertically).
Source code in src/crew_dcs/classes/DomoWorkflow/definition.py
143 144 145 146 147 148 149 150 151 152 153 154 | |
empty
classmethod
¶
empty() -> DomoWorkflow_Definition
Create an empty definition suitable for a brand-new workflow.
Source code in src/crew_dcs/classes/DomoWorkflow/definition.py
332 333 334 335 | |
from_saved_json
classmethod
¶
from_saved_json(
saved_json_str: str,
) -> DomoWorkflow_Definition
Parse the savedJson string stored on a version object.
Source code in src/crew_dcs/classes/DomoWorkflow/definition.py
78 79 80 81 82 | |
get_connection_validation_errors ¶
get_connection_validation_errors(
*,
logic_tile_types: tuple[str, ...] = (
"conditionalGatewayNode",
),
allow_dangling_tile_types: tuple[str, ...] = (
"endNode",
),
required_logic_outputs: int = 2
) -> list[str]
Return graph-connection validation errors without raising.
Rules:
- Only tiles in allow_dangling_tile_types may have zero outgoing edges.
- Tiles in logic_tile_types must have exactly required_logic_outputs
outgoing edges.
- Edges must reference existing source/target tile IDs.
Source code in src/crew_dcs/classes/DomoWorkflow/definition.py
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | |
set_guarded_codeengine_flow ¶
set_guarded_codeengine_flow(
*,
package_id: str,
package_version: str,
success_functions: list[str],
failure_notification_emails: list[str] | None = None,
inputs_by_function: (
dict[str, list[DomoWorkflow_Parameter]] | None
) = None,
start_title: str = "Start",
end_title: str = "End",
notification_title: str = "Notify Owners",
notification_message: str = "Workflow preflight failed",
start_x: float = 80.0,
start_y: float = 80.0,
y_step: float = 150.0
) -> None
Build a guarded workflow graph via Design manager.
Source code in src/crew_dcs/classes/DomoWorkflow/definition.py
293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 | |
set_linear_codeengine_flow ¶
set_linear_codeengine_flow(
*,
package_id: str,
package_version: str,
function_names: list[str],
inputs_by_function: (
dict[str, list[DomoWorkflow_Parameter]] | None
) = None,
start_title: str = "Start",
end_title: str = "End",
start_x: float = 80.0,
start_y: float = 80.0,
y_step: float = 150.0
) -> None
Replace current graph with a linear CodeEngine flow via Design manager.
Source code in src/crew_dcs/classes/DomoWorkflow/definition.py
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 | |
to_saved_json ¶
to_saved_json() -> str
Serialize back to the savedJson string expected by the API.
Source code in src/crew_dcs/classes/DomoWorkflow/definition.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | |
validate_boolean_conditionals ¶
validate_boolean_conditionals(
required_labels: tuple[str, str] | None = None,
) -> None
Raise if any conditional gateway does not have a complete two-branch split.
If required_labels is provided, the gateway must have exactly those two
branch labels. If it is omitted, the gateway only needs two distinct,
non-empty condition edges.
Source code in src/crew_dcs/classes/DomoWorkflow/definition.py
199 200 201 202 203 204 205 206 207 208 209 210 211 | |
validate_connection_rules ¶
validate_connection_rules(
*,
logic_tile_types: tuple[str, ...] = (
"conditionalGatewayNode",
),
allow_dangling_tile_types: tuple[str, ...] = (
"endNode",
),
required_logic_outputs: int = 2
) -> None
Raise when connection rules are violated.
This is a stricter topological check than validate_boolean_conditionals
and is intended to answer whether the workflow graph is structurally valid.
Source code in src/crew_dcs/classes/DomoWorkflow/definition.py
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | |