| Author | Message | 
		
		  | gs | 
			  
				|  Posted: Tue Oct 01, 2013 7:19 am    Post subject: LocalEnvironment Variables in Mapping node |   |  | 
		
		  |  Master
 
 
 Joined: 31 May 2007Posts: 254
 Location: Sweden
 
 | 
			  
				| I'm mapping a field from the input message to the LocalEnvironment Variables using the mapping node. This since I need the value after a SOAP request. In the output local environment I cast /LocalEnvironment/Variables/any to the input field called Name that I need to keep.
 Then I "move" the input element to the name element.
 
 Going through the debugger it all looks fine until I try to access the value from a Compute node.
 
 After the following code line, myVariable is empty:
 
 
   
	| Code: |  
	| DECLARE myVariable CHARACTER InputLocalEnvironment.Variables.Name; |  
 After this following code line, a new Name element is created under Variables:
 
 
   
	| Code: |  
	| SET OutputLocalEnvironment.Variables.Name = 'FOO'; |  
 I'd expect the second code line to modify the existing element.
 It seems I'm accessing the Name variable in the wrong way in my code, do I need to do it another way?
 
 Thanks!
 
 WMB 8.0.0.1
 Toolkit 8.0.0.201
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | kimbert | 
			  
				|  Posted: Tue Oct 01, 2013 12:11 pm    Post subject: |   |  | 
		
		  |  Jedi Council
 
 
 Joined: 29 Jul 2003Posts: 5543
 Location: Southampton
 
 | 
			  
				| I have two things to say about this. 1. Trace node(s)
 2. User trace
 _________________
 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 |  | 
		
		  |  | 
		
		  | gs | 
			  
				|  Posted: Tue Oct 01, 2013 12:14 pm    Post subject: |   |  | 
		
		  |  Master
 
 
 Joined: 31 May 2007Posts: 254
 Location: Sweden
 
 | 
			  
				| Thanks, I've tried the trace node already but it only records the message or parts of it (not LocalEnv). I'll try again with the User Trace. |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Vitor | 
			  
				|  Posted: Tue Oct 01, 2013 12:48 pm    Post subject: |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 11 Nov 2005Posts: 26093
 Location: Texas, USA
 
 | 
			  
				| 
   
	| gs wrote: |  
	| I've tried the trace node already but it only records the message or parts of it (not LocalEnv). |  
 Really? Even if you specify ${LocalEnvironment.Variables}?
 _________________
 Honesty is the best policy.
 Insanity is the best defence.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | kimbert | 
			  
				|  Posted: Tue Oct 01, 2013 3:47 pm    Post subject: |   |  | 
		
		  |  Jedi Council
 
 
 Joined: 29 Jul 2003Posts: 5543
 Location: Southampton
 
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | gs | 
			  
				|  Posted: Tue Oct 01, 2013 9:44 pm    Post subject: |   |  | 
		
		  |  Master
 
 
 Joined: 31 May 2007Posts: 254
 Location: Sweden
 
 | 
			  
				| 
 What leads you to believe that I haven't read the infocenter section on the Trace node?
 Integration Bus v9 infocenter (that you linked) explicitly mentions $LocalEnvironment while infocenter 8 only mentions the message and its parts. Great that the v9 documentation has been updated to be clearer on this.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | gs | 
			  
				|  Posted: Tue Oct 01, 2013 11:51 pm    Post subject: |   |  | 
		
		  |  Master
 
 
 Joined: 31 May 2007Posts: 254
 Location: Sweden
 
 | 
			  
				| Thanks for the tip on tracing the LocalEnvironment, every day you learn something new. It turned out that the Name element belonged to a namespace due to me casting it from the input message. I created a small schema to include a non-namespace simple string element and casted to that instead.
 Now it works just fine, thanks!
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | kimbert | 
			  
				|  Posted: Wed Oct 02, 2013 12:13 am    Post subject: |   |  | 
		
		  |  Jedi Council
 
 
 Joined: 29 Jul 2003Posts: 5543
 Location: Southampton
 
 | 
			  
				| 
  Fair comment - I should have checked the v8 info center. Apologies for that. 
	| Quote: |  
	| What leads you to believe that I haven't read the infocenter section on the Trace node? Integration Bus v9 infocenter (that you linked) explicitly mentions $LocalEnvironment while infocenter 8 only mentions the message and its parts.
 |  _________________
 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 |  | 
		
		  |  | 
		
		  | kimbert | 
			  
				|  Posted: Wed Oct 02, 2013 12:13 am    Post subject: |   |  | 
		
		  |  Jedi Council
 
 
 Joined: 29 Jul 2003Posts: 5543
 Location: Southampton
 
 | 
			  
				| 
  Fair comment - I should have checked the v8 info center. Apologies for that. 
	| Quote: |  
	| What leads you to believe that I haven't read the infocenter section on the Trace node? Integration Bus v9 infocenter (that you linked) explicitly mentions $LocalEnvironment while infocenter 8 only mentions the message and its parts.
 |  _________________
 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 |  | 
		
		  |  | 
		
		  | rekarm01 | 
			  
				|  Posted: Wed Oct 02, 2013 1:56 am    Post subject: |   |  | 
		
		  | Grand Master
 
 
 Joined: 25 Jun 2008Posts: 1415
 
 
 | 
			  
				| 
   
	| gs wrote: |  
	| ... while infocenter 8 only mentions the message and its parts. |  v8 also has other examples, such as here and here.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | lancelotlinc | 
			  
				|  Posted: Wed Oct 02, 2013 3:04 am    Post subject: |   |  | 
		
		  |  Jedi Knight
 
 
 Joined: 22 Mar 2010Posts: 4941
 Location: Bloomington, IL USA
 
 | 
			  
				| 
   
	| gs wrote: |  
	| What leads you to believe that I haven't read the infocenter section on the Trace node? |  
 Because your statements indicate you lack knowledge. Trace node functionality as currently implemented (AFAIK) has not changed since V6.1 with regard to what pattern you can use.
 
 kimbert was correct and on-target when he asked you about reading the InfoCentre.
 _________________
 http://leanpub.com/IIB_Tips_and_Tricks
 Save $20: Coupon Code: MQSERIES_READER
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  |  |