We don't want builds to start if there isn't enough disk space. So, I modified all my resources to include a condition:
node.getAttribute( "F_SPACE" ) >= "100";
I also have a resource "DONT_USE" which includes this condition:
node.getAttribute( "F_SPACE" ) < "100";
(We also have a step that runs after each build to keep the F_SPACE attribute up-to-date).
However, we then thought of other reasons to declare a node not useable (f/x, it has been reporting erroneous build failures), and I realize I will have to update all of the resources. A better solution would be to just add the new conditions to "DONT_USE" and thern have my other resources include a condition something like:
node.hasResource( "DONT_USE" ) == false;
(Although, of course, the documentation says that won't work).
There are other cases where I can see this being useful. Is there a way to accomplish what I want - have a resource depend on whether the node has another resource?