Trigger File Creation
naturalForms Server (NFS) generates "trigger files" when the following events take place:
- New administrator account created
- New user account created
- Password reset
- Output files are generated
Monitoring Trigger Files
To successfully integrate with NFS these triggers must be monitored. ExpeData uses software called Mirth Connect to monitor the trigger folders and complete some action. When new administrators and users are created, the system sends out an activation email. When output files are generated, Mirth can provide any combination of the output files through email and/or ftp files based on the NFS setup. A Mirth starter kit is provided to quickly get your system up and running.
For companies that want to use their own software for monitoring trigger files, that works too.
Suggested Integration Strategy
Below is a workflow showing each component and its function.
- Receives the form submission
- Creates output files based on setup
- Creates output trigger file
- Monitors the trigger folder
- When a trigger file is created Mirth processes the output
- Trigger file is moved to the successful folder
- Monitor the successful trigger folder
- When a new file is written, open it
- Read the template ID so you know how the data should be processed
- Read the output path (Example: 10027\605000843\100000\20130325144552498) so you know where the files are written
- Grab the output data and drop it into a row in the database based on the document ID.
- If a document ID already exists in the database then over-write it if you always want the most recent information
For companies that are not using Mirth, applications would monitor the trigger folder directly.
Don't monitor file system for new output
It is not recommended to monitor the file system for new output files to be written. If your application is trying to pull files before all output has been written then conflicts can cause missed data. Since the trigger file is written after the output files are created you will not run into this issue.