<parameters>
<parameter name="APPLICATION" value="DEMO"/>
<parameter name="FORM" value="IMPORT_ACT1"/>
<parameter name="PARTICIPANT" value="KIKAKU"/>
<parameter name="POV" key="#FY" value="FY%YEAR%"/>
<parameter name="POV" key="#PERIOD" value="%PERIOD%"/>
</parameters>
Embedding Environment Variable Values
This manual is in pilot operation.
|
What Is Embedding Environment Variable Values?
Embedding environment variable values means specifying an environment variable name instead of an actual parameter value within the parameter value fields of a request XML file, which serves as an input file for the Requester. When an environment variable name is embedded, the Requester replaces it with the actual value of the environment variable at runtime.
How to Embed Environment Variable Values
Environment variables can only be embedded in the "value" attribute string of a "parameter" tag within a request XML file. For example, environment variable names can be embedded by enclosing them with two "%" symbols, as shown below:
In this example, the environment variable "YEAR" is embedded in the POV
parameter whose key is #FY
. Likewise, the environment variable "PERIOD"
is embedded in the POV
parameter whose key is #PERIOD
. For the former, since the POV
parameter value is "FY%YEAR%", the fixed string "FY" is prefixed to the variable name. If the value of the environment variable YEAR at runtime is 2017, then the resulting POV
parameter value will be "FY2017". You can freely add fixed strings before or after the variable name in this way.
How to Run the Requester with Embedded Environment Variables
To run the Requester using a request XML file with embedded environment variables, set the environment variable values in advance using the SET command in the command prompt. In the example above, you would need to set the YEAR and PERIOD environment variables as follows:
SET YEAR=2017
SET PERIOD=M3
java -Xms256m -Xmx1024m -jar fusion_place-requester-n.n..jar … < request.xml > response.xml
The same applies when creating a batch file. Be sure to set the environment variables using the SET command before executing the Requester within the batch file.