Skip to content

tile

tile

DomoWorkflow_Edge dataclass

DomoWorkflow_Edge(
    id: str,
    source: str,
    target: str,
    edge_type: str = "defaultEdge",
    path: list | None = None,
    title: str | None = None,
    condition_type: str | None = None,
    position: dict[str, float] | None = None,
    source_position: str | None = None,
    target_position: str | None = None,
    data: dict = dict(),
    raw: dict = dict(),
)

Represents a workflow edge (defaultEdge or conditionEdge).

create classmethod

create(
    source_id: str,
    target_id: str,
    title: str | None = None,
    edge_type: str = "defaultEdge",
    condition_type: str | None = None,
    edge_id: str | None = None,
) -> DomoWorkflow_Edge

Build an edge programmatically.

Source code in src/crew_dcs/classes/DomoWorkflow/tile/edge.py
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
@classmethod
def create(
    cls,
    source_id: str,
    target_id: str,
    title: str | None = None,
    edge_type: str = "defaultEdge",
    condition_type: str | None = None,
    edge_id: str | None = None,
) -> DomoWorkflow_Edge:
    """Build an edge programmatically."""
    return cls(
        id=edge_id or str(uuid.uuid4()),
        source=source_id,
        target=target_id,
        edge_type="conditionEdge" if title else edge_type,
        title=title,
        condition_type=condition_type,
        position={"x": 0.0, "y": 0.0} if title else None,
        raw={},
    )

DomoWorkflow_Tile dataclass

DomoWorkflow_Tile(
    id: str,
    tile_type: str,
    index: int,
    x: float = 0.0,
    y: float = 0.0,
    title: str | None = None,
    dimensions: dict | None = None,
    data: dict = dict(),
    raw: dict = dict(),
)

Base class for all workflow designElement tiles.

from_dict classmethod

from_dict(
    obj: dict[str, Any], index: int = 0
) -> DomoWorkflow_Tile

Dispatch to the registered subclass by type field.

Source code in src/crew_dcs/classes/DomoWorkflow/tile/base.py
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
@classmethod
def from_dict(cls, obj: dict[str, Any], index: int = 0) -> DomoWorkflow_Tile:
    """Dispatch to the registered subclass by `type` field."""
    tile_type = obj.get("type", "EMPTY")

    if cls is DomoWorkflow_Tile:
        target_cls = _TILE_TYPE_REGISTRY.get(tile_type, DomoWorkflow_Tile_Unknown)
        return target_cls.from_dict(obj, index=index)

    data = obj.get("data") or {}
    position = obj.get("position") or {}

    instance = cls(
        id=obj.get("id", ""),
        tile_type=tile_type,
        index=index,
        x=position.get("x", 0.0),
        y=position.get("y", 0.0),
        title=data.get("title"),
        dimensions=data.get("dimensions"),
        data=data,
        raw=obj,
    )
    instance._extract_fields(data)
    return instance

to_dict

to_dict() -> dict[str, Any]

Serialize back to the designElement wire shape.

Source code in src/crew_dcs/classes/DomoWorkflow/tile/base.py
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
def to_dict(self) -> dict[str, Any]:
    """Serialize back to the designElement wire shape."""
    data = dict(self.data)
    data["title"] = self.title
    data.pop("position", None)  # position lives at top-level, not inside data
    data["dimensions"] = self.dimensions or {"width": 200, "height": 60}
    out: dict[str, Any] = {
        "id": self.id,
        "type": self.tile_type,
        "position": {"x": self.x, "y": self.y},
        "data": data,
    }
    # Preserve cosmetic top-level fields from the original wire payload
    for key in ("style", "index"):
        if key in self.raw:
            out[key] = self.raw[key]
    return out

DomoWorkflow_Tile_AiAgent dataclass

DomoWorkflow_Tile_AiAgent(
    id: str,
    tile_type: str,
    index: int,
    x: float = 0.0,
    y: float = 0.0,
    title: str | None = None,
    dimensions: dict | None = None,
    data: dict = dict(),
    raw: dict = dict(),
    prompt: DomoWorkflow_Parameter | None = None,
    result: DomoWorkflow_Parameter | None = None,
    agent: dict = dict(),
)

Bases: DomoWorkflow_Tile

AI agent action tile (AI_AGENT).

agent is preserved as a raw dict because it contains AI-agent-specific fields (context, instructions, tools, outputDescriptions) that extend the standard parameter shape.

DomoWorkflow_Tile_CodeEngine dataclass

