Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Filtering Concept for Queues and Examples

Example 1:

Using different Queue’s for different XML Files

Example 2:

By creating JMS Application Property for File Name and then by using this property we can create
different transitions for different file names in Queue by mapping them in XPath.

But this property needs to be set both on sender side and on receiver’s side of the Queue which means
this property should be set before sending the msg to queue, and then only we can use this property at
the receivers end.

So how this process works is before picking the messages by Queue, they are filtered by JMS Application
Properties and mapping them to different Parse XML Palettes with XPath and Transitions.

Example 3:

By using Message Selector Property in JMS Queue Receiver Advanced tab to filter the messages that
queue needs to pick them. Queue won’t pick the messages until this property is satisfied. But with this
property, we need to develop different Process Definition’s in Tibco for each message. How this works is
we provide a syntax in Message Selector to pick that particular message, Queue validates this condition
and if it is satisfied only it picks that message.

A string to determine whether a message should be received. The syntax of the message selector is
determined by the JMS provider, but it is usually a subset of SQL92 (where message properties are used
instead of table column names).

Example 4:

By using XPath Function in string called index-of, we can differentiate the messages that are received by
JMS Queue Receiver by validating the condition and mapping each one with Parse XML Activity with
transitions in our case.

Syntax for index-of string function:


In our case the syntax for LTLShipmentProcess Message would be:

1. tib:index-of("JMS-Queue-Receiver/ns:ActivityOutput/Body", "LTLShipmentProcessEvent")>-1
2. tib:index-of("JMS-Queue-Receiver/ns:ActivityOutput/Body", "ShipmentMovementEvent")>-1

If LTLShipmentProcessEvent string, in 1st syntax is also present in Shipment Movement message, then
we can change the syntax to

tib:index-of("JMS-Queue-Receiver/ns:ActivityOutput/Body", "LTLShipmentProcessEvent")=X

X– Depends on the string location in LTLShipmentProcessEvent message.

So depending on the text message we receive from the JMS Queue Receiver we will validate the
condition and map to Parse XML Activity.

So depending on the text message we receive from the JMS Queue Receiver we will validate the
condition and map to Parse XML Activity.

You might also like