Zengin TCP/IP Adapter

Zengin is a standard Japanese communication protocol. The Zengin TCP/IP adapter enables Sterling B2B Integrator to communicate with Zengin servers.

The Zengin TCP/IP adapter is comprised of two components:
  • Zengin Sender and Requester adapter
  • Zengin Receiver and Responder adapter

During the configuration process, the Zengin TCP/IP adapter requires the use of the Zengin Configuration Import service and a specially-configured instance of the File System adapter.

You can also control certain behaviors by configuring properties in the zengin.properties file.

The following table provides an overview of the Zengin TCP/IP adapter:

Category Description
System name ZENGIN_SENDER_REQUESTER, ZENGIN_RECEIVER_RESPONDER
Graphical Process Modeler (GPM) category None
Description Transfers files to and from remote systems using TCP/IP. The Zengin TCP/IP adapter is configured in two parts, Zengin Sender and Requester and Zengin Receiver and Responder, and each functions differently within a business process. You can use the Zengin Sender and Requester adapter to send data or requests for data to a remote Zengin server. Use this adapter in a business process. The Zengin Receiver and Responder adapter receives a file or request for data from a remote Zengin server, and then runs a predefined business process to respond to the request accordingly. It acts as a facilitator of incoming requests.
Preconfigured? No
Requires third-party files? No
Platform availability Available for:
  • Microsoft Windows
  • Sun Solaris
  • HP-UX
  • IBM-AIX
  • SuSE
  • RedHat EL
Related services Zengin Configuration Import service
Application requirements The Zengin TCP/IP adapter supports Zengin TCP/IP version 2. The application must provide at least one document in process data if a “send” action is specified.
Initiates business processes? The Zengin Receiver and Responder adapter initiates a business process when a file is received, or when a request to send a file is received.
Invocation Runs as part of a business process.
Restrictions Each instance of the Zengin Receiver and Responder adapter must use a port not used by any other application on the host machine.

How the Zengin TCP/IP Adapter Works

The Zengin TCP/IP adapter uses the Zengin Configuration Import service to populate Zengin TCP/IP adapter configurations into a database. The Zengin Configuration Import service enables the Zengin adapter to function, but is not part of the Zengin TCP/IP adapter. It is created independently. For more information, see Implementing the Zengin Configuration Import Service Configuration.

When the Sterling B2B Integrator server is running, the Zengin Receiver and Responder adapter listens on a port specified in the adapter configuration. Accordingly, when an incoming request is received from a remote Zengin server, the Zengin Receiver and Responder adapter creates a new instance of the Zengin Receiver and Responder adapter to respond to the request and process it.

The following sections explain how the Zengin Sender and Requester adapter and the Zengin Receiver and Responder adapter function.

Zengin Sender and Requester Adapter, Sending a File

The following steps summarize how the Zengin Sender and Requester adapter works in a business process within Sterling B2B Integrator when sending a file to a remote Zengin server:
  1. The Zengin Sender and Requester adapter retrieves a file from the business process primary document and sends it to a remote Zengin server.
  2. After sending files to the remote server, the Zengin Sender and Requester adapter updates the business process with the status of each file it attempted to send. The status of each file is nested within a ZenginResult element, where each file alias appears as a separate element with a status value:
    • success – The file was successfully sent.
    • fail – The file transmission failed.
    • not sent – The Zengin TCP/IP adapter did not send the file because of an error.
    • unknown – The Zengin TCP/IP adapter is unable to determine the status of the file.

View the status report in the Sterling B2B Integrator Business Process Detail window. The following example shows the structure of the status report and the four possible status values:

<ZenginResult>
	<file_alias_1>success</file_alias_1>
	<file_alias_2>fail</file_alias_2>
	<file_alias_3>not sent</file_alias_3>
	<file_alias_4>unknown</file_alias_4> 
</ZenginResult>

Zengin Sender and Requester Adapter, Requesting a File

When the Zengin Sender and Requester adapter requests a file from a remote Zengin server the following steps occur:
  1. The Zengin Sender and Requester adapter sends a request for a file to a remote Zengin server.
  2. The remote Zengin server replies by sending the requested file.
  3. The Zengin Sender and Requester adapter then puts the received file in the business process primary document.

Zengin Receiver and Responder Adapter, Receiving a File

