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 » Dynamically Mapping To Dynamic Message Assembly at RunTime ?

Post new topic  Reply to topic
 Dynamically Mapping To Dynamic Message Assembly at RunTime ? « View previous topic :: View next topic » 
Author Message
shashivarungupta
PostPosted: Mon Sep 29, 2014 12:10 pm    Post subject: Dynamically Mapping To Dynamic Message Assembly at RunTime ? Reply with quote

Grand Master

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

Hi,

It's related with Mapping Node and the Message Assembly. (MB v8.0.0.4)

In the scenario, where input message assembly needs to get dynamically mapped with dynamic output message assembly.

I understand the fact that for mapping node, input and output message assembly or the schema should be known to broker, to get them mapped as per the requirement (Move/Custom ESQL etc..etc) for transformation.

But if the output message is getting generated dynamically (with dynamic fields/elements in it), to which output message assembly needs to be mapped, How this can be achieved?
Infocenter gives the following link, about 'Dynamically selecting the Message Map' but not the 'Message Assembly'.

Any suggestion ?

_________________
*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
kimbert
PostPosted: Mon Sep 29, 2014 12:13 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Please give a specific example of what you mean. The word 'dynamically' means different things to different people.
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
Back to top
View user's profile Send private message
martinb
PostPosted: Mon Sep 29, 2014 12:46 pm    Post subject: Reply with quote

Master

Joined: 09 Nov 2006
Posts: 210
Location: UK

More clarity on what you want to achieve is needed, but one point worth mentioning is that within a Graphical Data Map you can use the "Add output" action button to add multiple target/output Assemblies - each of which might specify a different message from one or more message models.

Now you can use If/Else or other conditional transforms to test content of input message and build one or other Output Message Assembly.

The output of the If/Else would be wired to the head of the required Message Assembly so that the Message Map emits one or other output assembly
Back to top
View user's profile Send private message
shashivarungupta
PostPosted: Mon Sep 29, 2014 1:12 pm    Post subject: Reply with quote

Grand Master

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

kimbert wrote:
Please give a specific example of what you mean. The word 'dynamically' means different things to different people.


Okey !! ( 'Dynamic' means, the 'Dynamic' Output Message Assembly where output fields are not known or vary almost every time. Output message can have one or more fields in it. )

For example, My Input Message Assembly is known and having certain fields in it, always !
as:
Code:

<person>
   <name></name>
   <age></age>
   <address>
      <line1></line1>
      <suburb></suburb>
      <city></city>
   </address>
   <phone></phone>
</person>


And the output message assembly need to be mapped with output message (that's getting formulated by some external source, may be) , that can have any field in it (three sets of examples are mentioned , but these fields can vary in terms of names and cardinality which is not certain.).
1.
Code:
<personidentity>
   <name></name>
   <age></age>
   <address>
      <line1></line1>
      <suburb></suburb>
      <city></city>
   </address>
   <phone></phone>
   <gender></gender>
   <married></married>
   <saperated></saperated>
   <single></single>
   <children>
      <name></name>
   </children>
   <children>
      <name></name>
   </children>
   <children>
      <name></name>
   </children>   
</personidentity>


2.
Code:

<citizen>
   <firstname></firstname>
   <middlename></middlename>
   <lastname></lastname>
   <spouse>
      <name></name>
      <age></age>
      <alive></alive>
   </spouse>
   <car>
      <insured></insured>
      <numberplate></numberplate>
      <caridentity></caridentity>
      <make></make>
      <model></model>
      <owner></owner>
   </car>
</citizen>


3.
Code:
<citizen>
   <firstname></firstname>
   <middlename></middlename>
   <lastname></lastname>
   <insurance>
      <name></name>
      <age></age>
      <alive></alive>
      <insurancenumber></insurancenumber>
      <active></active>
      <period></period>
      <nominee></nominee>
   </insurance>
   <nominee>
      <name></name>
      <age></age>
      <alive></alive>
   </nominee>
   <nominee>
      <name></name>
      <age></age>
      <alive></alive>
   </nominee>
</citizen>


If I know that ONLY 3 or 5 or 10 or some feasible number cases are here in which Output can be formed, I would create those Output Message Assembly Schemas and have set them up as per 'Dynamic Mapping Selection' based on some criteria Or field value.[/code]
_________________
*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
mqjeff
PostPosted: Mon Sep 29, 2014 1:16 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

So how are you supposed to know which structure to create on the output, if it's not dependent on some condition in the input?

If it is dependent on some condition in the input, then you can create models that match the range of inputs you expect to receive.

You likely already have XML schemas that define all of the possible output structures as choices or xs:any fields or etc. You can then use the cast and etc. functions of the map to determine which part of the output schema gets built from.
Back to top
View user's profile Send private message
shashivarungupta
PostPosted: Mon Sep 29, 2014 1:29 pm    Post subject: Reply with quote

Grand Master

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

mqjeff wrote:
So how are you supposed to know which structure to create on the output, if it's not dependent on some condition in the input?


Yup, you're correct. And that's the concern, for which I've been looking for the wayout., this question has got an answer in it as well, which I do feel.
thanks !!

_________________
*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
mqjeff
PostPosted: Mon Sep 29, 2014 1:38 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

There are cases where the structures you have to create are dependent on the context of the input - for example destined for customer A rather than customer B. And you need to go to a database or etc. to look up which customer some piece of the input belongs to, and then the format that customer A wants, or the format that customer B wants.

But it's still a matter of "your flow doesn't have to make any random guesses".

Although I suppose at some point, there will be a version of IIB that ships with a WatsonDecisionSupport node....
Back to top
View user's profile Send private message
shashivarungupta
PostPosted: Mon Sep 29, 2014 2:01 pm    Post subject: Reply with quote

Grand Master

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

mqjeff wrote:
There are cases where the structures you have to create are dependent on the context of the input - for example destined for customer A rather than customer B. And you need to go to a database or etc. to look up which customer some piece of the input belongs to, and then the format that customer A wants, or the format that customer B wants.

But it's still a matter of "your flow doesn't have to make any random guesses".


_________________
*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 topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Dynamically Mapping To Dynamic Message Assembly at RunTime ?
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.