organisations()

Returns all defined workflow organisations from the server via wfm.GetOrganisations. Only one organisation can be active at a time per server.

1. Signature

  • Sync

  • Async

ecm.workflow.organisations() -> list[ECMOrganisation]
await ecm.workflow.organisations() -> list[ECMOrganisation]

2. Parameters

None.

3. Return value

A list of ECMOrganisation instances. Returns an empty list when no organisations are defined.

3.1. ECMOrganisation fields

Field Type Description

id

str

Unique identifier of the organisation.

name

str

Display name of the organisation.

active

bool

True when the organisation is currently active. Only one organisation can be active at a time.

4. Examples

4.1. List all organisations

  • Sync

  • Async

for org in ecm.workflow.organisations():
    status = "active" if org.active else "inactive"
    print(f"{org.name} ({org.id}): {status}")
for org in await ecm.workflow.organisations():
    status = "active" if org.active else "inactive"
    print(f"{org.name} ({org.id}): {status}")

4.2. Find the active organisation

  • Sync

  • Async

active = next(org for org in ecm.workflow.organisations() if org.active)
print(f"Active organisation: {active.name}")
orgs = await ecm.workflow.organisations()
active = next(org for org in orgs if org.active)
print(f"Active organisation: {active.name}")