Author |
Message
|
SRIkanth1234 |
Posted: Wed Jan 02, 2013 12:15 pm Post subject: Issue on the mapping node |
|
|
Novice
Joined: 31 Aug 2011 Posts: 16
|
Happy New Year folks..
Here is my input xml,
<Data>
<Member>
<Rel>Subscriber</Rel>
<EffDate>01/01/2013</EffDate>
<PolicyKey>1234</PolicyKey>
<Details></Details>
</Member>
<Member>
<Rel>Spouse</Rel>
<EffDate>01/01/2013</EffDate>
<PolicyKey>1234</PolicyKey>
<Details></Details>
</Member>
</Data>
and my output should look like
<Data>
<PolicyList>
<Subscriber EffDate="01/01/2013">
<Member Rel="Sub" EffDate="01/01/2013/">
<Member Rel="Spouse" EffDate="01/01/2013/">
</Subscriber>
</PolicyList>
</Data>
This transformation needs to be implemented over mapping node on V8.
The input contains many subscribers and their spouse and children information coming as members. The output should contain all the subscriber information and their spouse and children information under its associated subscriber based on the POLICYKEY. This requires looping of input request several times to get the relevant information and write to the output. Please advice on the logic on mapping node where i could compare the policy key of Subscriber to its associated members and write to the output. Thanks for the help in advance.
Last edited by SRIkanth1234 on Wed Jan 02, 2013 12:31 pm; edited 2 times in total |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Jan 02, 2013 12:19 pm Post subject: Re: Issue on the mapping node |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
SRIkanth1234 wrote: |
This transformation needs to be implemented over mapping node. |
Who made this decision? What if this node is not the best node to use? Have you considered a Compute node? _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
SRIkanth1234 |
Posted: Wed Jan 02, 2013 12:23 pm Post subject: |
|
|
Novice
Joined: 31 Aug 2011 Posts: 16
|
IBM advised the client to mostly go with the mapping node as there are lots of transformations on the project and it is easier to incorporation changes over the schema. I have esql and xslt code in place for this requirement.
Last edited by SRIkanth1234 on Wed Jan 02, 2013 12:24 pm; edited 1 time in total |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jan 02, 2013 12:24 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
SRIkanth1234 wrote: |
IBM advised to client to mostly go with the mapping node |
"Mostly" is not "always". _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
SRIkanth1234 |
Posted: Wed Jan 02, 2013 12:28 pm Post subject: |
|
|
Novice
Joined: 31 Aug 2011 Posts: 16
|
that true but the client recommends to use mapping node as the request message is quite large and reduce the scope of manual errors in the code unless there are limitations over the mapping to implement the requirement. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jan 02, 2013 12:38 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
SRIkanth1234 wrote: |
the client recommends to use mapping node |
You should be recommending to the client.
SRIkanth1234 wrote: |
as the request message is quite large |
Irrelevent
SRIkanth1234 wrote: |
unless there are limitations over the mapping to implement the requirement. |
What, like not being able to loop round the input message to get the relevant information, comparing keys? I think I'm quoting you directly? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Jan 02, 2013 12:42 pm Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
And based on your understanding from the WMB developer's class, what is your opinion regarding which node to use in this instance?
If you recall, the mapping node is useful when the structures contain like data tags and XML types. ie. xsd:string to xsd:string.
When custom data types are used, ( ie. <Member Rel="Spouse" EffDate="01/01/2013/"> ) mapping node is sometimes too cumbersome to get the correct output.
You said: "IBM advised the client". Many people work for IBM. Who specifically verbalized this advice (whats his/her title?). This advice is not good advice. WMB has 98 nodes. To choose only one node ("go with the mapping node") over the other 97 nodes is not good advice. Seems like a salesman's pitch instead of a developer's point-of-view. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
SRIkanth1234 |
Posted: Wed Jan 02, 2013 1:08 pm Post subject: |
|
|
Novice
Joined: 31 Aug 2011 Posts: 16
|
I totally agree with you guys, if i completely own this project i would go with the stylesheets considering this is not a high volume project.
we had long discussions on this and i already have the esql and stylesheet code in place for this requirement. WMB is a new product to the client and i'm a new resource to the project. IBM labs (not sure who and what their titles are) suggested to the client team to make best use of mapping node considering the drawbacks using the compute node (like writing long code and prone to manual errors and as we are anticipating lots of changes in the schemas down the line where the developer takes lot time to analyse the changes, etc)
The client i'm working with have major developments down the line and we would like to explore the mapping node to see how best it could be used and on what ocassions on our projects. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Jan 02, 2013 1:16 pm Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Mapping node is best utilized when two similar XML structures that contain strictly standardized datatypes can be transformed simply by connecting the like datatypes with a line.
Mapping node is the least best choice when stylized xml datatypes are used, as in your case. ESQL type clause works very efficiently here.
How many years of WMB experience do you have? When did you take the WMB developer's class? Where did you take this class? Who taught it (IBM or third party?) _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
SRIkanth1234 |
Posted: Wed Jan 02, 2013 1:16 pm Post subject: What, like not being able to loop round the input message to |
|
|
Novice
Joined: 31 Aug 2011 Posts: 16
|
yes, i tried in the mapping node but was not able to find an option to loop the message and compare the keys |
|
Back to top |
|
 |
SRIkanth1234 |
Posted: Wed Jan 02, 2013 1:30 pm Post subject: |
|
|
Novice
Joined: 31 Aug 2011 Posts: 16
|
well !! i'm working myself over the books and i'm still learning [/img][/code][/list] |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Jan 02, 2013 1:45 pm Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
In my current job, at a life insurance company, a dozen WMB developers have created 1,284 transformations. Of those 1,284 transformations only one uses the mapping node. 1,283 transformations use some type of compute node.
Most incoming XML structures require complex transformation to the outgoing XML. The majority of these transformations use SOAP. Dates are especially picky at our third-party downstream service providers. They typically want the data formatted exactly a specific way, which is not the way it came in as. A mapping node is not going to format the date value the way you want it.
Go to the training class. Reading books is not going to get you where you need to go. WMB is not a self-help career choice. You need guidance, coaching and mentoring. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
SRIkanth1234 |
Posted: Wed Jan 02, 2013 2:04 pm Post subject: |
|
|
Novice
Joined: 31 Aug 2011 Posts: 16
|
Totally agree with you. I'm now talking to IBM Hursley's lab on the implementation issues of these requirements over the mapping node. Let me see what they say as they advised for this solution. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Jan 03, 2013 2:07 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
There seems to be some confusion about the v8 mapping node and its capabilities. Anybody reading this thread would ( wrongly ) conclude that
- the v8 mapping node can only transform very simple structures
- the v8 mapping node cannot handle complex logic
There will be scenarios where ESQL or Java or XSLT is the best option, but complexity is not the main issue. Not in v8, anyway. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Jan 03, 2013 2:25 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
SRIkanth1234 said:
Quote: |
i tried in the mapping node but was not able to find an option to loop the message and compare the keys |
You need a ForEach transform to loop over all of the subscribers. Within this ForEach loop, you need a join transform that selects all the relatives of each subscriber. I think you know that already because...
Quote: |
I'm now talking to IBM Hursley's lab on the implementation issues of these requirements over the mapping node. |
Yes - the SME in Hursley has just told me that. Please continue to discuss with Hursley until you have a working solution, and then please append to this thread a description of the answer. |
|
Back to top |
|
 |
|