Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Get Worflow Initiator email Id

Nandujee
Level 3
Level 3

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

1 Accepted Solution
smacdonald2008
Correct answer by
Level 10
Level 10

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

View solution in original post

1 Reply
smacdonald2008
Correct answer by
Level 10
Level 10

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

View solution in original post