save_organisation()

Persists a workflow organisation via wfm.SaveOrganisation. The server stores the current state of the organisation and broadcasts a notification to all connected clients afterwards.

1. Signature

  • Sync

  • Async

ecm.workflow.save_organisation(organisation: str | ECMOrganisation) -> None
await ecm.workflow.save_organisation(organisation: str | ECMOrganisation) -> None

2. Parameters

Parameter Type Default Description

organisation

str | ECMOrganisation

Organisation ID as a string or an ECMOrganisation instance.

3. Return value

None. Raises an exception when the server job returns an error code.

4. Examples

4.1. Save the active organisation

  • Sync

  • Async

org = ecm.workflow.active_organisation()
ecm.workflow.save_organisation(org)
org = await ecm.workflow.active_organisation()
await ecm.workflow.save_organisation(org)

4.2. Save by ID string

  • Sync

  • Async

ecm.workflow.save_organisation("E3F3AFE3FB42433CB0C9FFE0F62533ED")
await ecm.workflow.save_organisation("E3F3AFE3FB42433CB0C9FFE0F62533ED")

5. Notes

  • The job automatically notifies all clients of the change.

  • Typically called after organisation changes (e.g. after configure_user_absence() or set_substitutes()) when persistence should be forced explicitly.

6. See also