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 » IIB Version: 9.0.0.2 - Nested Map Transform Not Working

Post new topic  Reply to topic
 IIB Version: 9.0.0.2 - Nested Map Transform Not Working « View previous topic :: View next topic » 
Author Message
bdaoust
PostPosted: Tue Jul 28, 2015 7:22 am    Post subject: IIB Version: 9.0.0.2 - Nested Map Transform Not Working Reply with quote

Centurion

Joined: 23 Sep 2010
Posts: 128

I have a very basic message flow that takes an XML and transforms it to a CSV file (DFDL).

In my XML I have some elements 1 for 1 like CustomerID and then others that repeat - for instance Customer Orders.

Code:
Customer
 Customer ID >>>> MAP to CustomerID to CSV
       Customer Order
               CustomerOrderID
               CustomerOrderType
               CustomerOrderDate


So a customer can have many orders.

What I'm trying to do - is step through the customer orders (could be 1 or could be a 100 orders). As it goes through, if a condition is met, then place order date in a specific column of the CSV file because the CSV file must maintain column integrity.

So for the CSV the columns are CustomerID, BookOrder, VideoOrder, GameOrder

Once the condition is met, an order date is placed in that column.

Ex;

Cust123,12/23/2014,NULL,05/16/2012

BTW - this is not my actual scenario - just trying to simplify for my question.

I have the message assemblies setup in the map. Then in the map, under Customer Order (where it can repeat) I drag CustomerOrderType to BookOrder. Then I drag CustomerOrderDate to the newly created transform in the map. Then I change the transform for IF and set a condition in properties CustomerOrderType = 'Book'

Now this has created a nested map, which I click into and have CustomerOrderDate have a MOVE transform to Book in the CSV DFDL definition.

Please add input if what I'm trying to do above is not best for a mapping node. I've used ESQL in the past, but was trying to see if this can be accomplished in a mapping node.

So, I ran a test and the Book column in the resulting CSV is blank. So I verified the array index of CustomerOrders and did confirm it's 1. I looked at the XML and the CutomerOrderType is 'Book' So to confirm that the IF condition is being hit (since nest map won't occur if it isn't), I changed the nested transform to be an Assign and assigned it 'TEST'. Reran the test and I did get TEST in the resulting CSV file.

So the question is, if I've determined my nest transform (Assign) under the IF is working but not working when I change the Nested Transform To Move and then link CustomerOderDate To Book in the nest map, why am I getting NULL. CustomerOrderDate does have a value BTW.

Unfortunately, I don't have access to start a user trace as I'm not allow to log on to the server which the broker sits on it issue commands to start and read user traces. (trying convince the uppers to give me that access)

Thanks in advance
-Brian
Code:
Back to top
View user's profile Send private message
bdaoust
PostPosted: Tue Jul 28, 2015 7:38 am    Post subject: Reply with quote

Centurion

Joined: 23 Sep 2010
Posts: 128

Hmmm. I might have it working everyone. I had to drag the Head of the repeating XML section, which created a For/Each. In the For/Each I added and if and then in that nested map I did my move transform.

Need to play around a little bit more, but I'll post back.

-Brian
Back to top
View user's profile Send private message
bdaoust
PostPosted: Tue Jul 28, 2015 11:32 am    Post subject: Reply with quote

Centurion

Joined: 23 Sep 2010
Posts: 128

So the above method seems to be working for me. I say seems because I need to get the business area's signoff.

Hope this post helps others.

-Brian
Back to top
View user's profile Send private message
martinb
PostPosted: Wed Jul 29, 2015 12:36 am    Post subject: Reply with quote

Master

Joined: 09 Nov 2006
Posts: 210
Location: UK

Yep, the approach for Graphical Data Mapping is start by drag dropping connections at the highest level folders and then move into the nested mapping and work on the next level folder, or leaf elements.

In this case because of the repeatability of the folder's it was key to getting the "For each" transform as the outer operation, so that when you come to wire the leaf elements and set conditions etc you now have a single instance - rather than the "set" of element from the repeating folder.
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 » IIB Version: 9.0.0.2 - Nested Map Transform Not Working
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.