I am not able to fetch the user name, like who is running the workflow for a particular page. The issue is
1. Since workflow uses admin session, session.getUserId() always returns "admin".
2. Payload's cq:lastModifiedBy property is also not changing because the payload is locked during the workflow, and doesn't let non-admins write to its jcr:content
Is there any other way to know which user is running the workflow ??
Solved! Go to Solution.
Views
Replies
Total Likes
Hi lokesh waran
You can look at "Workflow Archive tab" where you can get the information about
Link:- https://helpx.adobe.com/experience-manager/using/Workflows.html
Option 2 "Participant chooser service"
"workItem.getWorkflow().getInitiator();"
Link:- https://docs.adobe.com/docs/en/cq/5-6/workflows/wf-ref/workflow_steps.html#Dynamic Participant Step
I hope this would help you.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
Hi lokesh waran
You can look at "Workflow Archive tab" where you can get the information about
Link:- https://helpx.adobe.com/experience-manager/using/Workflows.html
Option 2 "Participant chooser service"
"workItem.getWorkflow().getInitiator();"
Link:- https://docs.adobe.com/docs/en/cq/5-6/workflows/wf-ref/workflow_steps.html#Dynamic Participant Step
I hope this would help you.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
Hi,
You can get the workflow initiator user ID from workitem in custom workflow process.
workItem.getWorkflow().getInitiator();
Regards,
Vikram.
Views
Replies
Total Likes
When i try to impersonate wfSession to initiator this throws exception : javax.security.auth.login.FailedLoginException: Impersonation not allowed.
I necessarily need initiator's session to trigger some task in my workflow, earlier i used to get this using :
initiatorSession= adminSession.impersonate(new SimpleCredentials(initiatorUser,"".toCharArray()));
where adminSession is now deprecated and we use system users now, and so i cannot impersonate system user to initiator user, any suggestions?
Views
Replies
Total Likes
Hi Jt Jayati,
Did you ever find a solution to your problem. I have the very same issue in my code as we've recently upgraded our code and now our workflow is throwing that same exception.
Thanks,
krs
Views
Replies
Total Likes