Hi,
I have a workflow in which one group starts the workflow and in next step it get assigned to another group. I want email id of initiator and I am using the below code for the same. But it is returning me the email id of the current workflow assigned group. May be because I am using session and session is of current group. Is it possible to get the session of the initiator??
Session session = workflowSession.adaptTo(Session.class);
resourceResolver = getResourceResolver(session);
UserManager userManager = resourceResolver.adaptTo(UserManager.class);
if (userManager != null) {
Authorizable authorizable = userManager.getAuthorizable(workItem.getWorkflow().getInitiator());
Value[] values = authorizable.getProperty("./profile/email");