DomoWorkflow_Tile_CodeEngine(
    id: str,
    tile_type: str,
    index: int,
    x: float = 0.0,
    y: float = 0.0,
    title: str | None = None,
    dimensions: dict | None = None,
    data: dict = dict(),
    raw: dict = dict(),
    task_type: str | None = None,
    metadata: dict = dict(),
    inputs: list[DomoWorkflow_Parameter] = list(),
    outputs: list[DomoWorkflow_Parameter] = list(),
    uses_structured_outputs: bool = False,
    selected_task_title: str | None = None,
    selected_task_description: str | None = None,
    package_id: str | None = None,
    function_name: str | None = None,
    package_version: str | None = None,
    settings: dict = dict(),
)

Bases: DomoWorkflow_Tile_ServiceTask

serviceTaskNode with taskType='nebulaFunction' — a CodeEngine action tile.

This is the primary tile type for programmatic workflow construction. Use the create() classmethod for the cleanest ergonomics.

create classmethod

create(
    title: str,
    package_id: str,
    function_name: str,
    version: str,
    inputs: list[DomoWorkflow_Parameter] | None = None,
    outputs: list[DomoWorkflow_Parameter] | None = None,
    settings: dict | None = None,
    tile_id: str | None = None,
    x: float = 0.0,
    y: float = 0.0,
) -> DomoWorkflow_Tile_CodeEngine

Build a CodeEngine tile programmatically — no raw dict needed.

Parameters:

Name Type Description Default
title str

Display name shown on the tile in the Domo UI.

required
package_id str

CodeEngine package identifier.

required
function_name str

Name of the function to invoke.

required
version str

Package version string (e.g. "1.0.0").

required
inputs list[DomoWorkflow_Parameter] | None

Parameter list for the tile's inputs.

None
outputs list[DomoWorkflow_Parameter] | None

Parameter list for the tile's outputs.

None
settings dict | None

Extra metadata settings dict (optional).

None
tile_id str | None

Override the auto-generated UUID for the tile id.

None
x float

Canvas x position.

0.0
y float

Canvas y position.

0.0
Source code in src/crew_dcs/classes/DomoWorkflow/tile/code_engine.py
 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
@classmethod
def create(
    cls,
    title: str,
    package_id: str,
    function_name: str,
    version: str,
    inputs: list[DomoWorkflow_Parameter] | None = None,
    outputs: list[DomoWorkflow_Parameter] | None = None,
    settings: dict | None = None,
    tile_id: str | None = None,
    x: float = 0.0,
    y: float = 0.0,
) -> DomoWorkflow_Tile_CodeEngine:
    """Build a CodeEngine tile programmatically — no raw dict needed.

    Args:
        title: Display name shown on the tile in the Domo UI.
        package_id: CodeEngine package identifier.
        function_name: Name of the function to invoke.
        version: Package version string (e.g. "1.0.0").
        inputs: Parameter list for the tile's inputs.
        outputs: Parameter list for the tile's outputs.
        settings: Extra metadata settings dict (optional).
        tile_id: Override the auto-generated UUID for the tile id.
        x: Canvas x position.
        y: Canvas y position.
    """
    metadata = {
        "packageId": package_id,
        "functionName": function_name,
        "version": version,
        "settings": settings or {},
    }
    data = {
        "title": title,
        "taskType": "nebulaFunction",
        "metadata": metadata,
        "input": [p.to_dict() for p in (inputs or [])],
        "output": [p.to_dict() for p in (outputs or [])],
        "usesStructuredOutputs": False,
        "position": {"x": x, "y": y},
    }
    return cls(
        id=tile_id or str(uuid.uuid4()),
        tile_type="serviceTaskNode",
        index=0,
        x=x,
        y=y,
        title=title,
        data=data,
        raw={},
        task_type="nebulaFunction",
        metadata=metadata,
        inputs=inputs or [],
        outputs=outputs or [],
        package_id=package_id,
        function_name=function_name,
        package_version=version,
        settings=settings or {},
    )

DomoWorkflow_Tile_Conditional dataclass

DomoWorkflow_Tile_Conditional(
    id: str,
    tile_type: str,
    index: int,
    x: float = 0.0,
    y: float = 0.0,
    title: str | None = None,
    dimensions: dict | None = None,
    data: dict = dict(),
    raw: dict = dict(),
    inclusive: bool = False,
)

Bases: DomoWorkflow_Tile

Branch gateway tile (conditionalGatewayNode).

DomoWorkflow_Tile_DatasetQuery dataclass

