[PUT] /{id}/state

[PUT] /{id}/state

/api/bpm/process-definitions/{id}/state

Description

Changes the state of a workflow model. The id of the process definition whose state should be changed is passed as a path parameter. The following states can be set in the request body:

  • ACTIVE - The model is in use; i.e. new processes can be started with it.

  • EDIT_LOCKED - The model is locked for editing.

  • EDIT_UNLOCKED - The model is still being edited but is not locked

  • TESTING - The model is available for testing.

  • DELETED - The model has been deleted but is still contained in the database.

  • RELEASED - The model is available but is not yet in use. New processes cannot be started with this model, active ones are being terminated.

Optionally, an organizationId could be sent if process definitions for the nonactive organization should be retrieved. By default, the active organization will be used.

Required Systemrole

R_WFEDIT_START (ID = 21)

Request
Method

PUT

Request Optional Query Parameter

  • organizationId (String): The Id of the organization for which the process definition belongs.

Minimum Version

1.5.0

Request
Example

/api/bpm/process-definitions/1D3F4694BF1B4056B8A9DF75CE36006C/state

/api/bpm/process-definitions/207A55B4165F46D5BCAF96A812F6F331/state?organizationId=914FC91A55D542F79D8ED1BADDE1AFE6

{ "state": "EDIT_LOCKED" }

Response codes

  • 204 - Success: The state has been successfully changed.

  • 400 - Invalid GUID or Bad Request if the state transition is not allowed.

  • 403 - If the user does not have the required role.