organisation_objects()
Returns objects from the organisation tree of a workflow organisation via
wfm.GetOrganisationObjects. Supports various search modes and configurable
response data (index, attributes, parent/child relations).
1. Signature
-
Sync
-
Async
ecm.workflow.organisation_objects(
organisation: str | ECMOrganisation,
*,
request_type: ECMOrganisationObjectRequestType = ECMOrganisationObjectRequestType.ALL,
request_data: ECMOrganisationObjectRequestData = ECMOrganisationObjectRequestData.ALL,
object_ids: str = "",
object_name: str = "",
class_ids: str = "",
class_name: str = "",
) -> list[ECMOrganisationObject]
await ecm.workflow.organisation_objects(
organisation: str | ECMOrganisation,
*,
request_type: ECMOrganisationObjectRequestType = ECMOrganisationObjectRequestType.ALL,
request_data: ECMOrganisationObjectRequestData = ECMOrganisationObjectRequestData.ALL,
object_ids: str = "",
object_name: str = "",
class_ids: str = "",
class_name: str = "",
) -> list[ECMOrganisationObject]
2. Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
|
|
— |
Organisation ID as a string or an |
|
|
|
Search mode (see ECMOrganisationObjectRequestType). |
|
|
|
Which data to include in the response (see ECMOrganisationObjectRequestData). |
|
|
|
Comma-separated object IDs (for |
|
|
|
Object name (for |
|
|
|
Comma-separated class IDs (for |
|
|
|
Class name (for |
2.1. ECMOrganisationObjectRequestType
| Value | Description |
|---|---|
|
All objects in the organisation. |
|
Search by object IDs in |
|
Search by object name in |
|
Search by class IDs in |
|
Search by class name in |
|
Predecessor objects for the object name. |
|
Successor objects for the object name. |
|
Predecessor objects for the class name. |
|
Successor objects for the class name. |
2.2. ECMOrganisationObjectRequestData
Values act as a bitmask:
| Value | Description |
|---|---|
|
Index data only (ID, name, class ID). |
|
Index data and object attributes. |
|
Index data and parent/child object references. |
|
Index data, attributes, and parent/child object references. |
3. Return value
A list of ECMOrganisationObject instances.
3.1. ECMOrganisationObject fields
| Field | Type | Description |
|---|---|---|
|
|
Unique identifier (GUID) of the object. |
|
|
Display name of the object. |
|
|
Class identifier (GUID) of the object. |
|
|
Object attributes (empty when |
|
|
Direct parents in the organisation tree. |
|
|
Direct children in the organisation tree. |
4. Examples
4.1. All objects with full data
-
Sync
-
Async
org = ecm.workflow.active_organisation()
for obj in ecm.workflow.organisation_objects(org):
print(f"{obj.name} (class={obj.class_id})")
for attr in obj.attributes:
print(f" {attr.name} = {attr.value}")
org = await ecm.workflow.active_organisation()
for obj in await ecm.workflow.organisation_objects(org):
print(f"{obj.name} (class={obj.class_id})")
for attr in obj.attributes:
print(f" {attr.name} = {attr.value}")
4.2. Index data only (more performant)
-
Sync
-
Async
from ecmind_blue_client.ecm import ECMOrganisationObjectRequestData
org = ecm.workflow.active_organisation()
objects = ecm.workflow.organisation_objects(
org, request_data=ECMOrganisationObjectRequestData.INDEX_ONLY
)
for obj in objects:
print(f"{obj.id}: {obj.name}")
from ecmind_blue_client.ecm import ECMOrganisationObjectRequestData
org = await ecm.workflow.active_organisation()
objects = await ecm.workflow.organisation_objects(
org, request_data=ECMOrganisationObjectRequestData.INDEX_ONLY
)
for obj in objects:
print(f"{obj.id}: {obj.name}")
4.3. Search by object name
-
Sync
-
Async
from ecmind_blue_client.ecm import ECMOrganisationObjectRequestType
org = ecm.workflow.active_organisation()
results = ecm.workflow.organisation_objects(
org,
request_type=ECMOrganisationObjectRequestType.BY_OBJECT_NAME,
object_name="Wurzel",
)
from ecmind_blue_client.ecm import ECMOrganisationObjectRequestType
org = await ecm.workflow.active_organisation()
results = await ecm.workflow.organisation_objects(
org,
request_type=ECMOrganisationObjectRequestType.BY_OBJECT_NAME,
object_name="Wurzel",
)
5. See also
-
organisations() — Query workflow organisations
-
absent_users() — Absent users in an organisation