TCP/IP Processing UDR Types
You can view the UDR types used by the TCP/IP processing agent in the UDR Internal Format Browser. To access it, follow these steps:
Click Build in the menu.
Select New Configuration.
Choose APL Code.
In the editing area, right-click and select UDR Assistance. This will open the UDR Internal Format Browser.
RemoteHostConfig
The RemoteHostConfig UDR contains the connection details for the remote host. This UDR is included in all the other UDR types.
The following fields are included in the RemoteHostConfig:
Field | Description |
|---|---|
| This field contains the hostname or IP address of the remote host. |
| This field contains the port to the remote host. |
| This field contains the required number of connections towards the remote host and port. The default is 1 connection per destination. |
ConnectionRequestUDR
This is required only if the connection has to be established/disconnected at runtime and is not mentioned in the agent table.
When the agent receives this UDR, it tries to establish a new connection or close a connection to a remote host. The agent then returns the ConnectionStateUDR with information about the current state of the connection.
The following fields are included in the ConnectionRequestUDR:
Field | Description |
|---|---|
| This field determines whether the request is for opening or closing a connection. For a new connection, this field is set to |
| This is the RemoteHostConfig UDR that contains the connection details. |
ConnectionStateUDR
The agent returns the ConnectionStateUDR when a ConnectionRequestUDR has been sent, and if a connection goes down.
The following fields are included in the ConnectionReqeustUDR:
Field | Description |
|---|---|
| If the connection is valid (see the |
| This is the |
| This field indicates if the connection details in the |
RequestUDR
When the agent receives a RequestUDR, it tries to send the included bytearray to the remote host.
The following fields are included in the RequestUDR:
Field | Description |
|---|---|
| This field contains the actual data to be sent. |
| This is the If this field is not updated, it will broadcast |
ResponseUDR
If the TCP/IP processing agent is configured to handle responses, it returns ResponseUDRs to the workflow.
The following fields are included in the ResponseUDR:
Field | Description |
|---|---|
| This field contains the response. |
| This is the |
Note!
The TCP/IP processing agent uses an internal buffer to limit the maximum size of each response. If a response exceeds 1024 bytes, it may be split into multiple UDRs. When this occurs, the agent automatically increases the buffer size incrementally for subsequent responses.
ErrorUDR
The agent returns the ErrorUDR in case a RequestUDR and ConnectionRequestUDR fail.
The following fields are included in the ErrorUDR:
Field | Description |
|---|---|
| This is original data from the |
| This field contains the reason for the failure. |
| This field contains the stack trace from the failure. Note! This field should only be read if necessary, since it requires a large amount of CPU. |
| This is the |
Note!
The ErrorUDR type is a subtype of the ResponseUDR type. This means that if, for example, instanceOf(input,ErrorUDR) evaluates to true, then instanceOf(input,ResponseUDR) also evaluates to true. See the example below.
Example - Handling ErrorUDRs in APL
consume {
//ErrorUDR is a subtype of ResponseUDR
if (instanceOf(input, ResponseUDR) && (!instanceOf(input,ErrorUDR)) ) {
//ResponseUDR
//If you omit the second condition above, and if the input type is ErrorUDR,
//the if-statement below will not be evaluated.
} else if (instanceOf(input, ErrorUDR) ) {
//ErrorUDR
}
}