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 IndexWebSphere Message Broker SupportMapping Node If statement

Post new topicReply to topic
Mapping Node If statement View previous topic :: View next topic
Author Message
madrox
PostPosted: Fri Dec 23, 2016 12:57 pm Post subject: Mapping Node If statement Reply with quote

Acolyte

Joined: 11 Mar 2015
Posts: 56

I am new to the mapping node in IIB 10. How do you do an IF and THEN using it.
I have an array with 2 elements in it, one of them say element 1 can have 2 possible values a and b. if the value of element 1 is 'a' then i want to map element 2 from source to element 1 in target and if value is 'b' i want to map element 2 to target 2.

I hope i'm not confusing anyone
Back to top
View user's profile Send private message
shashivarungupta
PostPosted: Wed Dec 28, 2016 6:10 pm Post subject: Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

If your elements are of not of [0..1] or [1..1] multiplicity, then you may use 'For each' kind of Mapping and use the Filter and/or Condition in its options/properties to do the conditional mapping (Filter and Condition are different from each other, Please read the manual.).

You may use IF, ELSEIF Map with the different set of conditions for Mapping the elements. Clicking/Hovering on IF mapping, you'll be given options to create ELSE/ELSEIF along with IF. Please read the manual.

Hope this helps. Thank You.

_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
madrox
PostPosted: Fri Dec 30, 2016 7:20 am Post subject: Reply with quote

Acolyte

Joined: 11 Mar 2015
Posts: 56

Reading the manual has not been very helpful, The mapping node has too many functions that it can do, i wish they had some useful samples.
I am trying to map from an element that is multiple cardinality to a target that is not. Below is kind of what i am trying to achieve

Code:
<parent>                                                           
   <source>                                 
      <data>abc</data>                   
      <url>123</url>                       
      </source>                                                           
   </source>
   <source>
      <data>def</data>
      <url>456</url>
   </source>
   <source>
      <data>ijk</data>
      <url>789</url>
   </source>
</parent>


<target>
   <value1>(if url is 123 map)</value1>
   <value2>(if url is 456 map)</value2>
   <value3> (if url is 789 map)</value3>
</target>
Back to top
View user's profile Send private message
shashivarungupta
PostPosted: Fri Dec 30, 2016 6:57 pm Post subject: Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

madrox wrote:
Reading the manual has not been very helpful, The mapping node has too many functions that it can do, i wish they had some useful samples.


If/Else/ElseIf are the very basic features with conditional check(s), that you need to understand by reading the manuals first and then try.
Read it, understand it and read it again if you don't get it before.

IBM Manual has got many of such examples at Info Center.

If still you're not comfortable with Mapper Node, optionally you may use Compute Node/ESQL for basic logic and transformation of the message.

madrox wrote:
I am trying to map from an element that is multiple cardinality to a target that is not. Below is kind of what i am trying to achieve


We can not solve the basic problems for you here but we can suggest or direct you.

Hope this helps. Thank You.

_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportMapping Node If statement
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.