Hai All,
How do I get the current user/logged in user in services through Execution Listener in community edition 7.4.0?
Is there any example/link where I can refer?
Thanks & Regards
Harshal Temkar
Hai All,
How do I get the current user/logged in user in services through Execution Listener in community edition 7.4.0?
Is there any example/link where I can refer?
Thanks & Regards
Harshal Temkar
Hi Harshal,
you can try the below sample code
public class TestExecutionListener implements ExecutionListener {
@Override
public void notify(DelegateExecution execution) throws Exception {
// get current user
execution.getProcessEngineServices()
.getIdentityService()
.getCurrentAuthentication()
.getUserId();
}
}
Hope this helps.
Cheers,
Deivarayan
Hello Deivarayan,
Thanks for your reply.
Regards
Harshal Temkar