QueueReceiver

Use the QueueReceiver activity to listen on a data queue on an IBM i system.

General

The General tab contains the following fields:

Field Process Property? Module Property? Description
Name No No The name to be displayed as the label for the activity in a process.
IBM i Connection No Yes Click to select an IBM i shared resource.

If no matching IBM i shared resources are found, click Create Shared Resource to create one. See Creating an IBM i Shared Resource for more details.

Data Queue Yes Yes The name of the data queue that you want to monitor. The format of the data queue name is library_name/data_queue_name.

Type the date queue name or click to open the Fetch Object dialog to select a data queue.

Note:
  • If the data queue you specified in this field does not exist, after clicking Verify Queue, a Request data queue data_queue_name does not exist. Create a new request data queue? message is displayed in a pop-up window. Click OK to create a data queue on IBM i system, click Cancel to cancel creating a data queue.
  • The plug-in supports the wildcard queries, you can also use the *LIBL/data_queue_name format to specify a data queue.
Key Used No No Select this check box to specify a key filter when monitoring a keyed data queue.
Note: If this check box is selected, and the data queue you specified in the Data Queue field is not a keyed data queue, the verification fails. If this check box is not checked and the queue is keyed, then all messages and their keys will be returned. This is the same as using a key of all binary zeros.
Key Value Yes Yes Enter a value for the key.

If the length of the entered value is the same as the length of the key defined in the data queue, the QueueReceiver activity filters the messages using the value.

If you enter nothing in this field, the QueueReceiver activity will not filter messages.
Note: This field is enabled when the Key Used check box is selected.
Is Shared No No Select this check box to retrieve a message which contains shared message when monitoring.
Important: Use this feature with caution. When the activity receives a message that does not match the provided shared message, it is written back to the queue, and the receiver will then process the message at the head of the queue. If the queue contains messages that do not match the shared message, it will read and write the non-matching messages indefinitely which consumes network and processor resources on both machines.
Shared Message Yes Yes Enter the value of the shared message to retrieve the message containing this value from the data queue.
Note:
  • This field is enabled when the Is Shared check box is selected.
  • The first field in the message schema defined for this activity must be a string field named "sharedMessage."
Polling Interval Yes Yes The time interval (in seconds) that the activity retrieves message from a data queue. All the messages on the queue will be processed within the first polling interval in which they are encountered. Once a read timeout has occurred, the monitor will exit the read loop for the duration of the polling interval.
Receiver Timeout Yes Yes Receiver timeout is the number of seconds for which the receiver activity will block on an individual read. It must be smaller than the polling interval.
Reconnection Interval Yes Yes This is the amount of time in seconds the QueueReceiver will wait after it fails to create a connection before retrying to connect.

After the configuration, click Verify Queue to test whether the specified configuration fields result in a valid connection to an IBM i system.

Description

A short description of the QueueReceiver activity.

Advanced

In the Advanced tab, you can customize the message schema to monitor the message from a data queue.

Click Initialize Schema to initialize a message schema. If the queue specified on the General tab is keyed, and the configuration has passed queue verification, a key field will automatically be inserted into the schema. If a shared message value has been specified on the General tab, and the configuration has passed queue verification, a sharedMessage field will automatically be inserted into the schema. To create a message schema, see Creating a Message Schema.

Click Copy to copy the message schema to another activity.

Click Paste to overwrite the current schema with a schema copied from another activity.

Column Name Description
Input Source Select either a dedicated schema or binary output for the activity. If you select dedicated schema, you can construct the format of the message in the wizard below. If you select binary output, the output schema presents fields for the key and raw bytes to be mapped. This is useful when parsing data via the Data Conversion Plug-in. The schema construction wizard is disabled when you select binary output.
Schema The schema that you want to define.
Note:
  • If the Is Shared check box is selected in the General tab, a sharedMessage item is displayed in this column. The IBM i type of the shared message can only be Character.
  • If the data queue is a keyed data queue, and the schema verification is passed in the General tab, a key item is displayed in this column.
Description A short description of the parameter.
IBM i Type The data type of the parameter that is defined on an IBM i system.
Plugin Type The data type used in this plug-in corresponding to the data type on an IBM i system.
Sequence

Enter an integer for the corresponding item or schemaNode.

The entered value indicates the maximum occurrences that the attribute appears in the Output tab.

Directionality This field can be one of three values: "inout", "in", or "out." These values control whether the field will fall on the input, output, or both schema tabs for mapping purposes. It is only applicable for program and service program activities and should be defaulted to "inout" for all others.
Sequence Key This field contains an XPath expression that specifies the order in which the process will run. Process instances with sequencing keys that have the same value are executed sequentially in the order in which the process instances were created.
Custom Job Id This field contains an XPath expression that specifies a custom jobID for the process instance. This ID is displayed in the TIBCOAdministrator View Service dialog, and it is also available in the $_processContext process variable.

Output

The following is the output for the QueueReceiver activity.

Output Item Data Type Description
Success Boolean A value of true indicates the operation succeeded.

A value of false indicates the operation failed.

Results Complex If the operation is successful, all the message data is filled in under the Results node. Otherwise, nothing is filled in under the Results node.

Fault

The Fault tab lists exceptions that are thrown by the QueueReceiver activity:

Fault Thrown When...
IBMiPluginException The plug-in fails to get a status response due to a plug-in error.
ActivityTimedOutException The plug-in fails to get a status response due to a timeout error.
IBMiParameterConvertException The plug-in fails to convert the schema parameters.
IBMiRemoteException The plug-in fails to communicate with an IBM i system.