Server

HOWTO: Follow a Transition If User Is Member of a Group

Updated: March 18, 2024

In workflows, you may want to have several paths on the workflow depending on the group of the user who launched to workflow.

The solution is to add the following test in the conditions of the transitions of a node

Fn.getPrincipal(workflowInitiator).isMemberOf("managers")

This expression will be true if the workflowInitiator is a member of the managers group. Replace the group by the one you need and "workflowInitiator" by any other user you would need. If you need to filter on the current user, you can use CurrentUser.getActingUser() as stated in the page Variables Available in the Automation Context.