Blocking a project from being completed or cancelled if it still has active tasks — validation popup on action, similar to ontology manager deletion guard

We have a Project object type with linked Task objects. When a user tries to mark a project as Completed or Cancelled, we want to check whether any of the linked tasks are still in an active state — and if so, block the action and show a popup telling the user to close or cancel those tasks first before proceeding.

The behavior we’re after is very similar to what the Ontology Manager already does natively — when you try to delete an object type that still has action types or link types depending on it, it stops you and tells you to remove those dependencies first. We want the same guard pattern, but on a business action in Workshop: don’t let the project close until all its child tasks are resolved.

Right now we can’t find a clean way to do this within a standard Action Form. Ideally the action itself would validate the linked task states before executing, surface a meaningful message to the user listing the active tasks, and prevent the status change until the condition is met.

Has anyone implemented this kind of pre-action validation against linked objects in Workshop? Whether through action rules, AIP Logic, or any other approach — any pointers on how to block an action conditionally based on the state of related objects would be really helpful.