DomoWorkflow_Tile_DatasetQuery(
    id: str,
    tile_type: str,
    index: int,
    x: float = 0.0,
    y: float = 0.0,
    title: str | None = None,
    dimensions: dict | None = None,
    data: dict = dict(),
    raw: dict = dict(),
    dataset: DomoWorkflow_Parameter | None = None,
    query: DomoWorkflow_Parameter | None = None,
    result: DomoWorkflow_Parameter | None = None,
)

Bases: DomoWorkflow_Tile

Dataset query tile (DATASET_QUERY_TASK).

DomoWorkflow_Tile_Empty dataclass

DomoWorkflow_Tile_Empty(
    id: str,
    tile_type: str,
    index: int,
    x: float = 0.0,
    y: float = 0.0,
    title: str | None = None,
    dimensions: dict | None = None,
    data: dict = dict(),
    raw: dict = dict(),
)

Bases: DomoWorkflow_Tile

Placeholder / work-in-progress tile (EMPTY).

DomoWorkflow_Tile_End dataclass

DomoWorkflow_Tile_End(
    id: str,
    tile_type: str,
    index: int,
    x: float = 0.0,
    y: float = 0.0,
    title: str | None = None,
    dimensions: dict | None = None,
    data: dict = dict(),
    raw: dict = dict(),
    terminating: bool = False,
)

Bases: DomoWorkflow_Tile

The end (endNode) tile.

DomoWorkflow_Tile_Parallel dataclass

DomoWorkflow_Tile_Parallel(
    id: str,
    tile_type: str,
    index: int,
    x: float = 0.0,
    y: float = 0.0,
    title: str | None = None,
    dimensions: dict | None = None,
    data: dict = dict(),
    raw: dict = dict(),
)

Bases: DomoWorkflow_Tile

Fan-out / fan-in gateway tile (parallelGatewayNode).

DomoWorkflow_Tile_ServiceTask dataclass

DomoWorkflow_Tile_ServiceTask(
    id: str,
    tile_type: str,
    index: int,
    x: float = 0.0,
    y: float = 0.0,
    title: str | None = None,
    dimensions: dict | None = None,
    data: dict = dict(),
    raw: dict = dict(),
    task_type: str | None = None,
    metadata: dict = dict(),
    inputs: list[DomoWorkflow_Parameter] = list(),
    outputs: list[DomoWorkflow_Parameter] = list(),
    uses_structured_outputs: bool = False,
    selected_task_title: str | None = None,
    selected_task_description: str | None = None,
)

Bases: DomoWorkflow_Tile

Generic action tile (serviceTaskNode).

When task_type == 'nebulaFunction' the registry will dispatch to DomoWorkflow_Tile_CodeEngine instead; this class handles all other task types (None, 'artificialIntelligence', …).

DomoWorkflow_Tile_Start dataclass

DomoWorkflow_Tile_Start(
    id: str,
    tile_type: str,
    index: int,
    x: float = 0.0,
    y: float = 0.0,
    title: str | None = None,
    dimensions: dict | None = None,
    data: dict = dict(),
    raw: dict = dict(),
    is_form_start: bool = False,
    form_id: str | None = None,
    inputs: list[DomoWorkflow_Parameter] = list(),
)

Bases: DomoWorkflow_Tile

The start (rootNode) tile — one per workflow.

DomoWorkflow_Tile_Unknown dataclass

DomoWorkflow_Tile_Unknown(
    id: str,
    tile_type: str,
    index: int,
    x: float = 0.0,
    y: float = 0.0,
    title: str | None = None,
    dimensions: dict | None = None,
    data: dict = dict(),
    raw: dict = dict(),
)

Bases: DomoWorkflow_Tile

Fallback for tile types not yet registered.

DomoWorkflow_Tile_UserTask dataclass

DomoWorkflow_Tile_UserTask(
    id: str,
    tile_type: str,
    index: int,
    x: float = 0.0,
    y: float = 0.0,
    title: str | None = None,
    dimensions: dict | None = None,
    data: dict = dict(),
    raw: dict = dict(),
    config_type: str | None = None,
    email: dict = dict(),
)

Bases: DomoWorkflow_Tile

Human-in-the-loop approval tile (userTaskNode).

register_tile_type

register_tile_type(tile_type: str)

Decorator that registers a DomoWorkflow_Tile subclass for a tile type string.

Source code in src/crew_dcs/classes/DomoWorkflow/tile/base.py
20
21
22
23
24
25
26
27
def register_tile_type(tile_type: str):
    """Decorator that registers a DomoWorkflow_Tile subclass for a tile type string."""

    def decorator(cls: type[DomoWorkflow_Tile]) -> type[DomoWorkflow_Tile]:
        _TILE_TYPE_REGISTRY[tile_type] = cls
        return cls

    return decorator

Modules