Can HVR Agent Plugin Use Environment Variable in Path Parameter
Question
Can I define an environment variable in the /Path parameter for the HVR agent plugin?
Environment
HVR
Answer
HVR agent plugins cannot use an environment variable in their /Path parameter. HVR does not support substitution of environment variables inside parameter values. For example, action AgentPlugin /Command=”$QHOME/myagent.pl” or AgentPlugin /Path=”$QHOME” is not supported.
Workaround
Configuration actions feature in HVR can be used to address this specific situation. The following example describes the process of defining configuration actions.
For example, you have a channel that requires an agent myagent.pl to be called on an integrate location. Therefore, the channel definition should contain the action: AgentPlugin /Command=”myagent.pl”. However, the agent script myagent.pl is stored in separate directories on the test machine and the production machine, so adding the absolute path to it in the channel definition would break the golden rule of "never mix channel definition with channel configuration“. For this reason, a second action should be defined: AgentPlugin /Path=”/usr/test/qhome”, which specifies the absolute directory on the test machine.
The second action should be defined as a configuration action. Select the option Configuration Action available in the AgentPlugin dialog. As a result, this action will not be exported when you choose “Export Catalogs…” of the channel definition. Instead, you will have to define a new action once the channel is imported into the production hub database (e.g. AgentPlugin /Path=”/usr/prod/qhome”).