I tried to get current logged in user using session and authorizable. But none of them giving the current user.
Is there any other way to get the current user details ?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @mani_kandan1
Please check
Workflow Initiator : https://developer.adobe.com/experience-manager/reference-materials/6-5/javadoc/com/adobe/granite/wor...
Workflow Current Assignee : https://developer.adobe.com/experience-manager/reference-materials/6-5/javadoc/com/adobe/granite/wor...
Are you referring to initiator of the workflow user if that’s the case then please refer to https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/is-it-possible-to-get-the-...
current user can be found from session object
session.getUserID();
I am not sure what’s the use case you have to get the current use in workflow process step and I believe in workflow you work with workflow session and not the current user session.
Hi,
I need to check initiator and approver are same user or not.
session.getUserID()
will return workflow-service user id not the user who logged in.
Hi @mani_kandan1 ,
To get the initiator https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/workflows-get-initiator-in...
or history of participant https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-to-find-participants-a...
In case if it return service user we may try to retrieve the data from end result like You may check this similar thread https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/need-help-with-aem-approva...
Thanks
A workflow process step is a piece of code, which runs in the background. For that it is not bound to a HTTP request and also not to a user in the first place.
That means that in a process step the concept of a "current user" simply does not exist.
Hi @mani_kandan1
Please check
Workflow Initiator : https://developer.adobe.com/experience-manager/reference-materials/6-5/javadoc/com/adobe/granite/wor...
Workflow Current Assignee : https://developer.adobe.com/experience-manager/reference-materials/6-5/javadoc/com/adobe/granite/wor...
@mani_kandan1 Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Like
Replies