Author |
Message
|
pratuluv |
Posted: Mon Apr 23, 2012 4:35 am Post subject: Passing Environment Variables from WMB to WTX |
|
|
Acolyte
Joined: 25 May 2011 Posts: 53
|
I am using WMB 7.0.0.2 and WTX 8.3. I use a WTX map node in my WMB message flow. I want to pass some Environment Variables from WMB to be accessible in WTX. Is that possible? |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Apr 23, 2012 5:00 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Unless your customer has specifically instructed you to specifically implement a given piece of code using WTX, your solution will be more maintainable and perform better if you DO NOT use WTX for the bulk of the work. |
|
Back to top |
|
 |
pratuluv |
Posted: Mon Apr 23, 2012 5:26 am Post subject: |
|
|
Acolyte
Joined: 25 May 2011 Posts: 53
|
Its part of my requirement and I have to use a WTX map node. But before I send the data to Map, I am populating some variables dynamically which is not part of the message structure/type tree that is used in WTX. Hence I am looking for some method to pass the variables and access them in the MAP.
IS that possible? |
|
Back to top |
|
 |
kash3338 |
Posted: Mon Apr 23, 2012 8:58 am Post subject: |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
|
Back to top |
|
 |
pratuluv |
Posted: Tue Apr 24, 2012 6:17 am Post subject: |
|
|
Acolyte
Joined: 25 May 2011 Posts: 53
|
Hi Kash, Thanks for your help but thats not what I am looking for. I am more looking at passing Environment variables and not the local environment tree.
To explain further,
My input card is a predefined SWIFT message type tree and output is a fixed length in WTX. One of the field in the output card needs to be set with a value that is populated in WMB based on certain conditions. I need to pass this value set in WMB to WTX map. |
|
Back to top |
|
 |
kimbert |
Posted: Tue Apr 24, 2012 6:40 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
The term 'environment variable' is obviously causing confusion. Please explain, in tedious and unnecessary detail, exactly what *you* mean when you say that. |
|
Back to top |
|
 |
pratuluv |
Posted: Tue Apr 24, 2012 6:42 am Post subject: |
|
|
Acolyte
Joined: 25 May 2011 Posts: 53
|
kimbert wrote: |
The term 'environment variable' is obviously causing confusion. Please explain, in tedious and unnecessary detail, exactly what *you* mean when you say that. |
I guess I have pretty much explained in the last reply. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Apr 24, 2012 7:00 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
pratuluv wrote: |
I guess I have pretty much explained in the last reply. |
If you had, you wouldn't still be getting questions.
Do you mean:
- an environment variable at an OS level
- an element within the Environment Tree for the flow
- an element within the LocalEnvironment
- a variable which is shared within the runtime environment
- a variable which is cached within the environment
You might also explain why the requirement to use a WTX node. Why is your client (from whom I'm assuming this comes) giving technical rather than business requirements? Especially when they're forcing you into a non-optimal development path? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
pratuluv |
Posted: Tue Apr 24, 2012 7:28 am Post subject: |
|
|
Acolyte
Joined: 25 May 2011 Posts: 53
|
Vitor wrote: |
pratuluv wrote: |
I guess I have pretty much explained in the last reply. |
If you had, you wouldn't still be getting questions.
Do you mean:
- an environment variable at an OS level
- an element within the Environment Tree for the flow
- an element within the LocalEnvironment
- a variable which is shared within the runtime environment
- a variable which is cached within the environment
You might also explain why the requirement to use a WTX node. Why is your client (from whom I'm assuming this comes) giving technical rather than business requirements? Especially when they're forcing you into a non-optimal development path? |
I am not sure if this site is more about providing solutions or something else.
As far as using WTX node is concerned, it is a part of my requirement which cannot be questioned.
In the compute node just before the WTX map node, I am setting value of a variable based on some conditions. For ex,
If (TRUE) THEN
SET Environment.Variables.ReasonCode = 'Verified';
Else
SET Environment.Variables.ReasonCode = 'Unverified';
End if;
I want to access this "Environment.Variables.ReasonCode" set in the compute node in the next WTX map node. How can I do it. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Apr 24, 2012 7:36 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
WTX Maps can only access Data that is in Cards.
The WTX nodes only submit the message body as a Card by default.
It's going to be much easier for you to stick your compute node result into the message data rather than the Environment Tree. |
|
Back to top |
|
 |
pratuluv |
Posted: Tue Apr 24, 2012 7:51 am Post subject: |
|
|
Acolyte
Joined: 25 May 2011 Posts: 53
|
mqjeff wrote: |
WTX Maps can only access Data that is in Cards.
The WTX nodes only submit the message body as a Card by default.
It's going to be much easier for you to stick your compute node result into the message data rather than the Environment Tree. |
Thanks a lot for your reply with very good clarity. Its appreciated.
The scenarios is something like this. My input message format is SWIFT MT54x and if any exception occurs in the WMB flow, I have to pass this initial SWIFT message received as input to the WTX map node and generate a SWIFT NAK(Not ACK) message. The SWIFT NAK message which would be the output card in the WTX map needs the ReasonCode for one of its fields.
This reason code is set in the compute node based on the type of exception occured in WMB flow. Is that clear?
For now, I am storing this reason code in Database table and doing a DB Lookup in WTX map but going forward looks like I cannot use DB anymore for this. Hence trying to find a way out. |
|
Back to top |
|
 |
kash3338 |
Posted: Tue Apr 24, 2012 7:52 am Post subject: |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
pratuluv wrote: |
My input card is a predefined SWIFT message type tree and output is a fixed length in WTX. One of the field in the output card needs to be set with a value that is populated in WMB based on certain conditions. I need to pass this value set in WMB to WTX map. |
This link explains all that can be done using WTX node,
http://www.ibm.com/developerworks/websphere/library/techarticles/0907_gupta/0907_gupta.html
I can see (based on your requirement explained here) your requirement is also explained here. Hope it helps. |
|
Back to top |
|
 |
pratuluv |
Posted: Tue Apr 24, 2012 8:07 am Post subject: |
|
|
Acolyte
Joined: 25 May 2011 Posts: 53
|
kash3338 wrote: |
pratuluv wrote: |
My input card is a predefined SWIFT message type tree and output is a fixed length in WTX. One of the field in the output card needs to be set with a value that is populated in WMB based on certain conditions. I need to pass this value set in WMB to WTX map. |
This link explains all that can be done using WTX node,
http://www.ibm.com/developerworks/websphere/library/techarticles/0907_gupta/0907_gupta.html
I can see (based on your requirement explained here) your requirement is also explained here. Hope it helps. |
Thanks Kash for the link, I went through all these links already but it doesn't talk about my issue  |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Apr 24, 2012 8:40 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
mqjeff |
Posted: Tue Apr 24, 2012 8:42 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
pratuluv wrote: |
Thanks Kash for the link, I went through all these links already but it doesn't talk about my issue  |
It does talk about your issue, in that it shows you how to construct more than one input card.
You continue to believe that you can get away with doing something other than making a copy of the data you need into individual cards.
As I've already said, WTX only sees data in Cards. |
|
Back to top |
|
 |
|