When the Zengin Receiver and Responder adapter receives a file, the following steps occur:
  1. The Zengin Receiver and Responder adapter listens on a socket for an incoming message.
  2. The Zengin Receiver and Responder adapter receives a file from a remote Zengin server.
  3. The adapter reads the settings from the zengin.properties file.
  4. If the file received has variable-length records, the document does not retain the Zengin protocol record length fields. You must specify whether the file is text or binary. If the file is text, you must also specify whether or not to append a CRLF at the end of each record. For more information, see Configuring the zengin.properties File.
  5. The Zengin Receiver and Responder adapter starts a predefined business process based on the file it receives, and puts the file into the primary document of the business process.
  6. The adapter sets two values in the business process, ZenginFilename and ZenginFileAlias. These correspond to the filename and file_alias elements in the Zengin configuration XML file.
    Attention:
    Spaces are not allowed in the ZenginFileAlias and file_alias parameters.

Zengin Receiver and Responder Adapter, Responding to a File Request

When the Zengin Receiver and Responder adapter responds to a request for a file, the following steps occur:
  1. The Zengin Receiver and Responder adapter receives a request from a remote Zengin server to send a file.
  2. The Zengin Receiver and Responder adapter starts a predefined business process to retrieve the requested file.
  3. The adapter sets two values in the business process that is running, ZenginFilename and ZenginFileAlias. These correspond to the filename and file_alias elements, respectively, in the Zengin XML configuration file.
    Attention:
    Spaces are not allowed in the ZenginFileAlias and file_alias parameters.
  4. If the request is for a text file containing variable length records, then the boundary between records in the file is determined based on the CRLF options. For more information, see Configuring the zengin.properties File.
    Note: Previous versions of the Zengin Receiver and Responder adapter required each record in the file to be preceded by a two-byte Zengin protocol record length in binary format. If the file document to be retrieved by the business process is an older version that contains the Zengin protocol record length fields, the adapter still supports passing the ZenginVariableRecLenPreInserted parameter and setting it to “true” in the business process.
  5. The business process places the file into its primary document.
  6. The Zengin Receiver and Responder adapter extracts the file and sends it to the remote Zengin server.

Implementing the Zengin TCP/IP Adapter

To implement the Zengin TCP/IP adapter, complete the following tasks:
  1. Activate your license for the Zengin TCP/IP adapter. For information, see the An Overview of Implementing Services.
  2. Create a Zengin Configuration Import service configuration. For information, see Implementing the Zengin Configuration Import Service Configuration.
  3. Configure the Zengin XML configuration file. For information, see Configuring the Zengin XML Configuration File.
  4. Create a Zengin Sender and Requester adapter and a Zengin Receiver and Responder adapter configuration. For information, see Configuring the Zengin TCP/IP Adapter.
  5. Use the Zengin Sender and Requester adapter in a business process to send or request a file.

Implementing the Zengin Configuration Import Service Configuration

The Zengin Configuration Import service imports the Zengin XML configuration file into the data source. Creating a Zengin XML configuration is a prerequisite step that is required to use the Zengin TCP/IP adapter.

Note: See Using the zenginConfigHelper Utility for information about a command-line utility that can be used instead of the Zengin Configuration Import Service.
To implement the Zengin Configuration Import service:
  1. Create the Zengin Configuration Import service configuration. For information, see Creating a Service Configuration.
  2. Configure the Zengin Configuration Import service. For information, see Configuring the Zengin Configuration Import Service.
  3. Create a File System adapter configuration to read the Zengin XML configuration file. For information, see Configuring the File System Adapter.
  4. Create the Zengin TCP/IP adapter configuration. For information, see Creating a Service Configuration.
  5. Configure the Zengin TCP/IP adapter. For information, see Configuring the Zengin TCP/IP Adapter.
  6. Create a business process to start the Zengin Configuration Import service, the File System adapter, and the Zengin TCP/IP adapter configurations.

Configuring the Zengin Configuration Import Service

To configure the Zengin Configuration Import service, you must specify field settings in Sterling B2B Integrator.

Sterling B2B Integrator Configuration

The following table describes the fields used to configure the Zengin Configuration Import service in Sterling B2B Integrator:

Name Unique, meaningful name for the Zengin Configuration Import service configuration.
Description Meaningful description for the service configuration, for reference purposes.
Select a Group Select one of the options:
  • None – You do not want to include this configuration in a group at this time.
  • Create New Group – You can enter a name for a new group in this field, which will then be created along with this configuration.
  • Select Group – If you have already created one or more groups for this service type, they are displayed in the list. Select a group from the list.
Note: For more information about groups, see Using Service Groups.

GPM Configuration

There is no configuration required in the GPM for the Zengin Configuration Import service.

Configuring the File System Adapter

To configure the File System adapter instance for use with the Zengin Configuration Import service, you must specify field settings in Sterling B2B Integrator and in the GPM.

Sterling B2B Integrator Configuration

