-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
What problem are you trying to solve? Please describe.
At the moment, it is not possible to use requirements for a fact that is not used as a variable in the ability's command. This is due to the way the add_test_variants()
function of the base_planning_svc
is implemented.
I've had several cases where I wanted to enforce requirements on certain facts, that are not directly used in the ability's command. E.g., execute a system shutdown after finding a certain running process could be implemented by collecting names of running processes as facts and using these facts to enforce requirements for the shutdown ability. However, due to the add_test_variants()
implementations, requirements are not enforced if there are no variables in the command.
Current workaround for me is to echo the used facts: echo #{process.name} && shutdown
(pseudo-code)
The ideal solution: What should the feature should do?
The feature should include a rework of the add_test_variants()
function of the base_planning_svc
.
Based on the rework, it should be possible to enforce requirements on facts that are not used as variable in the command.
What category of feature is this?
- UI/UX
- API
- Other
Additional context
- Willing to submit a pull request to implement this feature? (I already tried to solve this but could not put as much time into this as I wanted since this is quite a big change that requires changes of how Caldera handles facts, requirements, and variables in commands...)
I look forward to any questions or feedback regarding this.
Best regards,
Louis