HowTo: Working With Documents

Unofficial Content

To work with documents in GXflow, that is, in order to associate process instances with attachments of formats such as doc, xls, pdf, etc. you have to do the following:

Definition at the global level in the Knowledge Base

First, they should be defined at the global level from the GeneXus IDE using the Preferences – Workflow – Documents option as shown in the image below:


Association of Documents with Processes

Once the documents have been defined at the global level, they have to be associated with the processes in which they are going to be used. This is done from the process properties dialog as shown in the figures below.


Note: If the documents are not associated with the process, it will be automatically done upon associating the documents with the task.

Association of Documents with Tasks

Once the documents have been defined at the global level, they can be associated with a task. If the previous step was skipped and they weren't defined at the process level, it will be automatically done.

Before associating the documents with the task, you will have to enable it to manage them as shown below.


Next, you will have to associate the document definitions with the task, which implies that later on you will be able to instance documents of that type.
Once the documents' logic has been defined, you have to perform the following steps in the Workflow client before executing a flow with documents.

Configuration of preferences

In the GXflow Client, in the Advanced/Document Management group of preferences, the Enabled preference must be set to Yes. Also, in the Upload Path you have to specify the absolute path to the directory in the server that will be used to temporarily save the uploaded documents (before they are entered into the system database, the documents must be temporarily saved in the server disk).

Note: the Upload Path must be an absolute path and the web server user must have write rights over that folder.


Work with Documents

After configuring all the necessary settings, we access the work with documents application in the process instance.

If the task doesn't have an associated application, such as a transaction, the dialog to work with documents is displayed when executing the task. Otherwise, we have to select the instance and press the Documents button as shown in the image below:


Then, in both cases, a dialog similar to the one below will be displayed:


Document Manager

In this application you can globally manage all the documents existing in the workflow application regardless of the process or task to which they belong. This application can be accessed from the Navigator as shown in the figure below:


NOTE: The size of the uploaded files is limited by the property maxRequestLength in the web.config file under <system.web>.

There is a way of determine the maximum value of upload file size and its changing its value

              <httpRuntime  maxRequestLength="<size>"/>

Where <size> is the number of kilobytes; e.g.: 2048. (see )

In java its for timeout and we have to configure it in the web server.