I'm trying to get user email addresses in an Activiti Groovy Script Task using the user's Activiti ID number. I'm trying to do this:
User user = identityService.createUserQuery().userId(execution.getVariable('initiator')).singleResult();
execution.setVariable('initiator_human', user.getEmail());
But user is always null. I believe this is because the IDs that Activiti uses, which are numbers, do not match the ID that is expected in this method.
Any ideas on how to fix this?
You can use UserInfoBean. Please refer User Info Bean (userInfoBean) | Alfresco Documentation for more details.
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.