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 » WMB Global Routines and Environment tree

Post new topic  Reply to topic
 WMB Global Routines and Environment tree « View previous topic :: View next topic » 
Author Message
AviD
PostPosted: Fri May 29, 2009 11:21 am    Post subject: WMB Global Routines and Environment tree Reply with quote

Acolyte

Joined: 06 Apr 2004
Posts: 62

WMB Toolkit 6.1.0.3
Build: 6.1.0.3-IFix003-20090305_1223

WMB Broker 6.0.0.3
Note, we are in the midst of upgrading brokers to 6.1.0.3

My question is how we can define and utilize a common set of ESQL PROCEDURES/FUNCTIONS that read/update the Environment tree?

We are attempting to use Java like Getters and Setters for abstracting and isolating variable/values used throughout a given message flow by storing them in the Environment tree, but running into BIP2432E errors as seen below.

Quote:

BIP2432E: (someSchema.SetVariable, 3.6) : The correlation name 'Environment.Variables.SomeVariable' is not valid. Those in scope are: someValue.

The first element of a field reference must be a valid correlation name, from those in scope. This message may sometimes be due to an incorrectly formed or spelled expression which is not intended to be a field reference being parsed as if it were a field reference because the parser does not recognize it.

Correct the syntax of your ESQL expression in node 'someSchema.SetVariable', around line and column '3.6', then redeploy the message flow.



Example:

I have a Common.esql file with a global

PROCEDURE SetVariable(IN someValue CHAR)
BEGIN
SET Environment.Variables.SomeVariable = someValue;
END;


I have a MessageFlow.esql file with a COMPUTE node as follows that calls the common PROCEDURE

PATH someSchema;

CREATE COMPUTE MODULE SomeComputeNode
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyEntireMessage();

CALL SetVariable('Hello World');

RETURN TRUE;
END;


CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
END;
END MODULE;



*************************************************************

Although the Toolkit can recognize the PROCEDURE call, when deploying to the Broker, we get the error noted above.

Anyone have any suggestions on how to correct this issue or otherwise allow for global routines that can read and write to the Environment tree?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri May 29, 2009 12:50 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

The environment tree, just like the message tree are not in scope for your global procedures.
If you want to use them, best pass them to the procedure / function as a reference.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
AviD
PostPosted: Mon Jun 01, 2009 9:26 am    Post subject: Reply with quote

Acolyte

Joined: 06 Apr 2004
Posts: 62

fjb_saper,

Thanks for the feedback. The reference passing worked as desired.
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 » WMB Global Routines and Environment tree
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.