This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- accessing IA and Java variables
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 28, 2009
11:24 AM
accessing IA and Java variables
I have a couple of questions about accessing and using variables. During a pre-install, I am executing the attached FindHostName.java plugin. This code sets the Java properties localhost.IP and localhost.name. By including an Output Debug Information action, I can see that indeed both of these values get set because they show up in the log file.
Immediately after executing the plugin, I am using a Get User Input - Advanced action. In the textbox, I am trying to use as a default value, localhost.name using $localhost.name$. This does not work. (see ia1.jpg and ia2.jpg attachments)
My question is what I am doing wrong?
In a second textbox, I was able to populate the field if I used $lax.nl.env.exact_case.HOSTNAME$ (see ia1.jpg attachment)
I would like to understand why localhost.name does not work but I need to be able to run custom code and pass the variables back to a IA user input screen.
Last question:
In the FindHostName.java code I attempted to set the IA variable CC_HOSTNAME using ip.setVariable. CC_HOSTNAME does not show up at all when the debug information action is executed.
What do I need to do in order to set CC_HOSTNAME properly?
Immediately after executing the plugin, I am using a Get User Input - Advanced action. In the textbox, I am trying to use as a default value, localhost.name using $localhost.name$. This does not work. (see ia1.jpg and ia2.jpg attachments)
My question is what I am doing wrong?
In a second textbox, I was able to populate the field if I used $lax.nl.env.exact_case.HOSTNAME$ (see ia1.jpg attachment)
I would like to understand why localhost.name does not work but I need to be able to run custom code and pass the variables back to a IA user input screen.
Last question:
In the FindHostName.java code I attempted to set the IA variable CC_HOSTNAME using ip.setVariable. CC_HOSTNAME does not show up at all when the debug information action is executed.
What do I need to do in order to set CC_HOSTNAME properly?
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jun 01, 2009
09:16 PM
1. to get a java property value by an IA variable, you may want to use "$prop.$", i.e. "$prop.localhost.IP$" in your case.
2. as for your second question, you may try "$CC_HOSTNAME$" instead,
i.e. ip.setVariable("$CC_HOSTNAME$",InetAddress.getLocalHost().getHostName() );
Regards,
2. as for your second question, you may try "$CC_HOSTNAME$" instead,
i.e. ip.setVariable("$CC_HOSTNAME$",InetAddress.getLocalHost().getHostName() );
Regards,
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)