[PUT] /{id}/file

[PUT] /{id}/file

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

Description

Saves the complete XML workflow model file for the process definition identified by id, overwriting the existing model on the server. The XML file to be stored should first be retrieved via GET /api/bpm/process-definitions/{id}/file.

The process definition must be locked for editing (state EDIT_LOCKED) before calling this endpoint. This can be done via PUT /api/bpm/process-definitions/{id}/state with state EDIT_LOCKED, or by calling GET /api/bpm/process-definitions/{id}/file with readOnly=false, which locks the model automatically.

The familyId of the process definition is required. If organizationId is not provided, the currently active organization is used.

The WorkflowProcess@Id attribute inside the XML must match the {id} path parameter.

 

Required Systemrole

R_WFEDIT_START (ID = 21)

Request Method

PUT

Request Mandatory Query Parameters

  • familyId (String): ID of the workflow family the process definition belongs to.

Request Optional Query Parameters

  • organizationId (String): ID of the organization the process definition belongs to. If not provided or set to -1, the currently active organization is used automatically.

Minimum Version

BPM Service: 1.6.0

Request Example

/ap/api/bpm/process-definitions/07A1B5CB252F48F0B1AC0E45E5EBAD42/file?familyId=34307E042258432F8369C2CE72442768

/api/bpm/process-definitions/07A1B5CB252F48F0B1AC0E45E5EBAD42/file?familyId=34307E042258432F8369C2CE72442768&organizationId=15596884B6554ECB8311EF0F9B111111

Content-Type: application/xml

Send XML body with the following structure:

<os:Package xmlns:os="AS-SCHEMA:WORKFLOW" Id="1F596884B6554ECB8311EF0F9B6A381B"> <PackageHeader> ... </PackageHeader> <TypeDeclarations> ... </TypeDeclarations> <WorkflowProcesses> <WorkflowProcess Id="07A1B5CB252F48F0B1AC0E45E5EBAD42" Name="SperrfristTest"> ... </WorkflowProcess> </WorkflowProcesses> </os:Package>

Result Codes

  • 204 - Success: The workflow model has been successfully updated.

  • 400 - If the ID format is invalid or WorkflowProcess@Id in the XML does not match the {id} path parameter.

  • 500 - Server error.