The following table describes the fields used to configure the required File System adapter instance in Sterling B2B Integrator:

Note: The field names in parentheses represent the corresponding field names in the GPM. This information is provided for your reference.
Field Description
Name Unique, meaningful name for the File System adapter configuration.
Description Meaningful description for the adapter configuration, for reference purposes.
Select a Group Select one of the options:
  • None – You do not want to include this configuration in a group at this time.
  • Create New Group – You can enter a name for a new group in this field, which will then be created along with this configuration.
  • Select Group – If you have already created one or more groups for this service type, they are displayed in the list. Select a group from the list.
Note: For more information about groups, see Using Service Groups.
Collection Folder (collectionFolder) Any folder or subfolder (on the same computer where Sterling B2B Integrator is installed) where files are collected. Do not specify a folder containing programs or any files you do not want to lose. The File System adapter does not copy the files it collects for processing.
Filename Filter (filter) Leave blank
Collect files from subfolders within and including the collection folder? (useSubFolders) Select No
Use the absolute file path name for the document name? (keepPath) Select No
Start a business process once files are collected? (bootstrap) Select No
Extraction Folder (ExtractionFolder) Folder where you save the file to write. This is the folder where you placed the Zengin configuration file.
Unobscure File Contents (unobscure) Select No
Filenaming convention (assignFilename) Select Assign a specific name.
Filename (assignedFilename) Zengin configuration filename. Required.

GPM Configuration

The business process runs, respectively, the File System adapter configuration and the Zengin Configuration Import service configuration. The first operation of the business process runs the File System adapter to read the Zengin XML configuration file. Specify the following field settings for the File System adapter in the GPM:

Note: In cases where the BPML field name differs from the GPM field name, the BPML field name is shown in parentheses.
Field Description
Config (participant name) Name of the adapter configuration. Required.
Action Action that the File System adapter is to perform. Select Collection (FS_COLLECT). Required.
DeleteAfterCollect Select No, so the business process does not delete the file after reading it. Required.

The second operation of the business process runs the Zengin Configuration Import service to extract the configuration from the file into the data source or database. There is no need to specify any specific entry. The following business process is an example of how this operation should look:

<process name="zengin_configuration_import"> 
<sequence name="Main sequence">
	<operation name="File System Adapter">
			<participant name="my_file_sys_adapter_instance"/>
			<output message="FileSystemInputMessage">
				<assign to="Action">FS_COLLECT</assign>
				<assign to="assignedFilename" from=" ‘my_zengin_config_xml'"></assign>
				<assign to="collectionFolder">my_folder</assign>
				<assign to="deleteAfterCollect”>false</assign>
				<assign to="filter" from=‘my_zengin_config_xml'"</assign>
				<assign to="."from="*"></assign>
			</output>
		<input message="inmsg">
				<assign to="."from="*"></assign>
		</input>
	</operation>
	<operation name="Zengin Configuration Import Service>
		<particpant name="my_zengin_config_import_instance"/>
			<output message="output">
				<assign to="."from="*"></assign>
			</output>
			<input message="input">
				<assign to="."from="*"></assign>
			</input>
	</operation> 
</sequence> 
</process>

An example of this business process (ZenginConfigImport.bpml) is available in the installroot/samples/Zengin folder.

Configuring the Zengin XML Configuration File

The XML schema for the Zengin configuration file is defined in the file, zengin-config.xsd, which is included with Sterling B2B Integrator. Find this file in the Sterling B2B Integrator DTD/Schema repository.

The following table describes the format of the elements in the Zengin XML configuration file. You must preconfigure these elements for the Zengin TCP/IP adapter to work properly. Several of the element values are represented as hexadecimal (base 16) numbers because both ROS3 Zengin servers and CJS (Chori Joho Systems) Zengin servers use hexadecimal notation for these elements.

