July 22, 2020 at 2:05 pm #28091barry.parkinsonParticipant
We’re developing a custom node in Java for use in an authentication tree
The node calls Google Analytics on a url – at the moment the url is hard-coded
Is there any way to configure AM so our Java code can get the URL (and other values) from configuration?
The URL will differ for various deploymentsJuly 22, 2020 at 4:19 pm #28092Jatinder SinghParticipant
You could configure the URL as part of your
Nodeconfiguration within the
Configinterface. For example:
@Attribute(order = 1) String googleAnalyticsURL();
Once configured it can be retrieved and used in the
processmethod. Reading from a system environment variable is also an option but for this scenario and in IMHO node configuration is a better choice.
Hope this helps!July 22, 2020 at 7:55 pm #28094barry.parkinsonParticipant
Do you mean adding it as an attribute on each node in a tree?
We don’t really want to do this – it would mean updating every tree when we deploy from dev > test > prod
Is there a recommended way to configure this kind of thing inside AM ?July 23, 2020 at 6:32 pm #28098Jatinder SinghParticipant
If the variable is environment dependent, one suggestion is make it a
System Environment Variable. It is exported/or created as part of your AM deployment script. The variable can be maintained within your AM source-code and is
Gitversion controlled. You can retrieve the variable in your
Hope this helps!
You must be logged in to reply to this topic.