Changing the current editor and document status
You can update the editor and document status of an existing DMS object in a d.3 repository without the need for action by the user. Mappings are required before the action can be performed. In the Basic information about mapping chapter, you can find general information for helping you to create mappings.
To change the editor or document status of a DMS object, you must perform the following steps:
Determining the URL for a repository
Determine the link relation for the existing DMS object
Open the URL for changing the editor or document status of a DMS object
Determining the URL for a repository
In the chapter Determining a repository, you can learn how to determine the URL for a repository.
Determine the link relation for the existing DMS object
To determine a URL for an existing DMS object, perform a search and evaluate the displayVersion
link relation for an item in the result list. The chapter Retrieving and viewing the results of a search operation provides you with more information about performing a search and the description of a result list item.
Opening the URL for changing the DMS object status and editor
Send an HTTP PUT
request with the required properties as the Body
to the URL of the current available version of the DMS object that you received in the displayVersion
link relation.
You can find descriptions of the JSON object transferred with the PUT
request below:
Property | Description |
---|---|
| Target state of the document. Possible values:
|
| Mandatory field for the target status Processing
You can use the IDs from both d.ecs identity provider and the DMS system. |
| Mandatory field for the target status Release Text (max. 120 bytes) that is stored when the status changes for the document version. You can provide information about the extent of the change, for example. |
Example 1: Changing a document status to “Processing” or changing the editor with your own mapping
Ensure that mapping exists in which the value myprop1_ID
is set to property_state
and myprop2_ID
is set to property_editor
.
Request
PUT/dms/r/dee1f3d3-eae8-5d9d-84d8-2d758c5ddc27/o2m/A00000001/v/current Origin: https://baseuri Accept: application/hal+json Content-Type: application/hal+json { "sourceId": "/myapp/sources/mysource", "sourceProperties": { "properties": [ { "key": "myprop1_ID", "values": [ "Processing" ] }, { "key": "myprop2_ID", "values": [ "97273358-d124-497c-97ce-977f72b32a33" ] } ] } }
If the call is successful, HTTP 200 OK
is returned:
Response
HTTP/1.1 200 OK
Example 2: Changing a document status to “Processing” or changing the editor with standard mapping
Request
PUT/dms/r/dee1f3d3-eae8-5d9d-84d8-2d758c5ddc27/o2m/A00000001/v/current Origin: https://baseuri Accept: application/hal+json Content-Type: application/hal+json { "sourceId": "/dms/r/dee1f3d3-eae8-5d9d-84d8-2d758c5ddc27/source", "sourceProperties": { "properties": [ { "key": "property_state", "values": [ "Processing" ] }, { "key": " property_editor", "values": [ "97273358-d124-497c-97ce-977f72b32a33" ] } ] } }
If the call is successful, HTTP 200 OK
is returned:
Response
HTTP/1.1 200 OK
Example 3: Changing a document status to “Release” with standard mapping
Request
PUT/dms/r/dee1f3d3-eae8-5d9d-84d8-2d758c5ddc27/o2m/A00000001/v/current Origin: https://baseuri Accept: application/hal+json Content-Type: application/hal+json { "sourceId": "/dms/r/dee1f3d3-eae8-5d9d-84d8-2d758c5ddc27/source", "alterationText": "updated file", "sourceProperties": { "properties": [ { "key": "property_state", "values": [ "Release" ] } ] } }
If the call is successful, HTTP 200 OK
is returned:
Response
HTTP/1.1 200 OK
If the change of editor or document status fails, an appropriate response is returned. For more information see Response format for errors.