XML Element Description
zengin_id When nested within the server element, indicates the local server. When nested within the client element indicates the remote servers. This element can appear only once within the server element, and can appear multiple times within the client element.
server Definition of a single local server and all of its associated remote servers. The Zengin TCP/IP adapter supports only one server element appearing within the Zengin XML configuration file.
client All of the remote Zengin server definitions.
password Use the same password for both directions of communication between Sterling B2B Integrator and a remote Zengin server. Must be 12 hexadecimal digits; use leading 0s if necessary.
alias Identifies the local and remote Zengin servers. The alias for the local server must be localhost. The alias for a remote server may be any value.
center_code Entity sending or receiving files. There is one code for the remote Zengin server and the local Sterling B2B Integrator instance. Must be 10 hexadecimal digits.
cpu_node_code Sequence number for each CPU/Node actually connected as if to a line and used for data exchange. Must be four hexadecimal digits; use leading 0s if necessary.
file_alias Identifies the file being sent or requested. Human readable alias for a filename. Each file alias associated with a particular client must be unique; do not use the same file_alias multiple times within the client element.
Attention:
Spaces are not allowed in this parameter.
filename Name of the file being sent or requested. Represents an industry code and file type. Each filename associated with a particular client must be unique; do not use the same filename multiple times within the client element. Valid value is 24 hexadecimal digits.
receive_BP_name Name of the business process to start when a file is received from a remote Zengin server.
request_BP_name Name of the business process to start when a file is requested by a remote Zengin server.
record_length Length of the record in bytes. When sending a file or responding to a request for a file:
  • record_length is required.
  • If fixed_record_length is set to true, then 1<record_length<=2043, and record_length must be a factor of file size.
  • If fixed_record_length is set to false, then 0<record_length<=2041.
When requesting a file:
  • If fixed_record_length is set to true, then record_length is required.
  • If fixed_record_length is set to false, then record_length is optional and can be set to 0.
When receiving a file, the record_length value is not used.
fixed_record_length Whether each record in the file has the same length. Valid values are true and false. If false, each record may have a different length.
file_access_key Used for access control as a part of data protection. Must be 12 hexadecimal digits; use leading 0s if necessary.
use_compression Valid values are true and false.

The following sample Zengin XML configuration file defines the required single instance of the local server (<alias>localhost</alias>), a single remote Zengin server (<alias>Ros3</alias>), and two files associated with the ROS3 server:

<?xml version="1.0" encoding="UTF-8"?> 
<zengin xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="zengin-config.xsd">
  <server>
     <zengin_id>
      <alias>localhost</alias>
<!--the local server(Sterling B2B Integrator)-->
      <center_code>1212121212</center_code>
      <cpu_node_code>1A1B</cpu_node_code>
    </zengin_id>
   <client>
       <zengin_id>
           <alias>Ros3</alias>
           <center_code>123456789A</center_code>
           <cpu_node_code>F1F1</cpu_node_code>
       </zengin_id>
       <password>FFFFFFFFFFFF</password>
       <file_definition>
           <file_alias>send_variable_uncompr</file_alias>
           <filename>FOFOFOFOFOFOFOFOFOFOFOFO</filename>
           <request_bp_name>bpreq</request_bp_name>
           <receive_bp_name>bprecv</receive_bp_name>
           <fixed_record_length>false</fixed_record_length>
           <record_length>256</record_length>
           <use_compression>false</use_compression
           <file_access_key>AA00000000AA</file_access_key>
       </file_definition>
       <file_definition>
           <file_alias>send_fixed_uncompr</file_alias>
           <filename>000000000000000000000001</filename>
           <request_bp_name>bpreq</request_bp_name>
           <receive_bp_name>bprecv</receive_bp_name>
           <fixed_record_length>true</fixed_record_length>
           <record_length>256</record_length>
           <use_compression>false</use_compression
           <file_access_key>FE00120000EF</file_access_key>
       </file_definition>
   </client>
  </server> 
</zengin>

Securing the Zengin XML Configuration File

Information is normally stored in the Zengin XML configuration file in clear text. This includes the client alias passwords and file access keys. This may or may not be acceptable. In cases where clear text is not acceptable, you should secure that data.

Sterling B2B Integrator includes a utility called zenginSecureConfig that obscures (encrypts) the client alias passwords and file access keys contained in the Zengin XML configuration file.

To run the zenginSecureConfig utility, use one of the following commands from the command line:
  • install_dir/bin/zenginSecureConfig.sh configFileName [encoding] (UNIX)
  • install_dir/bin/zenginSecureConfig.cmd configFileName [encoding] (Windows)

Specify the path to the Sterling B2B Integrator installation directory for install_dir and the Zengin XML configuration file name for configFileName. The [encoding] parameter allows you to enter an optional character encoding. If not entered, the utility uses the default value of UTF-8.

