Affects Version/s: None
Fix Version/s: None
Currently dynamic inputs can be implemented in body file control in two ways:
- Classes guarding different inputs containing explicit known paths in body file control. For example:
This works fine, except that it complicates testing as you can not checkout policy to an arbitrary location and run the policy.
- Via a variable defined in a common bundle. For example:
This is quite flexible as it allows for the construction of inputs based on external data, or various lists merged together under different conditions. It works well, except it necessitates a lot of boiler plate policy. At least 5 additional lines each time I want to include something via a relative path.
It would be nice if I could reference variables containing path information for the current policy run directly from body file control for the common simple case. For example:
Currently the above produces an error because $(this.promise_dirname) is not available in body file control.
The variables that I think would be most useful for this are:
- Full path to the policy entry directory
- Full path to the current policy file (basically the same as $(this.policy_filename) so that you could load things like $(this.policy_filename).sub like we do in the test framework.
- Full path to the current policy file directory (basically the same as $(this.policy_dirname)