Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Refer to the Encrypt Decrypt Configuration section in the Common Configurations page for details.

Connection Timeout

To avoid an input/output operation getting hung for an indefinite time waiting for a request to return due to reasons like network fluctuations of the mounted directory, it is recommended to configure Connection Timeout in the runtime arguments. This is done by adding a property "-DCONNECTION_TIMEOUT" with the value (in milliseconds) as per requirement in Runtime Arguments in the Properties pane.

To configure Connection Timeout, 

...

In the Properties pane, click the Runtime Arguments tab and append the following values in the JVM_PARAMS text area:

Code Block
titleAppend to the JVM_PARAMS values
languageactionscript3
-DCONNECTION_TIMEOUT=3000

...

Info

After configuring Connection Timeout as above, the maximum time that the component waits for execution of each file will be 3000 milliseconds (3 seconds). If a CONNECTION_ERROR is thrown while the request is expecting to read N number of files, then the execution of all the remaining files for that request will be discarded. Once the CONNECTION_ERROR has occurred, the next request from the input port is processed in sequential order.

Note

If an error occurs while configuring -DCONNECTION_TIMEOUT in runtime arguments, then the microservice takes the default value 180000 milliseconds (3 minutes). For example, if -DCONNECTION_TIMEOUT is set to an empty value or if it throws NumberFormatException due to a typing error like "_DCONNECTION_TIMEOUT=30)0", then this default value is taken.

Input and Output

Input

When FileReader is not in scheduling mode, messages can be sent onto the input port of the component specifying the file to be read and the location of the file. The schema of the input XML message is shown in Figure 10.


Figure 1312: Schema of the input message

  • FileName is the name of the file which is to be read.
  • Directory is the location of the file.

...

The output schema depends on the configuration of property Output XSD. Schema provided for this property is directly set as schema on output port. For more information, please refer to Output XSD in Interaction Configurations section.

Tip

An input/output operation may get hung for an indefinite time waiting for a request to return due to various reasons like network fluctuations of the mounted directory. To prevent this indefinite waiting time, it is recommended to configure Connection Timeout in the runtime arguments. Refer to the Configuring Connection Timeout section in the Common Configurations section.

Testing the Interaction Configurations

Interaction configurations can be tested from the CPS by clicking the Test button. Below figures show the sample input and the corresponding output respectively.


Figure 1413: Sample input


Figure 1514: Output produced for sample input shown in Figure 10

...

Reading simple text files and displaying the contents.
Configure the FileReader as described in Configuration and Testing section and use feeder and display component to send sample input and check the response respectively.


Figure 16: 15 Demonstrating scenario 1 with sample input and output

...

In a revenue control packet scenario transaction files are read and then transformed.


Figure 1716: Revenue Control Packet Scenario

...

Adaptavist ThemeBuilder EngineAtlassian Confluence