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?
Additional context
I look forward to any questions or feedback regarding this.
Best regards,
Louis
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 thebase_planning_svcis 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 thebase_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?
Additional context
I look forward to any questions or feedback regarding this.
Best regards,
Louis