Veröffentlicht Mon, 24 Feb 2020 08:53:04 GMT von Chema Lopez Developer
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.
 
Veröffentlicht Tue, 25 Feb 2020 08:37:30 GMT von Simon H. Hellmann Toshiba TGIS GmbH | IT-Consultant - Document Management Solutions
Hello Chema,
I realized this the hard way just some weeks ago. There are two functions to access all the workflows in the system (see here).
If you use the method
org.GetWorkflowsFromWorkflowsRelation();
you will only get workflows in which the User you used for creating the connection owns a task. All Workflows without active tasks or without tasks assigned to the logged in User will not appear with this function.

I then switched to use the second function:
org.GetWorkflowsFromControllerWorkflowsRelation();
This gets me all the workflows in which the User you used for creating the connection is a workflow controller, regardless of if there are tasks available or if he owns a task.

Hope this helps.

Greetings from Germany,
Simon H. Hellmann
DocuWare System Consultant
Veröffentlicht Tue, 25 Feb 2020 10:00:50 GMT von Chema Lopez Developer

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>

Veröffentlicht Fri, 06 Mar 2020 11:55:14 GMT von Chema Lopez Developer
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.

 

Sie müssen angemeldet sein um Beiträge in den Foren zu erstellen.