Skip to main content
6-Contributor
October 5, 2026
Question

Auto-completing other managers' tasks when one of them completes theirs (one process per WTUser)

  • October 5, 2026
  • 1 reply
  • 45 views

Hi all,

We're on Windchill 13.0 and I'm building a Role permission review workflow. For every Product, Library and Project, each member of the Product/Library/Project Manager role has to confirm that the permissions are correct. The task has only the standard Complete Task button, no reject and no custom routing. Every manager should manually review their respective container’s role and add/remove users and groups accordingly.

Right now an Execute Expression robot loops over all containers, reads the members of the role group (Product/Library/Project Manager role), and for each WTUser starts a separate process from a shared task template. It sets assignedUser (a WTUser variable) and primaryBusinessObject, and every process from the same run gets the same batchId. It works fine. Everyone gets their own task with a link to the container's Team page.

The goal is that once any one of the managers completes their task, the tasks of all the other managers of that container are completed automatically. Right now they stay open and eventually send overdue reminders for something that's already been handled.

I'd like to keep one process per individual user, so assigning a group to one shared task isn't what I'm after. What I'm trying to find out:

  1. When one task is completed, what's the best way to resolve the sibling processes (same primaryBusinessObject and batchId) so their tasks are completed too? Querying all WfProcess objects and checking the context feels too heavy for a few hundred containers.
  2. Should I complete their WorkItems or terminate their processes, and which API is the right one? I want the pending reminders to stop and the history to look sensible, not as if the user did the work.
  3. Where would you put this logic, in an expression robot after the activity or on the Complete transition?
  4. Has anyone handled two managers clicking Complete at nearly the same moment?

Sample code or a better design would be great. Thanks!

1 reply

18-Opal
October 5, 2026

Hi ​@WAP_Engine,

I would suggest redesigning the overall process. It would be better to use a context based workflow approach, which would minimize the need for customization.
The workflow can be triggered separately for each context based on the object creation context. This will create a task for the respective Context Manager based on the PBO context. Once any one of the Context Managers completes the task, the workflow can proceed to the next node.