Nuxeo Server

How to Follow a Transition If User Is Member of a Group

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.


2 months ago Loubna Benzaama Fix Showcase Content add-on doc
4 years ago Solen Guitter 8
4 years ago Solen Guitter 6
4 years ago Solen Guitter 7
4 years ago Manon Lumeau 5
4 years ago Manon Lumeau 4
5 years ago Solen Guitter 3
5 years ago Frédéric Vadon 2
5 years ago Frédéric Vadon 1
History: Created by Frédéric Vadon

We'd love to hear your thoughts!

All fields required