To learn more about triggers in general, see section Understanding Triggers.
File trigger event occurs if:
-
monitored file changes
-
set of files in the monitored folder changes
-
a new file appears in the monitored folder
Depending on the trigger configuration, Windows operating system alerts the trigger about the changed files, or the trigger itself keeps a list of the file's last-write time stamp and fires after the file receives a newer time-stamp.
Note | |
---|---|
Typical usage: business system executes a transaction, which in effect generates trigger file in a shared folder. Data content might be structured in CSV, XML and other formats, or it can be structured in a legacy format. In either way, Loftware Automation reads the data, parses values using filters and prints them on labels. For more information on how to parse and extract data, see section Understanding Filters. |
General
This section allows you to configure the most important file trigger settings.
-
Name: Specifies the unique name of the trigger. The names helps you distinguish between different triggers when you configure them in Automation Builder, and later when you run them in Automation Manager.
-
Description: Allows you to describe the role of this trigger. Help the users with a short explanation about what the trigger does.
-
Detect the specified file: Specifies path and name of the file that you monitor for changes.
-
Detect a set of files in the specified folder: Specifies path to the folder, which you monitor for file changes, and the file names. You can use standard Windows wild cards "*" and "?". Some file types are predefined in the drop-down box, but you can also enter your own types.
Note | |
---|---|
When monitoring a network folder, make sure you use the UNC notation of |
Note | |
---|---|
You can also use FTP to drop files. FTP file drop location must be mounted locally and presented to Automation Service as a file share disk drive, mounted via file system. Automation Service user must have granted privileges to access this FTP destination location. When files arrive, Loftware Automation picks them up for processing. |
-
Automatically detect changes:Loftware Automation responds to file changes as soon as the file is created or changed. In this case, Windows operating system informs Loftware Automation Service about the change. You can use it when the monitored folder is located on the local drive and also in some network environments.
-
Check for changes in folder in intervals:Loftware Automation scans the folder for file changes in the defined time intervals. In this case, Loftware Automation monitors folder for file changes by itself. This polling method tends to be slower than automatic detection. Use it as a fallback, when automatic detection cannot be used in your environment.
Execution
Options in the File Access section specify how the application accesses the trigger file.
-
Open file exclusively: Opens the trigger file in exclusive mode. No other application can access the file at the same time. This is the default selection option.
-
Open file with read only permissions: Opens the trigger file in read-only mode.
-
Open file with read and write permissions: Opens the trigger file in read-write mode.
-
File open retry period: Specifies the time period after which Loftware Automation tries to open the trigger file. If the file access is still not possible after this time period, Loftware Automation reports an error.
Options in the Monitoring Options section specify the file detection possibilities.
-
Check file size: Enables detection of changes not only for file time-stamp, but also for file length. The changes in file time-stamp might not be detected in some cases. Therefore, Automation also checks for changed file size and triggers the actions.
-
Ignore empty trigger files: If the trigger file has no contents, it is ignored. The actions do not execute.
-
Delete the trigger file: After the change in the trigger file has been detected, and the trigger fires, Automation deletes the file. Enabling this option keeps the folder clean of processed files.
Note | |
---|---|
Loftware Automation always creates a backup of the received trigger data. The contents of trigger file is saved using a unique file name. This is important, if you need the contents of the trigger file in some of the actions, such as Run Command File. The location of the backup trigger data is referred to by the internal variable DataFileName. |
-
Empty file contents: After the actions execute, the trigger file is emptied. This is useful if the third party applications append data to the trigger file. You want to keep the file, so appending can be done, but you don't want to print the old data.
-
Track changes while trigger is inactive: Fires trigger upon files that change while the trigger is inactive. If your Loftware Automation is not deployed in a high-availability environment with backup servers, the incoming trigger files might become lost if the server is down. After the Loftware Automation is back online, the existent trigger files are processed.
-
Number of concurrent action executions: Specify the number of your concurrent action executions. You don't have to wait for the execution to finish in order for the next one to start. Your processing action order stays the same while simultaneously the same action from another thread can start executing.
The maximum number of your concurrent action executions also depends on your hardware performance. Learn more about Parallel Processing.
Other
Options in the Feedback from the Print Engine section specify communication parameters that allow you to receive print engine feedback.
-
Supervised printing: Activates synchronous printing mode. Use it whenever you want to send the print job status back to the third party application. For more information, see section Synchronous Print Mode.
Options in the Data Processing section specify if you want to trim the data so that it fits into a variable, or ignore the missing label variables. By default, reports errors and breaks the printing process if you try to save values that are too long in label variables, or try to set values for non-existing label variables.
-
Ignore excessive variable contents: truncates data values that exceed the length of the variable as defined in the label designer to make them fit. This option is in effect if you are setting variable values in filters, from command files, and when you are setting values of trigger variables to label variables of the same name.
Example 19. Example
Label variable accepts 5 characters at maximum. With this option enabled, any value longer than 5 characters is truncated to the first 5 characters. If the value is 1234567 ignores digits 6 and 7.
-
Ignore missing label variables: When printing with command files (such as JOB file), the printing process ignores all variables that are:
-
specified in the command file (using the SET command)
-
not defined on the label
Similar happens if you define assignment area in a filter to extract all name-value pairs, but your label contains fewer variables.
When setting values of non-existing label variables, reports an error. If this option is enabled, the printing continues.
-
Options in Scripting section specify scripting possibilities.
-
Scripting language: Selects scripting language for the trigger. All Execute script actions that you use within a single trigger use the selected scripting language.
Options in the Save Received Data section specify the available commands for data that the trigger receives.
-
Save data received by the trigger to file: Enable this option to save the data received by the trigger. The option Variable enables variable file name. Select a variable that contains path and file name.
Note Loftware Automation saves the received data into a temporary file. This temporary file is deleted right after the trigger execution completes. The internal variable
DataFileName
points to that file name. For more information, see Internal Variables. -
On error save data received by the trigger to file: Enable this option to save the data into the trigger only if an error occurs during the action execution. You might want to enable this option to keep the data that caused the issue ready for troubleshooting.
Note Make sure you enable the Supervised printing support. If not, cannot detect errors during the execution. For more information, see section Synchronous Print Mode.