File Storage
Last updated
Last updated
WorkflowGen stores files (such as attachments to a request) in a folder tree structure. By default these files are stored on the web server in the folder specified in the ApplicationDataPath
parameter in the configuration file (web.config
), e.g. <add key="ApplicationDataPath" value="\\SERVER\SHARE$\wfgen\App_Data" />
.
The default value is empty and thus will point to the physical directory DRIVE:\Inetpub\wwwroot\wfgen\App_Data
. The default is to keep all the files on the web server.
You might need to move this storage folder location to a dedicated file server for the following reasons:
High volume (large attachments, document archiving, high usage level)
Web Farm architecture implementation (see )
Basic configuration allows you to easily move these files, but with a low security level.
The following steps must be followed to configure your web server:
Create the storage folder on the file server DRIVE:\FOLDER
(e.g. D:\filepub
).
Re-create the folder tree structure relative to the file storage location:
DRIVE:\FOLDER\wfgen\App_Data
DRIVE:\FOLDER\wfgen\App_Data\Files\API
DRIVE:\FOLDER\wfgen\App_Data\Files\DataSet
DRIVE:\FOLDER\wfgen\App_Data\Files\EFormASPX
DRIVE:\FOLDER\wfgen\App_Data\Files\MergeForm
DRIVE:\FOLDER\wfgen\App_Data\Files\RemoteApproval
DRIVE:\FOLDER\wfgen\App_Data\Files\RestApiClient
DRIVE:\FOLDER\wfgen\App_Data\Files\XmlToDatabase
DRIVE:\FOLDER\wfgen\App_Data\Files\XmlTrans
DRIVE:\FOLDER\wfgen\App_Data\LogFiles\auth
DRIVE:\FOLDER\wfgen\App_Data\LogFiles\CancelRequest
DRIVE:\FOLDER\wfgen\App_Data\LogFiles\CompleteAction
DRIVE:\FOLDER\wfgen\App_Data\LogFiles\CopyData
DRIVE:\FOLDER\wfgen\App_Data\LogFiles\Dir
DRIVE:\FOLDER\wfgen\App_Data\LogFiles\Engine
DRIVE:\FOLDER\wfgen\App_Data\LogFiles\GetFormData
DRIVE:\FOLDER\wfgen\App_Data\LogFiles\GetProcessData
DRIVE:\FOLDER\wfgen\App_Data\LogFiles\GetUsersFromDir
DRIVE:\FOLDER\wfgen\App_Data\LogFiles\MergeForm
DRIVE:\FOLDER\wfgen\App_Data\LogFiles\Notifications
DRIVE:\FOLDER\wfgen\App_Data\LogFiles\Portal
DRIVE:\FOLDER\wfgen\App_Data\LogFiles\RaiseException
DRIVE:\FOLDER\wfgen\App_Data\LogFiles\RemoteApproval
DRIVE:\FOLDER\wfgen\App_Data\LogFiles\RestApiClient
DRIVE:\FOLDER\wfgen\App_Data\LogFiles\SendHttpPost
DRIVE:\FOLDER\wfgen\App_Data\LogFiles\SendMessage
DRIVE:\FOLDER\wfgen\App_Data\LogFiles\StartProcess
DRIVE:\FOLDER\wfgen\App_Data\LogFiles\UpdateProcessData
DRIVE:\FOLDER\wfgen\App_Data\LogFiles\XmlToDatabase
DRIVE:\FOLDER\wfgen\App_Data\LogFiles\XmlTrans
Copy the existing files and folders from their original locations to the new locations, which should still follow the same structure.
Create a share on the folder DRIVE:\FOLDER
. This folder should then be accessible by a \\SERVER\SHARE$
type UNC name.
Give NTFS modify permissions on the share as well as all of its folders and sub-folders for all users of WorkflowGen.
Edit the ApplicationDataPath
parameter in DRIVE:\Inetpub\wwwroot\wfgen\web.config
to <add key="ApplicationDataPath" value="\\SERVER\SHARE$\wfgen\App_Data" />
. This is because WorkflowGen will use the specified path in ApplicationDataPath
to store the \Files
, \LogFiles
, and \Templates
folders.
This feature allows process file data (including attachments) to be stored in the database. It allows you to perform WorkflowGen data backup without interrupting service, so that WorkflowGen can still be used during the backup.
Set the ApplicationDefaultProcessDataFileStorageMethod
parameter to File
to store process data files in the file system, or set it to Database
to store process data files in the database.
This parameter will define the default process data file storage method when creating a new process or importing a process XPDL of previous version.
Each process version can have the process data file storage method set independently. This will allow different processes using the file system or database storage method.
On the Process information tab:
Check the Process data storage option Store file content in database to enable the database file storage method.
Uncheck the Process data storage option to disable the database file storage method. This will then use the file system storage method.
On the Process information tab:
Uncheck the Process data storage option to disable the database file storage method. This will then use the file system storage method.
When changing the process data storage method, the following rules must be applied:
There should be no existing requests using the previous process data storage method. You can either delete existing requests or create a new version of the process.
There should be no existing FILE
type process data with the default file value using the previous process data storage method. You can delete all default file values, change the process data storage method, and re-upload the default file values into the process data.
In the database file storage method, WorkflowGen will still create temporary files in the \wfgen\App_Data
folder (ApplicationDataPath
) to be used by requests and actions at runtime.
These temporary files will be automatically deleted when the requests or actions are completed.
To ensure data integrity and 24-hour / 7-days-a-week operation time in database file storage method, your custom asynchronous system action that uses FILE
IN parameters must also save the file content in your custom application database when the file is referenced later by your action.
This will ensure that the file will still exist and can be used later by your asynchronous system action, since only the WorkflowGen database and your custom application database are backed up.
For a Web Farm architecture, file storage must be centralized in a common shared storage path. The settings in the section must be applied for temporary files.