Query Groups, Users in Custom Execution Listener

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2019 08:02 AM
Hello,
I created a new custom execution listener and wanted to query the groups where the user is member of using the services
public class CustomExecutionListener implements ExecutionListener { private static Logger logger = LoggerFactory.getLogger(CustomExecutionListener.class); public void notify(DelegateExecution execution) throws Exception { String userID = (String) execution.getVariable("initiator"); logger.error("userID = " + userID); List<Group> groups = execution.getEngineServices().getIdentityService().createGroupQuery().groupMember(userID).list(); logger.info("groups.size() = " + groups.size()); }}
when I call the execution listener from my process I always see that group.size() = 0
Labels:
- Labels:
-
Alfresco Process Services
0 REPLIES 0
