FTP Monitor is a plug-in which creates cases by checking constantly a FTP or Shared directory. If there are files on that directory, by the number of existing files on that, new cases are created.
How the plug-in works
FTP monitor requires to be created a valid FTP or Shared account on which a directory must be created. For each file uploaded on that directory, a case will be created automatically depending on some condition or if a certain time is accomplished, then that file is attached to the case, for this is necessary to create an Input Document. To run this plug-in is essen--Liliana 16:36, 24 July 2013 (EDT)tial to configure a cron. In addition, if there are some XML files on the directory, the data of them will be added as a case data that was created.
If there are XML files with the same name, it will parse, and the XML data will include as case data that will be created.
- ProcessMaker V 2.0.37 and later.
- Mozilla Firefox from 3.6 and later.
- Internet Explorer from 7 and later.
Installation and Configuration
- Import the Simple Reporting plug-in on the ADMIN tab.
- Enabled the Plug-in.
Creating a FTP Monitor Connection
Connection Type will be FTP or SHARED.
From version 1.4.23 the creation of the FTP monitor has a new view:
The following changes were made:
- Form was divided in two section: Basic Information FTP where connection parameters must be set, and Process Information has to be set where cases will be created.
- Connection type name was changed from SHARED to LOCAL.
- Test connection button, help users to check if the connection is correct.
Create cases from a specific folder in a FTP server
Host: host on which files will be transferred to create cases.
Port: server port, include this only if it's necessary. It might be blank.
User: user of the server, include this if the server needs authentication. It might be blank.
Password: password of the server, this password is associated with the user name. This information is not required, so it might be blank.
Path: specify the directory name where the files are located.
Search Pattern: indicates what type of files will use. It accepts Regular Expressions.
Pass Variables in an XML file: Check this if variables of a XML file need to be passed data into the case created. The XML file must have the following structure:
- <FieldName1>First Name</FieldName1>
- <FieldName2>Last Name</FieldName2>
- Where FieldName1 and FieldName2 could be either a dynaform field or a case field. Finally, nodeName could by any name you want.
- It is important to follow the above structure, otherwise cases can't be created.
Process: it lists all the process.
Task: It lists only initial tasks.
User: it list all the available users.
Input Document: list all input documents created for the process chosen. On this input document the XML file will attach.
Active: check this option if the connection will use, otherwise un-check it.
(formerly named Shared)
Create cases in a folder in the same server where ProcessMaker is installed. It doesn't need to specify data authentication.
FTP Monitor Settings
On the main connection list, there will be a menu with some options explained as follows:
Creating a Case
As soon as the connection was created, cron will execute automatically, according to the user's configuration. Once the cron is executed, it will look for new files on the server configured. If it finds new files, the number of cases will be created according to the number of files existing. If a file was created before with its respective case, it won't be created again. For example, accessing to the server where the files are located:
On the example above, on the server there are 221 files and one XML file, it means that 221 cases must have been created in the process:
And one file uploaded in an Input Document.
FTP Monitor Log
For each cron executed a log is created. I will display a registry which will have all the characteristics of the cron executed:
- Execution Date Time: it displays the cron execution time.
- Connection Type: it displays if the connection is FTP or SHARED.
- Path: it shows the path where the files are located.
- Failed: it shows if some cases weren't created.
- Succeeded: it shows how many cases were created.
- Processed: it shows how many files were processed.
FTP Monitor Log Details
It will display the following details:
- Execution Date Time: it shows the execution date time of the cron.
- Path: it shows the txt file uploaded from the directory to ProcessMaker.
- Have XML: if the option Pass variables in an XML file: was enable this field will display TRUE, otherwise will display FALSE.
- Variables: it displays the variables passed on the XML file.
- Status: if the case or cases were created, the status will be OK.
- Description: it displays some error that might occur during the cases creation.