Unlike components, values can't have an Id. This type allows values to be registered so they can be referenced via the given Id elsewhere in the configuration.
Components are registered when the configuration is parsed but the given value will only be registered during the configuration phase, such as when a job runs in Oddjob.
id | The id to register the value with. |
value | The value to register. |
Example 1 | Register a value. |
Configured By | ATTRIBUTE |
Access | READ_WRITE |
Required | Yes. |
The id to register the value with.
Configured By | ELEMENT |
Access | READ_WRITE |
Required | No but pointless if missing. |
The value to register.
Register a value.
<oddjob> <job> <sequential> <jobs> <variables id="vars"> <test> <identify id="our-value"> <value> <value value="Apples"/> </value> </identify> </test> </variables> <echo>Checking ${vars.test} is ${our-value}</echo> <check value="${vars.test}" eq="${our-value}"/> </jobs> </sequential> </job> </oddjob>