ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Using Filter module esql to direct messages to a node?

Post new topic  Reply to topic
 Using Filter module esql to direct messages to a node? « View previous topic :: View next topic » 
Author Message
jrsetters
PostPosted: Thu Sep 22, 2011 5:44 am    Post subject: Using Filter module esql to direct messages to a node? Reply with quote

Acolyte

Joined: 24 Aug 2011
Posts: 72
Location: Cincinnati, OH

I am using the HL7 message set in toolkit version 7.0.0.2. I need to evaluate the facility identifier in the message and use that to direct the message to a proper topic.

The identifier will come in field 4 of the MSH segment, and will always be one of three values. I was thinking of ways to do this, and thought that the best way might be to create a filter module with three custom output nodes, then use esql to evaluate the content of the message and set the output node based on the value. Is this possible?

To get the value I would do something like this:


DECLARE hl7 NAMESPACE 'urn:hl7-org:v2xml';
DECLARE OutPutNode CHAR;
DECLARE MSHFacility CHAR;


SET MSHFacility =
input.hl7:MSH.hl7:"MSH.4.SendingFacility".hl7:"MSG.1";

Then based on he value of MSHFacility I would send the Output to either node "A", "B", or "C". I am not sure how to accomplish that in the esql though. Any advice?

Thanks!
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu Sep 22, 2011 5:48 am    Post subject: Re: Using Filter module esql to direct messages to a node? Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

jrsetters wrote:
Then based on he value of MSHFacility I would send the Output to either node "A", "B", or "C". I am not sure how to accomplish that in the esql though. Any advice? Thanks!


Code:
IF <some criteria> THEN PROPAGATE TO TERMINAL 'A' DELETE NONE; ELSE IF <some alternate criteria> THEN PROPAGATE TO TERMINAL 'B' DELETE NONE; END IF;

_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Thu Sep 22, 2011 6:09 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Also read the documentation from the filter node.
Not all ESQL operations are permitted.

InputRoot is not in scope in the filter node, use Root.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
rekarm01
PostPosted: Thu Sep 22, 2011 11:00 am    Post subject: Re: Using Filter module esql to direct messages to a node? Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

lancelotlinc wrote:
Code:
IF <some criteria> THEN PROPAGATE TO TERMINAL 'A' DELETE NONE; ELSE IF <some alternate criteria> THEN PROPAGATE TO TERMINAL 'B' DELETE NONE; END IF;

The DELETE clause is only applicable to the Compute node. There are no Output trees to delete or not delete in a Filter node.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Sep 22, 2011 12:08 pm    Post subject: Re: Using Filter module esql to direct messages to a node? Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

rekarm01 wrote:
lancelotlinc wrote:
Code:
IF <some criteria> THEN PROPAGATE TO TERMINAL 'A' DELETE NONE; ELSE IF <some alternate criteria> THEN PROPAGATE TO TERMINAL 'B' DELETE NONE; END IF;

The DELETE clause is only applicable to the Compute node. There are no Output trees to delete or not delete in a Filter node.


Don't you just have the choice to return true, false or undefined in a filter node?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
rekarm01
PostPosted: Thu Sep 22, 2011 2:14 pm    Post subject: Re: Using Filter module esql to direct messages to a node? Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

rekarm01 wrote:
The DELETE clause is only applicable to the Compute node. There are no Output trees to delete or not delete in a Filter node.

... not to mention the much more relevant point that the PROPAGATE statement doesn't belong in a Filter node at all:

Quote:
You can use the PROPAGATE statement in Compute and Database nodes, but not in Filter nodes.

For simple routing, use either the Database, Route, or RouteToLabel node.

fjb_saper wrote:
Don't you just have the choice to return true, false or undefined in a filter node?

Yes: true, false, or unknown.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Using Filter module esql to direct messages to a node?
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.