workflow_list_by_family()
Returns all workflow models of a workflow family via wfm.GetWorkflowListByFamily.
A family groups the versions of one workflow model. Exactly one model per family is in use
(ECMWorkflowFamilyModelState.IN_USE); new processes start from that one. The families
themselves come from projects() as entries of type
FAMILY.
1. Signature
-
Sync
-
Async
ecm.workflow.workflow_list_by_family(
family: str | ECMWorkflowProject,
organisation: str | ECMOrganisation | None = None,
) -> list[ECMWorkflowFamilyModel]
await ecm.workflow.workflow_list_by_family(
family: str | ECMWorkflowProject,
organisation: str | ECMOrganisation | None = None,
) -> list[ECMWorkflowFamilyModel]
2. Parameters
| Parameter | Type | Description |
|---|---|---|
|
|
The family as a GUID or as the |
|
|
The organisation as a GUID or as an |
3. Return value
A list of ECMWorkflowFamilyModel instances in server order. Returns an empty list when
the family holds no models.
Measured on enaio 12.0: an unknown or non-family GUID is not an error. The server answers
<Workflows><Resources/></Workflows>, which reads as an empty list.
3.1. ECMWorkflowFamilyModel fields
| Field | Type | Description |
|---|---|---|
|
|
GUID of the workflow model ( |
|
|
Technical model name ( |
|
|
Model status ( |
|
|
GUID of the creator ( |
|
|
Creation time as a UTC |
|
|
Version number of the model within the family ( |
|
|
GUID of the user holding the edit lock ( |
|
|
Name of the user holding the edit lock ( |
|
|
Time of locking as a UTC |
|
|
Description of the model ( |
|
|
Icon ID of the model ( |
|
|
Display name per locale, e.g. |
|
|
Description per locale, resolved via |
3.2. ECMWorkflowFamilyModelState values
| Member | Value | Meaning |
|---|---|---|
|
|
The model is in use: new processes can be started from it. Exactly one per family. |
|
|
The model is locked for editing. |
|
|
The model is being edited but is not locked. |
|
|
The model is released for testing. |
|
|
The model is deleted but still stored in the database. |
|
|
The model is released but not in use: no new processes, running ones still complete. |
|
The server manual documents only the attributes of |
4. Examples
4.1. List the models of every family
-
Sync
-
Async
from ecmind_blue_client.ecm import ECMWorkflowProjectType
families = [p for p in ecm.workflow.projects() if p.type is ECMWorkflowProjectType.FAMILY]
for family in families:
for model in ecm.workflow.workflow_list_by_family(family):
print(f"{family.name}: {model.name} v{model.version} {model.state.name}")
from ecmind_blue_client.ecm import ECMWorkflowProjectType
projects = await ecm.workflow.projects()
for family in (p for p in projects if p.type is ECMWorkflowProjectType.FAMILY):
for model in await ecm.workflow.workflow_list_by_family(family):
print(f"{family.name}: {model.name} v{model.version} {model.state.name}")
4.2. Find the model in use
-
Sync
-
Async
from ecmind_blue_client.ecm import ECMWorkflowFamilyModelState
models = ecm.workflow.workflow_list_by_family(family_id)
in_use = next(m for m in models if m.state is ECMWorkflowFamilyModelState.IN_USE)
print(in_use.localised_names.get("de_DE", in_use.name))
from ecmind_blue_client.ecm import ECMWorkflowFamilyModelState
models = await ecm.workflow.workflow_list_by_family(family_id)
in_use = next(m for m in models if m.state is ECMWorkflowFamilyModelState.IN_USE)
print(in_use.localised_names.get("de_DE", in_use.name))
5. See also
-
projects()— the families of an organisation -
workflow_list()— the workflows a user may start -
export()— export selected models by their IDs