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 » Filter node - V6

Post new topic  Reply to topic
 Filter node - V6 « View previous topic :: View next topic » 
Author Message
Fuzzy_mq
PostPosted: Wed Oct 17, 2007 7:29 am    Post subject: Filter node - V6 Reply with quote

Apprentice

Joined: 27 May 2004
Posts: 31
Location: US

Hi,

I am using Filter node on V6. Below is my sample ESQL. Using this I am able to send messages with John or Jack to true and the others to false. What my requirement is:

IF 'JOHN' OR 'JACK'
THEN
TRUE;
ELSE IF 'RON'
THEN
FALSE;
ELSE
UNKNOWN;
END IF;

Is this possible using filter node, if not what is the best way to do this?

********Sample ESQL******
CREATE FILTER MODULE "Name_Filter"
CREATE FUNCTION main() RETURNS BOOLEAN BEGIN
RETURN
Root.XML.MessageData.ControlData.Name = 'JOHN'
OR Root.XML.MessageData.ControlData.Name = 'JACK'
;
END;
END MODULE;

Thanks,
Suchit
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Oct 17, 2007 7:45 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Code:
IF Root.XMLNS.MessageData.ControlData.Name = 'JOHN' OR Root.XMLNS.MessageData.ControlData.Name = 'JACK' THEN
    return true;
ELSEIF Root.XMLNS.MessageData.ControlData.NAME = 'RON' THEN
    return false;
ELSE
    return UNKNOWN;
END IF;

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Oct 17, 2007 7:47 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Is UNKNOWN a valid boolean? I thought you set NULL (if you can set NULL!) to get it to flow from the UNKNOWN terminal.

Things you learn.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Bill.Matthews
PostPosted: Wed Oct 17, 2007 7:52 am    Post subject: Reply with quote

Master

Joined: 23 Sep 2003
Posts: 232
Location: IBM (Retired)

a Return UNKNOWN is valid in the filter node
_________________
Bill Matthews
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Oct 17, 2007 8:04 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Bill.Matthews wrote:
a Return UNKNOWN is valid in the filter node


I repeat, the things you learn.

(casually editing a load of flows for increased clarity)

This board is just so good.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Fuzzy_mq
PostPosted: Wed Oct 17, 2007 8:20 am    Post subject: Thanks Reply with quote

Apprentice

Joined: 27 May 2004
Posts: 31
Location: US

Thanks folks. Sample that Jeff provide works great. And yes UNKNOWN is valid in filter node.

--Suchit
Back to top
View user's profile Send private message
mgk
PostPosted: Wed Oct 17, 2007 11:15 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

FYI,

UNKNOWN is valid in any ESQL, not just Filter Nodes, as the BOOLEAN datatype in ESQL has 3 states: TRUE, FALSE and UNKNOWN. This maps to the SQL BOOLEAN datatype.


Cheers,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
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 » Filter node - V6
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.