Author |
Message
|
rvmson |
Posted: Thu Apr 30, 2015 11:46 am Post subject: Accessing Promotable Properties within a JCN |
|
|
Newbie
Joined: 06 Mar 2013 Posts: 6
|
I need to access Promotable Properties from within a JCN. But have not found a method to do so.
I know that it is possible to access User Defined Properties from within a JCN via the MbNode.getUserDefinedAttribute method.
Is there a similar method to access Promotable Properties?
IIB 9.0.0.2. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Apr 30, 2015 12:06 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
How are you defining Promotable Properties without access to WAS & the admin console therein?
Or are you trying to run the JCN inside WAS?
IIB is not WESB. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Apr 30, 2015 12:41 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
What are you trying to discover from promotable properties?
You know that promotable properties are existing, built-in properties of message flow nodes, that happen to be able to be settable from the subflow or messageflow those nodes are contained in?
You know that you can't get access to deployed values of the message flow from within the message flow, unless you make an external call to the EG hosting the message flow?
What are you trying to do? Why do you think this is a good way to do it? |
|
Back to top |
|
 |
rvmson |
Posted: Thu Apr 30, 2015 12:44 pm Post subject: |
|
|
Newbie
Joined: 06 Mar 2013 Posts: 6
|
This has nothing to do with either WAS or WESB.
Here is my use case.
I have a IIB 9 message flow that has a JCN (Java Compute node) within it.
In that JCN I need to do a SQL call to an Oracle DB.
One of the parms of the MbNode.createSQLStatement is the Data Source name.
I do not want to hard code the Data Source name as it does change based on environment and it's poor form to do so anyway.
I already have the Data Source set as a Promoted Property for use in a separate Compute Node and the desire is to use this existing promoted Data Source value instead of creating a separate UDP to be used by the JCN. |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Apr 30, 2015 10:26 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
rvmson wrote: |
I do not want to hard code the Data Source name as it does change based on environment and it's poor form to do so anyway.
|
What is wrong with hard coding the DSN? The DSN could be regarded as a pointer to the configuration. It is the configuration that resolves to different DB's for example DEV, UAT & PROD.
Think of it as a many to one relationship
Many Compute Nodes(ODBC DSN) and/or Many JCN's all using the same target DB may well exist in your environment.
One ODBC DCN Config and one JCN DSN config.
So, do you really want to make sure each one is properly configured OR do you use common names and let the configuration of the environment take care of everything?
I know which I'd prefer (KISS rules Ok!) _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
iibmate |
Posted: Thu Apr 30, 2015 10:59 pm Post subject: |
|
|
 Apprentice
Joined: 17 Mar 2015 Posts: 38 Location: Perth, WA
|
rvmson wrote: |
I already have the Data Source set as a Promoted Property for use in a separate Compute Node |
and the desire is to
rvmson wrote: |
use this existing promoted Data Source value instead of creating a separate UDP to be used by the JCN. |
Can we use promoted property of one node in another node ?? |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Apr 30, 2015 11:37 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Have you tried it?
It won't be the end of the world if it does not work you know... _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
rvmson |
Posted: Fri May 01, 2015 4:15 am Post subject: |
|
|
Newbie
Joined: 06 Mar 2013 Posts: 6
|
I feel we are starting to deviate from my actual question. It is not if I should or should not have the Data Source hard coded. But rather is there a way to hook into the promotable properties to get the value for use within a JCN. |
|
Back to top |
|
 |
Vitor |
Posted: Fri May 01, 2015 4:21 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
rvmson wrote: |
But rather is there a way to hook into the promotable properties to get the value for use within a JCN. |
Ok, a Promotable Property is a specific term within WESB. What you're discussing is a promoted node property (almost the same letters but enough to make it a different word).
You can't read the properties of any node (irrespective of if that property has been promoted to the flow level or not) within the node or any other node.
The only properties visible to the run time code are those documented in the Info Center and those User Defined Properties explicitly created. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
rvmson |
Posted: Fri May 01, 2015 5:01 am Post subject: |
|
|
Newbie
Joined: 06 Mar 2013 Posts: 6
|
Thank you Vitor for both the clarification of terminology of properties between IIB and WESB and for the explanation of the visibility of promoted properties within IIB. I didn't believe that there was a way to access the promoted properties from within a JCN. But wanted to pose the question out here in case there was something that I missed.
In my defense on the promotable vs. promoted discussion, I am not a WESB person and therefore was not aware that there is a similar terminology between WESB and IIB. And I did indicateI was using IIB from the get go. |
|
Back to top |
|
 |
Vitor |
Posted: Fri May 01, 2015 5:04 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
rvmson wrote: |
I am not a WESB person and therefore was not aware that there is a similar terminology between WESB and IIB. And I did indicateI was using IIB from the get go. |
Your question was alarmingly similar (down to the terminology) to questions from people using IIB (which you did indeed clearly indicate) who have a WESB background & have recently migrated. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|