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.

Hey @Aryan02!

It’s a bit late so I hope you already found a way to block the action. If not, you can do it in Workshop.

  • You can firstly create an Object Set variable starting at your project and which traverse to your linked tasks and filter it on the state property. This object set will contain tasks in active state.
  • Then you can create a boolean variable transformation that check if you previous variable is empty or not.
  • Finally, you can add a conditional visibility on your action to mark your project as completed. If some tasks are in an active state, the button is blocked, else, the button is enabled.

I hope you find this helpful. Feel free to ask if you have any question.

Nathan :slight_smile: