Views:
Question:
How can I use a DocuWare Workflow to obtain a list of Users in my DocuWare system?

Answer:
To retrieve a list of users utilizing a DocuWare Workflow, the Platform REST API from Web services introduced in DocuWare 7.9 must be employed.
 
In this example, we'll run a Web service call in order to obtain the users of the system, then populate them into a Keyword Global Variable and a Keyword Index Field.

Our example workflow will be configured such as the following, 
  1. To begin the creation of this workflow, start by creating a Web Service activity. Name the Web Service, then select "DocuWare Platform API" from the Web service dropdown.
    Lastly, select "Get /Organization/Users" from the Endpoint dropdown.
  2. Next, navigate to the Request tab, then click on the "Send" button to send a request.


    When sending the response, you will need to provide your credentials.


    Once completed, we'll receive a response containing all the user information found.

     
  3. Navigate to the Data Assign tab, then click on the + sign to add a couple of rows for our data assignment.


    To get our "JSON Path", we'll need to click on the pencil icon to the right of the textbox, then it'll take us to the following screen;


    Since we need a list of user names, we'll click on the first instance of Name, then press OK.

    Initially, we'll see that $.User[0].Name is written. To ensure we grab all users from the response, we'll need to replace 0 with the wildcard character *, as shown above.
    After the change, we'll have $.User[*].Name

     
  4. Click OK to save all changes for the activity, then save and publish the workflow. When we run the workflow, it will make the web service call, obtaining all users in the system, and then writing them onto our keyword global variable and index field. 
    Our output will look like the following,


This scenario only covers obtaining a list of user names, and this could be expanded into obtaining a list of user IDs for example, allowing us to gather more specific information on a user using the other Platform REST API endpoints.

KBA is applicable for both Cloud and On-premise Organizations