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 » accounting for xml fields not present?

Post new topic  Reply to topic
 accounting for xml fields not present? « View previous topic :: View next topic » 
Author Message
klabran
PostPosted: Thu Jan 20, 2005 9:05 am    Post subject: accounting for xml fields not present? Reply with quote

Master

Joined: 19 Feb 2004
Posts: 259
Location: Flagstaff AZ

I have a filter node that is constructing an email using the xml data coming into it.

I am using a char to create my body of the email like....

set x = x || 'Tag Name1: ' || xmlincoming.tag1 || NewLineFeed;
set x = x || 'Tag Name2: ' || xmlincoming.tag2 || NewLineFeed;

set mail.body = x;

The xml data has many tags that may not be present and this is blowing up the node.

How can I easily adjust for this?

I thought about wrapping everything
Code:
if xmlincoming.tag2 is not null then
but I have enough tags that this is not a desirable approach.

I also thought about perhaps catching the error and spitting out '' for these missing fields in the email. Unfortunately, I'm not sure how to even do this at this point but it sounds good.

What / how would you handle this?

Kevin
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Thu Jan 20, 2005 9:12 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I'd use the COALESCE function.

Also, you should not be putting complex logic into filter nodes, and you should not be using a filter node to "construct" data. You will have poor performance.

Use a compute node to perform your logic, and a filter node to check the results.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
klabran
PostPosted: Thu Jan 20, 2005 9:17 am    Post subject: Reply with quote

Master

Joined: 19 Feb 2004
Posts: 259
Location: Flagstaff AZ

Thanks I will take a look at COALESCE. On the filter node I misspoke. The email is being created in a compute node.

Kevin
Back to top
View user's profile Send private message Visit poster's website
EddieA
PostPosted: Thu Jan 20, 2005 10:03 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
I have a filter node that is constructing an email using the xml data coming into it.

That isn't going to work. You cannot change the data, or construct new trees in a Filter.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
kirani
PostPosted: Thu Jan 20, 2005 11:41 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

I don't remember this, but can't you update/create Environment Tree in a Filter node?
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Fri Jan 21, 2005 5:43 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

kirani wrote:
I don't remember this, but can't you update/create Environment Tree in a Filter node?


I don't remember if that's true either.

But even if it was, I still wouldn't do it.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
JT
PostPosted: Fri Jan 21, 2005 8:12 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Quote:
I don't remember this, but can't you update/create Environment Tree in a Filter node?

Absolutely you can.
Back to top
View user's profile Send private message
kirani
PostPosted: Sun Jan 23, 2005 2:46 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

EddieA wrote:
You cannot change the data, or construct new trees in a Filter.

Except Environment tree.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » accounting for xml fields not present?
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.