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 » Override UDP in a subflow

Post new topic  Reply to topic
 Override UDP in a subflow « View previous topic :: View next topic » 
Author Message
saviobarr
PostPosted: Tue Dec 22, 2015 12:32 pm    Post subject: Override UDP in a subflow Reply with quote

Centurion

Joined: 21 Oct 2014
Posts: 100
Location: Sao Paulo, Brazil

Hi masters,
I have a subflow which has few UDPs. In the main flow, I have to override the current UDP values before the message reaches the subflow. I put a Compute node on my flow right before the subflow, and tried to set these values using ESQL, but those UDP variables does not appear in the message tree.
The knowledge center shows to do it in Java using setUserDefinedProperty() method, but I wouldn't like to use a JCN nor Java classes.

Savio Barros
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Tue Dec 22, 2015 1:25 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Presumably you mean you need to set them to different values for each message that passes through, rather than to a single value that is different from the default when you deploy.

User Defined properties are accessed in ESQL through EXTERNAL variables.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
saviobarr
PostPosted: Tue Dec 22, 2015 1:51 pm    Post subject: Reply with quote

Centurion

Joined: 21 Oct 2014
Posts: 100
Location: Sao Paulo, Brazil

Presumably you mean you need to set them to different values for each message that passes through, rather than to a single value that is different from the default when you deploy.
mqjeff wrote:

User Defined properties are accessed in ESQL through EXTERNAL variables.

Hi mqjeff,
I am able to access it, but not to change it. I tried to set a new value, but I got the following error:

Value of constant "address" cannot be changed.

My ESQL piece of code:

CREATE COMPUTE MODULE MAIN_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
-- CALL CopyMessageHeaders();
-- CALL CopyEntireMessage();
SET address = 'TEST';
RETURN TRUE;
END;
END MODULE;
Back to top
View user's profile Send private message Send e-mail
saviobarr
PostPosted: Tue Dec 22, 2015 2:27 pm    Post subject: Reply with quote

Centurion

Joined: 21 Oct 2014
Posts: 100
Location: Sao Paulo, Brazil

Just got answer from Knowledge Center: "The value of a UDP cannot be modified by ESQL"

https://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/ak04980_.htm
Game over . I'm gonna try another approach. Thanks for replying
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Wed Dec 23, 2015 6:25 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Well done! And thanks for sharing the resolution!

_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
whiting
PostPosted: Wed Dec 23, 2015 9:41 am    Post subject: Environment variable Reply with quote

Acolyte

Joined: 26 Mar 2002
Posts: 64
Location: Greenville, SC

Given your description of what you want to do, you might try a variable in the environment tree.
You can set it in the parent message flow and access it in the subflow.

i.e. in the parent message flow:

Code:
       SET Environment.Variables.decisionKey = 'HIGH';

in the subflow:
      -- Or whatever logic you want to apply here
       IF Environment.Variables.decisionKey = 'HIGH' THEN
           SET OutputRoot.XMLNSC.myMessage.quantity = 1;
       ELSE
            SET OutputRoot.XMLNSC.myMessage.quantity = 10;
       END IF;
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 » Override UDP in a subflow
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.