The zenginSecureConfig utility reads the specified configuration file and parses it for validity. As the file is parsed, the utility checks for:
  1. Client password nodes (//zengin/client/password)
    • If found, you will be prompted to enter a password or to use the existing value (if one is present).
    • If no password is found for a given client node, you are prompted to enter a password for that client node.
    • After you enter a password, a <password_secure> node tag is written with the obscured (encrypted) value.
  2. File access key nodes (//zengin/client/file_definition/file_access_key)
    • If found, you are prompted to enter a file access key or to use the existing value (if one is present).
    • If no file access key is found for a given file definition, you are prompted to enter a file access key for that file definition node.
    • After you enter a file access key, a <file_access_key_secure> node tag is written with the obscured (encrypted) value.

When the zenginSecureConfig utility is finished running, all client passwords and file access keys are secure and may be safely stored in the system.

To reset any of the secure values, perform one of the following steps:
  • Remove the secure value, leaving an empty node. (For example, <password_secure/> or <password_secure></password_secure>).
  • Remove the “_secure” part of the tag and enter a clear text value or leave the value empty. (For example, <password/> or <password>clearTextPsw</password>).
  • Delete the entire secure node.

After the secure values have been reset, run the zenginSecureConfig utility, if needed, to secure any new values.

Using the zenginConfigHelper Utility

To export a Zengin XML configuration from the data source to a file, use the zenginConfigHelper utility provided with Sterling B2B Integrator. This utility also allows you to import a Zengin XML Configuration file to the data source and can be used instead of the Zengin Configuration Import service for this purpose. The zenginConfigHelper utility is especially useful for easily importing configuration files created with the zenginSecureConfig utility.

To export a Zengin XML Configuration, run the zenginConfigHelper utility using one of the following commands from the command line:
  • install_dir/bin/zenginConfigHelper.sh export configFileName (UNIX)
  • install_dir/bin/zenginConfigHelper.cmd export configFileName (Windows)
To import a Zengin XML Configuration, run the zenginConfigHelper utility using one of the following commands from the command line:
  • install_dir/bin/zenginConfigHelper.sh import configFileName (UNIX)
  • install_dir/bin/zenginConfigHelper.cmd import configFileName (Windows)

Specify the path to the Sterling B2B Integrator installation directory for install_dir and the Zengin XML configuration file name for configFileName.

Configuring the Zengin TCP/IP Adapter

To configure the Zengin TCP/IP adapter, you must configure both the Zengin Sender and Requester adapter and the Zengin Receiver and Responder adapter by specifying field settings in Sterling B2B Integrator and in the Graphical Process Modeler. For general information about service and adapter configurations, see Creating a Service Configuration.

Configuring the Zengin Sender and Requester Adapter

Sterling B2B Integrator Configuration

You can create as many configurations of the Zengin Sender and Requester adapter as necessary. If you leave the optional parameters in the following table blank, you can use a single adapter instance for multiple remote Zengin servers.

The following table describes the fields used to configure the Zengin Sender and Requester adapter in Sterling B2B Integrator:

Note: The field names in parentheses represent the corresponding field names in the GPM. This information is provided for your reference.
Field Description
Name Unique and meaningful name for the adapter configuration. Required.
Description Meaningful description for the adapter configuration, for reference purposes. Required.
Select a Group Select one of the options:
  • None – You do not want to include this configuration in a group at this time.
  • Create New Group – You can enter a name for a new group in this field, which will then be created along with this configuration.
  • Select Group – If you have already created one or more groups for this service type, they are displayed in the list. Select a group from the list.
Note: For more information about groups, see Using Service Groups.
Zengin Server Alias (ZenginRemoteServer Alias) Identifies the Zengin destination server with which the Zengin TCP/IP adapter communicates. The alias identifies such values as Hostname, Port, Center Code, and CPU/Node code. Must match the value of the //client/zengin_id/alias element in the Zengin XML configuration file. Optional, however, if left blank, you must specify the Zengin server alias in the GPM or at runtime in process data.
Hostname or IP (ZenginHostname) Remote Zengin server IP address or DNS name. Must correspond with the server specified in Zengin Server Alias. Optional, however, if left blank, you must specify in the GPM or at runtime in process data.
Port (ZenginPort) Remote Zengin server port number. Optional, however, if left blank, you must specify in the GPM or at runtime in process data.

GPM Configuration

The following table describes the fields used to configure the Zengin Sender and Requester adapter in the GPM:

Field Description
Config Name of the adapter configuration.
ZenginDocuments When sending multiple files, this XPath expression identifies all documents in process data which will be sent. All XML element names must be equal to the appropriate file alias.

For example, if process data contains: <myDocs> <FileAlias1 SCIObjectID="someDbObjectId"/> <FileAlias2 SCIObjectID="anotherDbOjectId"/> </myDocs> and the business process contains the following:<assign to="ZenginDocuments">//myDocs/*</assign>You must configure FileAlias1 and FileAlias2 as valid file aliases (using the Zengin XML configuration file).

ZenginFileAlias When sending a file, used to look up all other file configuration values, access key, record type, and compression.

For example: <assign to="ZenginFileAlias”>myAlias</assign>In this case, you must configure myAlias as a file alias using the Zengin XML configuration file.

Attention:
Spaces are not allowed in this parameter.
ZenginHostname Remote Zengin server IP address or DNS name. Must correspond with the server specified by ZenginRemoteServerAlias. If left blank in the Sterling B2B Integrator configuration, you must specify this parameter either here or at runtime in process data.
Zengin Mode Mode is either Send file or Request file. The corresponding business process parameter values are send and request. Sender parameter.
ZenginPort Remote Zengin server port number. If left blank in the Sterling B2B Integrator configuration, you must specify this parameter either here or at runtime in process data.
ZenginRemoteServerAlias Identifies the Zengin destination server with which the Zengin TCP/IP adapter communicates. The alias identifies such values as Hostname, Port, Center Code, and CPU/Node code. Must match the value of the //client/zengin_id/alias element in the Zengin XML configuration file. If left blank in the Sterling B2B Integrator configuration, you must specify this parameter either here or at runtime in process data.
ZenginVariableRecLenPreInserted Either true or false. If true, the file being sent has variable length records, and the two-byte record length is pre-inserted in the data before each record. Sender parameter.
Note: This field is no longer necessary, but is retained for compatibility with older files preceded with a 2-byte record length.

Configuring the Zengin Receiver and Responder Adapter

Sterling B2B Integrator Configuration

Due to TCP/IP requirements, only one configuration of the Zengin Receiver and Responder is allowed for a particular port. The following table describes the field used to configure the Zengin Receiver and Responder adapter in Sterling B2B Integrator:

Field Description
Listen Port Remote Zengin server port number. Required. Valid values: 1025 – 65535. The default value is 5020.

GPM Configuration

There is no configuration required in the GPM for the Zengin Receiver and Responder adapter.

Configuring the zengin.properties File

The zengin.properties file in the properties directory provides settings that control the retry behavior of the Zengin TCP/IP adapter and how it handles files containing variable-length records.

To configure the zengin.properties file, perform the following steps:
  1. Locate the zengin.properties.in file in the properties directory where you installed Sterling B2B Integrator.
  2. Open the zengin.properties.in file in a text editor.
  3. Configure the properties according to the following tables:

    Specify the following default settings in the zengin.properties.in file:

    Property Description
    default.Timeout Timeout value, in seconds, if the Zengin TCP/IP adapter was idle during a receive process.
     
    Note: The following properties control the Retry behavior of the Zengin TCP/IP adapter.
    default.AutoRetry Specifies whether the adapter should make retry attempts if the connection between the adapter and the remote Zengin server is broken during a send or receive process. Valid values:
    • true—Automatically make retry attempts
    • false—Do not make retry attempts (default)
    default.MaxRetry Maximum number of retry attempts to make. Valid values are any positive integer. This property is only used if AutoRetry is set to true. Default is 3.
    default.RetryInterval Interval, in seconds, between each retry attempt. Valid values are any integer greater than 1. This property is only used if AutoRetry is set to true and MaxRetry is greater than 1. Default is 3 seconds.

    You should always specify default settings. If you need different settings for a particular station and file, you can also configure each station and file combination using this syntax:

    StationAlias.FileAlias.property=setting

    For example, if you have the default.AutoRetry set to true, but you do not want retry attempts made for FILE01 in STATION01 as defined in the Zengin XML configuration file, enter STATION01.FILE01.AutoRetry=false in the zengin.properties.in file. This will override the default setting for that station and file only.

    You can also specify settings for each station and file combination to control how the Zengin TCP/IP adapter handles files containing variable-length records.

    For each specific Station and File combination, you can specify the settings in the following table:

    Note: In all the following properties, StationAlias and FileAlias must match the zengin XML configuration file.
    Property Description
    StationAlias.FileAlias.Timeout Timeout value, in seconds, if the Zengin TCP/IP adapter was idle during a receive process.
     
    Note: The following properties control the Retry behavior of the Zengin TCP/IP adapter.
    StationAlias.FileAlias.AutoRetry Specifies whether the Zengin TCP/IP adapter should make retry attempts if the connection between the adapter and the remote Zengin server is broken during a send or receive process. Valid values:
    • true—Automatically make retry attempts
    • false—Do not make retry attempts
    StationAlias.FileAlias.MaxRetry Maximum number of retry attempts to make. Valid values are any positive integer. This property is only used if AutoRetry is set to true.
    StationAlias.FileAlias.RetryInterval Interval, in seconds, between each retry attempt. Valid values are any integer greater than 1. This property is only used if AutoRetry is set to true and MaxRetry is greater than 1.
     
    Note: The following properties control the handling of files containing variable-length records.
    StationAlias.FileAlias.FileType Specifies the type of file. Valid values:
    • binary—File content will not be altered before being sent or received
    • text—File content will be altered according to the AppendCRLF and CRLFHexCode property settings
    Default is binary.
    StationAlias.FileAlias.AppendCRLF In a text file, specifies whether to append each record with a delimiter. Valid values:
    • true—When received, each record in the file will be appended with the hexadecimal code specified in CRLFHexCode. When being sent, the code will be removed from the end of each record.
    • false—The records will not be appended.
    Default is false.
    StationAlias.FileAlias.CRLFHexCode Specifies the delimiter to append to each record in a text file. Valid values:
    • 0A—Appends a line feed (new line) to the end of each record
    • 0D0A—Appends a line feed and a carriage return to the end of each record
    Default is 0A. This property is only used if FileType is set to text and AppendCRLF is set to true.
  4. Save and close the zengin.properties.in file.
  5. Run one of the following utilities to update the zengin.properties file:
    • /install_dir/bin/setupfiles.sh (UNIX)
    • install_dir\bin\setupfiles.cmd (Windows)
  6. Stop and restart Sterling B2B Integrator to use the updated settings.

Example Business Processes

Receive Example

This business process is called when a file is received and it saves the file to disk. Note that the Zengin TCP/IP adapter invokes the business process when a file is received, the business process does not invoke the adapter.

<process name="zengin_file_sys_write">
 <sequence name="Main Sequence">
    <operation name="File System Adapter">
      <participant name="my_file_sys"/>
      <output message="FileSystemInputMessage">
       <assign to="Action">FS_EXTRACT</assign>
       <assign to="assignedFilename">received_filename</assign>
       <assign to="extractionFolder">/my_directory</assign>
       <assign to="." from="*"></assign>
     </output>
      <input message="inmsg">
       <assign to="." from="*"></assign>
     </input>
    </operation>
 </sequence> 
</process>

Respond Example

This business process is called when the Zengin TCP/IP adapter receives and responds to a request to send a file. The business process reads a file from the disk to be sent back to the remote Zengin server. Note that the Zengin TCP/IP adapter invokes the business process when a request is received. The business process does not invoke the adapter.

<process name = "zengin_file_sys_read"> 
  <sequence name="Main Sequence">
   <operation name="File System Adapter">
      <participant name="my_file_sys"/>
     <output message="FileSystemInputMessage">
       <assign to="Action">FS_COLLECT</assign>
       <assign to="assignedFilename">respond_filename</assign>
       <assign to="collectionFolder">/my_directory</assign>
       <assign to="deleteAfterCollect">false</assign>
       <assign to="filter">respond_fixed_uncompr</assign>
       <assign to="." from="*"></assign>
     </output>
      <input message="inmsg">
       <assign to="." from="*"></assign>
     </input>
    </operation>
 </sequence> 
</process>

Send Example

This business process sends a single file to a remote Zengin server.

<process name = "zengin_sender"> 
 <sequence name="Main Sequence">
    
   <operation name="send fixed uncompr">
     <participant name="zengin_sender"/>
     <output message="output">
        <assign to="ZenginRemoteServerAlias">Ros3</assign>
       <assign to="ZenginFileAlias">send_fixed_uncompr</assign>
       <assign to="ZenginMode">send</assign>
       <assign to="ZenginHostname">123.45.67.8</assign>
       <assign to="ZenginPort">5020</assign>
       <assign to="." from="*"></assign>
     </output>
      <input message="input">
       <assign to="." from="*"></assign>
     </input>
    </operation>
   <operation name="send var uncompr">
     <participant name="zengin_sender"/>
     <output message="output">
        <assign to="ZenginRemoteServerAlias">Ros3</assign>
       <assign to="ZenginFileAlias">send_variable_uncompr</assign>
       <assign to="ZenginMode">send</assign>
       <assign to="ZenginHostname">123.45.67.8</assign>
       <assign to="ZenginPort">5020</assign>
       <assign to="." from="*"></assign>
     </output>
      <input message="input">
       <assign to="." from="*"></assign>
     </input>
    </operation>
   
  </sequence> 
</process>

Send Multiple Files Example

This business process sends several files to a remote Zengin server.

<process name = "zengin_send_mult"> 
 <sequence name="Main Sequence">
    
   <assign to="myDocs/send_fixed_uncompr" from="PrimaryDocument/@*" 
               append="true">
   </assign>
    <assign to="myDocs/send_variable_uncompr" from="PrimaryDocument/@*" 
       append="true"></assign>
   
    <operation name="call sender">
     <participant name="zengin_sender"/>
     <output message="output">
        <assign to="ZenginRemoteServerAlias">Ros3</assign>
       <assign to="ZenginDocuments">//myDocs/*</assign>
       <assign to="ZenginMode">send</assign>
       <assign to="ZenginHostname">123.45.67.8</assign>
       <assign to="ZenginPort">5020</assign>
       <assign to="." from="*"></assign>
     </output>
      <input message="input">
       <assign to="." from="*"></assign>
     </input>
    </operation>
 </sequence> 
</process>

Request Files Sample

This business process requests files from a remote Zengin server.

<process name = "zengin_requester"> 
  <sequence name="Main Sequence">
      <operation name="fixed uncompr">
      <participant name="zengin_sender"/>
      <output message="output">
       <assign to="ZenginRemoteServerAlias">Ros3</assign>
       <assign to="ZenginFileAlias">request_fixed_uncompr</assign>
       <assign to="ZenginMode">request</assign>
       <assign to="ZenginHostname">123.45.67.8</assign>
       <assign to="ZenginPort">5020</assign>
       <assign to="." from="*"></assign>
     </output>
      <input message="input">
       <assign to="." from="*"></assign>
     </input>
    </operation>
   <operation name="File System Adapter">
     <participant name="file_sys"/>
     <output message="FileSystemInputMessage">
       <assign to="Action">FS_EXTRACT</assign>
       <assign to="assignedFilename">request_fixed_uncompr</assign>
       <assign to="extractionFolder">/myDirectory</assign>
       <assign to="." from="*"></assign>
     </output>
      <input message="inmsg">
       <assign to="." from="*"></assign>
     </input>
    </operation>
   
    <operation name="variable uncompr">
     <participant name="zengin_sender"/>
     <output message="output">
        <assign to="ZenginRemoteServerAlias">Ros3</assign>
       <assign to="ZenginFileAlias">request_var_uncompr</assign>
       <assign to="ZenginMode">request</assign>
       <assign to="ZenginHostname">123.45.67.8</assign>
       <assign to="ZenginPort">5020</assign>
       <assign to="." from="*"></assign>
     </output>
      <input message="input">
       <assign to="." from="*"></assign>
     </input>
    </operation>
   <operation name="File System Adapter">
     <participant name="file_sys"/>
     <output message="FileSystemInputMessage">
       <assign to="Action">FS_EXTRACT</assign>
       <assign to="assignedFilename">request_var_uncompr</assign>
       <assign to="extractionFolder">/myDirectory</assign>
       <assign to="." from="*"></assign>
     </output>
      <input message="inmsg">
       <assign to="." from="*"></assign>
     </input>
    </operation>
   
    <operation name="fixed compr">
     <participant name="zengin_sender"/>
     <output message="output">
        <assign to="ZenginRemoteServerAlias">Ros3</assign>
       <assign to="ZenginFileAlias">request_fixed_compr</assign>
       <assign to="ZenginMode">request</assign>
       <assign to="ZenginHostname">123.45.67.8</assign>
       <assign to="ZenginPort">5020</assign>
       <assign to="." from="*"></assign>
     </output>
      <input message="input">
       <assign to="." from="*"></assign>
     </input>
    </operation>
   <operation name="File System Adapter">
         <participant name="file_sys"/>
         <output message="FileSystemInputMessage">
           <assign to="Action">FS_EXTRACT</assign>
           <assign to="assignedFilename">request_fixed_compr</assign>
           <assign to="extractionFolder">/myDirectory</assign>
           <assign to="." from="*"></assign>
         </output>
          <input message="inmsg">
           <assign to="." from="*"></assign>
         </input>
    </operation>
   
    <operation name="variable compr">
     <participant name="zengin_sender"/>
     <output message="output">
        <assign to="ZenginRemoteServerAlias">Ros3</assign>
       <assign to="ZenginFileAlias">request_var_compr</assign>
       <assign to="ZenginMode">request</assign>
       <assign to="ZenginHostname">123.45.67.8</assign>
       <assign to="ZenginPort">5020</assign>
       <assign to="." from="*"></assign>
     </output>
      <input message="input">
       <assign to="." from="*"></assign>
     </input>
    </operation>
   
    <operation name="File System Adapter">
         <participant name="file_sys"/>
         <output message="FileSystemInputMessage">
           <assign to="Action">FS_EXTRACT</assign>
           <assign to="assignedFilename">request_var_compr</assign>
           <assign to="extractionFolder">/myDirectory</assign>
           <assign to="." from="*"></assign>
         </output>
          <input message="inmsg">
           <assign to="." from="*"></assign>
         </input>
    </operation>
 </sequence> 
</process>