Hi Amancio and Simon,
with the recently released DocuWare version 7.9, you can integrate with the DocuWare Platform REST API within workflows, for certain operations.
One of this operation is to "append a document" from a file cabinet or a document tray. The endpoint for this is:
PUT /FileCabinets/{TrayId/FileCabinetId}/ Operations/ProcessDocumentAction?docId={DocId}
Within the web service configuration you have to specify:
- the document tray or file cabinet ID of the target document
- the document ID of the target document
- the HTTP Body with the appropriate information, such as source fie cabinet GUID and source Doc ID
This means using a workflow you can append (clip) 1 or more documents to the document which triggered the workflow.
The configuration looks like this:
- Create a workflow and define appropriate trigger conditions
- Add a new web service activity
- On tab "General"
- select web service "DocuWare Platform API"
- select endpoint
PUT /FileCabinets/{TrayId/FileCabinetId}/ Operations/ProcessDocumentAction?docId={DocId}
- On tab "Request"
- in section "Route" select the system variable "File cabinet GUID"
- in section "Queries" select the index field "Doc ID"
- in section "HTTP Body" add this:
{
"DocumentAction": "Append",
"DocumentActionParameters": {
"$type": "AppendActionParameters",
"RemoveSourceDocuments": false,
"DocumentsInFront": [],
"DocumentsAtBack": [
{
"SourceCabinetId": "WF_FC_GUID",
"Documents": [
<SOURCE_DOCID>
]
}
]
}
}
- Replace
<SOURCE_DOCID>
with the Doc ID of the document you want to append e.g. 1234
- Save and publish the workflow
Notes:
- It is possible to append multiple documents at once. For this expand the list of source Doc IDs ,e.g.
1234, 1235
- Of course you can also use a global variable to provide the list of source Doc IDs, e.g.
GV_SourceDocIDs
- It is possible to remove the source document(s) once appended. For this set
"RemoveSourceDocuments"
to true
I've attached a screenshot of a sample configuration.
For more information please see the documentation on our
Knowledge Center
Viele Grüße / With best regards,
Gerardo Lisanti
Team Leader Product Management | DocuWare GmbH