Skip to content

parameter

parameter

DomoWorkflow_Parameter dataclass

DomoWorkflow_Parameter(
    id: str | None,
    param_name: str,
    display_name: str,
    data_type: str,
    is_list: bool = False,
    required: bool = True,
    nullable: bool = False,
    value: Any = None,
    flag: str | None = None,
    visible: bool = True,
    children: list = list(),
    ai_description: str | None = None,
    config_type: str | None = None,
    custom_mapping_type: str | None = None,
    entity_sub_type: str | None = None,
    mapped_to: str | None = None,
    default_values: Any = None,
    raw: dict = dict(),
)

Represents a single input or output parameter on a workflow or tile.

create classmethod

create(
    param_name: str,
    display_name: str | None = None,
    data_type: str = "text",
    required: bool = True,
    is_list: bool = False,
    value: Any = None,
    flag: str | None = None,
) -> DomoWorkflow_Parameter

Ergonomic factory for building parameters programmatically.

Source code in src/crew_dcs/classes/DomoWorkflow/parameter.py
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
@classmethod
def create(
    cls,
    param_name: str,
    display_name: str | None = None,
    data_type: str = "text",
    required: bool = True,
    is_list: bool = False,
    value: Any = None,
    flag: str | None = None,
) -> DomoWorkflow_Parameter:
    """Ergonomic factory for building parameters programmatically."""
    return cls(
        id=None,
        param_name=param_name,
        display_name=display_name or param_name,
        data_type=data_type,
        is_list=is_list,
        required=required,
        value=value,
        flag=flag,
        # Programmatic parameters always carry these keys on the wire.
        raw={"nullable": False, "defaultValues": None},
    )

to_dict

to_dict() -> dict[str, Any]

Serialize, emitting nullable / defaultValues only when meaningful.

Domo omits these keys on some parameters (AI agent, dataset query). They are written back only if the source payload carried them or the value was set to something other than the default, so a read-then-write round trip adds nothing.

Source code in src/crew_dcs/classes/DomoWorkflow/parameter.py
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
def to_dict(self) -> dict[str, Any]:
    """Serialize, emitting `nullable` / `defaultValues` only when meaningful.

    Domo omits these keys on some parameters (AI agent, dataset query). They
    are written back only if the source payload carried them or the value
    was set to something other than the default, so a read-then-write
    round trip adds nothing.
    """
    out = {
        "id": self.id,
        "paramName": self.param_name,
        "displayName": self.display_name,
        "dataType": self.data_type,
        "isList": self.is_list,
        "required": self.required,
        "value": self.value,
        "flag": self.flag,
        "visible": self.visible,
        "children": self.children,
        "aiDescription": self.ai_description,
        "configType": self.config_type,
        "customMappingType": self.custom_mapping_type,
        "entitySubType": self.entity_sub_type,
        "mappedTo": self.mapped_to,
    }
    if "nullable" in self.raw or self.nullable:
        out["nullable"] = self.nullable
    if "defaultValues" in self.raw or self.default_values is not None:
        out["defaultValues"] = self.default_values
    return out