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:
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:
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.
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.
In the GXflow Client, in the Advanced/Document Management group of preferences, the Enabled preference must be set to Yes. Also, in the Upload Route you have to specify the directory route in the server that will temporarily save the documents uploaded to the server (before they are entered into the system database, the documents must be temporarily saved in the server disk).
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:
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: