Get Worflow Initiator email Id | Community
Skip to main content
Nandujee
Level 3
October 16, 2015
Solved

Get Worflow Initiator email Id

  • October 16, 2015
  • 1 reply
  • 648 views

Hi there,

I have create workflow in which approver can reject the request. When approver reject the request, the mail as to trigger to initiator.

Using below code I can achieve it - Working

 manager = userManagerFactory.createUserManager(session);
        if (manager.hasAuthorizable(groupname)) {
            Authorizable id = manager.get(groupname);
            log.info("***** name ******" + id.getName());
            if (id.isUser()) {
                user = (User) id;
                userProfile = user.getProfile();
                if (userProfile.getPrimaryMail() != null&& userProfile.getPrimaryMail().length() != 0) {
                    initiatorMail = userProfile.getPrimaryMail();
                    log.info("*** User primary mail id : ***"+ initiatorMail);
                }
            }

But UserManage, Authorizable ,Profile classes are shown as deprecated. 

I am using AEM6.0. Can any one suggest me how to achieve this in AEM6.0 without deprecated class.

In other way what is the alternate class to get the user email in workflow. 

Thanks

Nanda

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

Use the org.apache.jackrabbit.api.security.user Java package. This is the UserManager API to use. 

1 reply

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015

Use the org.apache.jackrabbit.api.security.user Java package. This is the UserManager API to use.