[en] To learn more about triggers in general, see section Understanding Triggers.
[en] TCP/IP server trigger event occurs after the monitored socket (IP address and port number) receives data.
[en] Typical usage: An existing business system executes a transaction, which in effect sends the data to NiceLabel Automation server on a specific socket. Data content might be structured using CSV, XML and other formats, or it might use a legacy format. In either way, NiceLabel Automation reads the data, parses values using filters and prints them on labels. For more information on how to parse and extract the data, see section Understanding Filters.
[en] This section allows you to configure the most important file trigger settings.
[en] 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.
[en] Description: Allows you to describe the role of this trigger. Help the users with a short explanation about what the trigger does.
[en] Port: Specifies the port number where incoming data will be accepted on. Use the port number that is not in use by any other application. If the selected port is in use, you won't be able to start the trigger in Automation Manager. For more information about security concerns, see section Securing Access to your Triggers.
[en] If your server has multi-homing enabled (more IP addresses on one or more network cards), NiceLabel Automation responds on the defined port on all IP addresses.
[en] Maximum number of concurrent connections: Specifies the maximum number of accepted connections. That many concurrent clients can send data to the trigger simultaneously.
[en] The options in the Execution Event section specify when the trigger should fire and start executing actions.
[en] On client disconnect: Specifies that the trigger fires after the client sends data and closes the connection. This is a default setting.
[en] If you want to send the print job status back to the third party application as a feedback, don't use this option. If the connection is left open, you can send feedback using the action Send data to TCP/IP port with the parameter Reply to sender.
[en] On number of characters received: Specifies that trigger fires when the required number of characters is received. In this case, the third party application can keep a connection open and continuously sends data. Each chunk of data must be of the same size.
[en] On sequence of characters received: Specifies that the trigger fires each time the required sequence of characters is received. You would use this option if you know that the 'end of data' is always identified by a unique set of characters. You can insert special (binary) characters using the button next to the edit field.
[en] Include in trigger data: The sequence of characters that determines the trigger event is not stripped of the data, but is included along with the data. The trigger receives the complete received data stream.
[en] When nothing is received after the specified time interval: Specifies that the trigger fires after a required time interval passes since the last character is received.
[en] Allow connections from the following hosts: Specifies the list of IP addresses or host names of the computers that are allowed to connect to the trigger. Place each entry in a new line.
[en] Deny connections from the following hosts: Specifies the list of IP addresses or host names of the computers that are not allowed to connect to the trigger. Place each entry in a new line.
[en] Welcome message: Specifies a text message that returns to the client each time it connects to the TCP/IP trigger.
[en] Answer message: Specifies the text message that returns to the client each time the actions execute. Use this option when the client doesn't disconnect upon data send and expects the answer about when the action execution ends. The answer message is hard-coded and thus always the same.
[en] Message encoding: Specifies the data encoding scheme, so the special characters can be correctly processed. NiceLabel Automation can automatically detect the data encoding, based on BOM header (text files), or encoding attribute (XML files).
[en] Options in the Feedback from the Print Engine section specify communication parameters that allow you to receive print engine feedback.
[en] 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.
[en] 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.
[en] 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.
例 22. 示例
[en] 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.
[en] Ignore missing label variables: When printing with command files (such as JOB file), the printing process ignores all variables that are:
[en] specified in the command file (using the SET command)
[en] not defined on the label
[en] Similar happens if you define assignment area in a filter to extract all name-value pairs, but your label contains fewer variables.
[en] When setting values of non-existing label variables, reports an error. If this option is enabled, the printing continues.
[en] Options in Scripting section specify scripting possibilities.
[en] Scripting language: Selects scripting language for the trigger. All Execute script actions that you use within a single trigger use the selected scripting language.
[en] Options in the Save Received Data section specify the available commands for data that the trigger receives.
[en] 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.
[en] 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.
[en] Make sure you enable the Supervised printing support. If not, Automation cannot detect errors during the execution. For more information, see section Synchronous Print Mode.
[en] Automation saves the received data into a temporary file. This temporary file is deleted right after the trigger execution completes. The internal variable
DataFileNamepoints to that file name. For more information, see Internal Variables.
[en] Lock and encrypt trigger: Enables trigger protection. If you enable it, the trigger becomes locked and you cannot edit it any longer. This encrypts the actions. Only users with password can unlock the trigger and modify it.
[en] Sending keepalive signals
[en] Your network routing system can silently drop your connection when there is no TCP/IP traffic for a few minutes. To avoid being disconnected, you can choose to periodically send keepalive signals in NiceLabel Automation.
[en] Enable sending keepalive signals in your
[en] Navigate to the System folder.
[en] Make a backup copy of the
product.configin a text editor. The file has an XML structure.
[en] Add the following lines:
<configuration> <IntegrationService> <KeepAliveTime>60000</KeepAliveTime> <KeepAliveInterval>10000</KeepAliveInterval> </IntegrationService> </configuration>
KeepAliveTime(in milliseconds): Specifies how long the TCP socket connection must be inactive before Automation sends a keepalive signal and waits for the acknowledge packets to be returned.
KeepAliveInterval(in milliseconds): Specifies at what intervals to send anotherkeepalive packet when the host is not returning any acknowledge packets.
[en] When the TCP/IP trigger receives the keep alive packet and returns the acknowledge packet, the
KeepAliveTimetimer starts again.
[en] Both values (
KeepAliveInterval) are mandatory to enable sending keepalive signals and must have values larger than 0.
[en] Save the
[en] Restart your Automation service.
[en] Enabled keepalive signals now keep your connection active.