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 IndexWebSphere Message Broker SupportOverride configurable property dynamicaly

Post new topicReply to topic Goto page 1, 2  Next
Override configurable property dynamicaly View previous topic :: View next topic
Author Message
gappodi
PostPosted: Thu Nov 29, 2018 8:58 am Post subject: Override configurable property dynamicaly Reply with quote

Acolyte

Joined: 05 Sep 2014
Posts: 66

I am writing a message flow in which I need to use an HTTPRequest node in order to send requests to multiple webservice hosts. The input message to my flow will have a flag based on which I will choose which host to redirect to.

Is there a way I can dynamically override the configurable properties like URLSpecifier and KeyAlias while the flow executes ? I understand I can override these properties using 'mqsiapplybaroverride' command. But that would leave me setting it to one fixed value.

I guess I might have to write additional code but I am not sure what that would be. Can someone please provide inputs here ?

Thanks and Regards,
Maneesh Sharma
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Nov 29, 2018 9:34 am Post subject: Re: Override configurable property dynamicaly Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 25365
Location: Ohio, USA

gappodi wrote:
I guess I might have to write additional code but I am not sure what that would be. Can someone please provide inputs here ?


You need to set the values you want the node to use in the correct part of the LocalEnvironment tree (and make sure the LocalEnvironment is passed to the HTTPRequest node). See here.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
gappodi
PostPosted: Thu Nov 29, 2018 9:41 am Post subject: Reply with quote

Acolyte

Joined: 05 Sep 2014
Posts: 66

Thanks Vitor. So I can do this via a Compute node right prior to HTTPRequest node and have the logic inside it which host is to be redirected. Is that correct ?
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Nov 29, 2018 9:42 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 25365
Location: Ohio, USA

gappodi wrote:
Thanks Vitor. So I can do this via a Compute node right prior to HTTPRequest node and have the logic inside it which host is to be redirected. Is that correct ?



_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
gappodi
PostPosted: Thu Nov 29, 2018 9:43 am Post subject: Reply with quote

Acolyte

Joined: 05 Sep 2014
Posts: 66

Thank you so much for your guidance
Back to top
View user's profile Send private message
gappodi
PostPosted: Fri Nov 30, 2018 5:51 am Post subject: Reply with quote

Acolyte

Joined: 05 Sep 2014
Posts: 66

Hi Vitor,

I tried something like following in an ESQL Compute node..

SET OutputLocalEnvironment.Destination.HTTP.RequestURL=https://ibm.com/abc

But it still takes the URL mentioned in the HTTPRequest node under 'WebService URL' property in the message flow.

Am I missing anything in my ESQL Compute node ?
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Nov 30, 2018 6:55 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 25365
Location: Ohio, USA

gappodi wrote:
Am I missing anything in my ESQL Compute node ?


Vitor wrote:
(and make sure the LocalEnvironment is passed to the HTTPRequest node)


It's not passed by default - you have to change the Compute node properties.


_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
gappodi
PostPosted: Fri Nov 30, 2018 7:27 am Post subject: Reply with quote

Acolyte

Joined: 05 Sep 2014
Posts: 66

Can you please tell which is that property in the compute node I should set to get it passed to the HTTPRequest node ?

Regards,
Maneesh Sharma
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Nov 30, 2018 7:48 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 25365
Location: Ohio, USA

gappodi wrote:
Can you please tell which is that property in the compute node I should set to get it passed to the HTTPRequest node ?


Seriously?



If you look at the properties, you can discount "Data Source", "Connect before flow starts", "ESQL Module", "Treat warnings as errors" and "Throw exceptions on database error" as clearly not connected with this.

"Transaction mode" might be a possibility, but the 2 options of "Automatic" and "Commit" in the drop down don't seem likely.

So you're left with "Compute Mode". The drop down for which has a number of options including a number which include "Local Environment"

But you didn't bother to look, did you?


_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
gappodi
PostPosted: Fri Nov 30, 2018 7:55 am Post subject: Reply with quote

Acolyte

Joined: 05 Sep 2014
Posts: 66

Ohh.. I am sorry I really missed it. Did not realize that Compute mode was a dropdown with what you told earlier. Thanks for pointing it out !

Regards,
Maneesh Sharma
Back to top
View user's profile Send private message
gappodi
PostPosted: Mon Dec 03, 2018 11:25 pm Post subject: Reply with quote

Acolyte

Joined: 05 Sep 2014
Posts: 66

Thanks you Vitor. It worked now ! I am just wondering if I can do it by using a JCN as well ? Can you please help here ?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Dec 04, 2018 5:17 am Post subject: Reply with quote

Grand Poobah

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

gappodi wrote:
Thanks you Vitor. It worked now ! I am just wondering if I can do it by using a JCN as well ? Can you please help here ?

I'd be surprised if you could not.
Just make sure your propagate statement transfers the right things.
Check how you create the outAssembly...

And remember to copy the LocalEnvironment tree from the in Assembly to the outAssembly...

Have fun
_________________
MQ & Broker admin


Last edited by fjb_saper on Tue Dec 04, 2018 5:35 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
gappodi
PostPosted: Tue Dec 04, 2018 5:30 am Post subject: Reply with quote

Acolyte

Joined: 05 Sep 2014
Posts: 66

Thanks Vitor. I obtained the local environment in my code and with the help of an XPath, I am now able to achieve the same via JCN.

Regards,
Maneesh Sharma
Back to top
View user's profile Send private message
gappodi
PostPosted: Tue Dec 04, 2018 9:42 am Post subject: Reply with quote

Acolyte

Joined: 05 Sep 2014
Posts: 66

Thanks fjb_saper !!
Back to top
View user's profile Send private message
gappodi
PostPosted: Tue Dec 04, 2018 11:58 pm Post subject: Reply with quote

Acolyte

Joined: 05 Sep 2014
Posts: 66

Does these overridden values remain in the environment tree until message flow completes ? For e.g. if I have a subsequent second HTTPRequest node in my message flow and I do not want these values to be carried forward to this node, Should I clear my local environment tree before the second HTTPRequest node is invoked in the message flow ? Please provide your inputs on it.

Thanks and Regards,
Maneesh Sharma
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum IndexWebSphere Message Broker SupportOverride configurable property dynamicaly
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.