organisation_objects()

Gibt Objekte aus dem Organisationsbaum einer Workflow-Organisation zurück über wfm.GetOrganisationObjects. Unterstützt verschiedene Suchmodi und konfigurierbare Ergebnisdaten (Index, Attribute, Eltern-/Kind-Beziehungen).

1. Signatur

  • 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. Parameter

Parameter Typ Standard Beschreibung

organisation

str | ECMOrganisation

Organisations-ID als String oder eine ECMOrganisation-Instanz.

request_type

ECMOrganisationObjectRequestType

ALL

Suchmodus (siehe ECMOrganisationObjectRequestType).

request_data

ECMOrganisationObjectRequestData

ALL

Welche Daten zurückgegeben werden (siehe ECMOrganisationObjectRequestData).

object_ids

str

""

Kommaseparierte Objekt-IDs (für BY_OBJECT_IDS).

object_name

str

""

Objektname (für BY_OBJECT_NAME, PREDECESSORS_BY_OBJECT_NAME, SUCCESSORS_BY_OBJECT_NAME).

class_ids

str

""

Kommaseparierte Klassen-IDs (für BY_CLASS_IDS).

class_name

str

""

Klassenname (für BY_CLASS_NAME, PREDECESSORS_BY_CLASS_NAME, SUCCESSORS_BY_CLASS_NAME).

2.1. ECMOrganisationObjectRequestType

Wert Beschreibung

ALL (0)

Alle Objekte der Organisation.

BY_OBJECT_IDS (1)

Suche nach Objekt-IDs in object_ids.

BY_OBJECT_NAME (2)

Suche nach Objektname in object_name.

BY_CLASS_IDS (3)

Suche nach Klassen-IDs in class_ids.

BY_CLASS_NAME (4)

Suche nach Klassenname in class_name.

PREDECESSORS_BY_OBJECT_NAME (5)

Vorgänger-Objekte für den Objektnamen.

SUCCESSORS_BY_OBJECT_NAME (6)

Nachfolger-Objekte für den Objektnamen.

PREDECESSORS_BY_CLASS_NAME (7)

Vorgänger-Objekte für den Klassennamen.

SUCCESSORS_BY_CLASS_NAME (8)

Nachfolger-Objekte für den Klassennamen.

2.2. ECMOrganisationObjectRequestData

Die Werte wirken als Bitmaske:

Wert Beschreibung

INDEX_ONLY (1)

Nur Index-Daten (ID, Name, Klassen-ID).

INDEX_AND_ATTRIBUTES (3)

Index-Daten und Objekt-Attribute.

INDEX_AND_RELATIONS (5)

Index-Daten und Eltern-/Kind-Beziehungen.

ALL (7)

Index-Daten, Attribute und Eltern-/Kind-Beziehungen.

3. Rückgabewert

Eine Liste von ECMOrganisationObject-Instanzen.

3.1. Felder von ECMOrganisationObject

Feld Typ Beschreibung

id

str

Eindeutige ID (GUID) des Objekts.

name

str

Anzeigename des Objekts.

class_id

str

Klassen-ID (GUID) des Objekts.

attributes

list[ECMOrganisationObjectAttribute]

Objekt-Attribute (leer wenn request_data keine Attribute enthält).

parent_objects

list[ECMOrganisationObjectRef]

Direkte Eltern im Organisationsbaum.

child_objects

list[ECMOrganisationObjectRef]

Direkte Kinder im Organisationsbaum.

3.2. Felder von ECMOrganisationObjectAttribute

Feld Typ Beschreibung

id

str

ID (GUID) des Attributs.

name

str

Name des Attributs.

attribute_class_id

str

Klassen-ID des Attributtyps.

flags

int

Serverseitige Attribut-Flags.

value

str

Attributwert als String, oder leerer String wenn nicht gesetzt.

3.3. Felder von ECMOrganisationObjectRef

Feld Typ Beschreibung

id

str

ID (GUID) des referenzierten Objekts.

name

str

Name des referenzierten Objekts.

class_id

str

Klassen-ID des referenzierten Objekts.

4. Beispiele

4.1. Alle Objekte mit vollständigen Daten

  • 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. Nur Index-Daten (performanter)

  • 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. Objekt nach Name suchen

  • 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. Siehe auch