• RE: REST API: Workflow list

    There is also a problem I recently found.

    Accessing the URL
    https://CLIENT.docuware.cloud/DocuWare/Platform/ControllerWorkflows/{WF_ID}/Tasks
    returns a list of tasks.

    If there are several tasks each of them assigned to an user, the ColumnValue WF_Task_User_Name contains the username.

    But accessing the URL of these tasks
    https://CLIENT.docuware.cloud/DocuWare/Platform/ControllerWorkflows/{WF_ID}/Instances/{INSTANCE_ID}/Tasks/{TASK_ID}
    returns the same WF_Task_User_Name in all tasks.

     
  • RE: REST API: Workflow list

    Thank you Simon.

    Since I use the REST API not the .NET library the equivalent call would be:

    https://CLIENT.docuware.cloud/DocuWare/Platform/ControllerWorkflows

    Still, there are several workflows that are not shown even though the logged user is controller for those.

    For example, I see one workflow with one active instance in Workflow Designer but if I get workflow info through REST API it shows TaskCount=0 but there is one task.

    <?xml version="1.0" encoding="utf-8"?>
    <?xml-stylesheet type="text/xsl" href="/DocuWare/Platform/Content/standard.xslt"?>
    <WorkflowTasks xmlns:s="http://dev.docuware.com/schema/public/services" Count="0" TimeStamp="2020-02-25T09:56:07.841371Z"
                   xmlns="http://dev.docuware.com/schema/public/services/platform/workflow">
      <s:Links>
        <s:Link rel="first" href="/DocuWare/Platform/ControllerWorkflows/xxx/Tasks?count=50" />
        <s:Link rel="self" href="/DocuWare/Platform/ControllerWorkflows/xxx/Tasks?start=0&amp;count=50" />
      </s:Links>
      <Task Id="Id" InstanceId="InstanceId" IsRead="false" AllowDecisionStamp="true" ActivityDescription="" DocId="DocId"
            ActivityType="GeneralTask" NodeId="NodeId" WorkflowVersionId="WorkflowVersionId">
        <TaskOperations>
          <BaseTaskOperations>
            <s:Links>
              ...
            </s:Links>
          </BaseTaskOperations>
        </TaskOperations>
        <ColumnValues>
          ...
        </ColumnValues>
        <DefaultDecisionId p4:nil="true" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance" />
      </Task>
    </WorkflowTasks>

  • REST API: Workflow list

    Hi.

    We have several Workflows in a DocuWare cloud instance. When we try to list those workflows by using REST API (https://CLIENT.docuware.cloud/DocuWare/Platform/Workflows) only few of them are shown.

    If I access directly to one ot those hidden workflows it is shown: https://CLIENT.docuware.cloud/DocuWare/Platform/Workflows/{WORKFLOW_ID}

    That workflow has three active tasks but if I list them through REST API (https://CLIENT.docuware.cloud/DocuWare/Platform/Workflows/{WORKFLOW_ID}/Tasks) only one is shown.

    We have checked permissions and everything seems to be right.

    The version is 7.1.
     
  • RE: Accept-encoding: gzip for FileDownload

    Thank you very much. I'll post the answer here so anybody searching can find the solution.

    Add this to download URL:
    {{ServerUrl}}/{{Platform}}/FileCabinets/{{FileCabinetId}}/Documents/{{DocumentId}}/FileDownload?targetFileType=zip&keepAnnotations=false

    Be aware that clipped documents are already downloaded as a ZIP file. There is no double zip compression. You have to check if zip file contains one or more files.
     
  • Accept-encoding: gzip for FileDownload

    Hi.

    We are using the REST API for several tasks. In one of them, the application downloads the file through FileDownload. We want to improve download times since some documents are quite large. It seems that cloud server does not enable gzip compression when downloading original document, but it does with regular HTML pages.

    I would like to know if there is a way to enable this.

    Thank you in advance.
     
  • Thank you Joe.

    Thank you Joe.

    I am using Java and Spring to integrate some applications with DocuWare. I finally was able to do it the way you say.

     

  • I finally was able to replace

    I finally was able to replace the document using another REST function.

    I have not been able to do so with a HTTP POST:

    /DocuWare/Platform/FileCabinets/{cabinet}/Documents/{document}

    Instead, I have had to use the Section URL:

    /DocuWare/Platform/FileCabinets/{cabinet}/Sections/{section}/Data

     

  • REST API to replace document

    Hi.

    I am trying to replace a document using REST API but I have not been successful.

    These are the steps:

    1. Download an existing document of the FileCabinet.

    2. Make some changes to the downloaded file, i.e. sign it with a certificate.

    3. Upload the changed document and replace the original one.

    I use the POST call with the multipart/form-data option to do the third step but with no success.

    I hope someone can help.

    Thanks.

  • Finally solved

    Hi.

    I have been able to solve this by using an empty structure.

        ConfirmedData data = new ConfirmedData();
        HttpEntity<ConfirmedData> entity = new HttpEntity<>(data, headers);
        ResponseEntity<String> resp = rest.postForEntity(
            url + "/Workflows/" + wf + "/Instances/" + instance + "/Tasks/" + task + "/Decisions/" + decision + "/Confirm",
            entity, String.class);

    Spring makes the JSON conversion process so I do not worry about the inner format.

    I hope this can help.

     

     

  • Same problem for me

    Hi.

    I am having the same problem. I have created some classes to recreate the structure but I do not know what information I must give.

    public class ConfirmedData {
      public ConfirmedField[] ConfirmedFields;
    }

    public class ConfirmedField {
      WFFormFieldValue Value;
    }

    public class WFFormFieldValue {
      public Object Item;
      public int ItemElementName;
    }

    If I call the REST method without information I get the response: 500 INTERNAL_SERVER_ERROR.

    I hope someone could help.