Spring boot security looses context after TimerCatchingEvent

Hi,

I have integrated Camunda with Spring boot.
My workflow contains one TimerCatchingEvent, which is used because I want to call a service task taskB after 5 mins of service task taskA. So I have used TimerCatchingEvent.

But in taskB, I’m getting current logged in user from Spring Security Context. I’m getting null in taskB.

Help is apprecited.
I’m stuck at this and process is failing.

Thanks
Ashish

Hi Ashish,

You need to give a lot more context. Upload your model and the specific error message

This is the workflow in which I’m facing issues. There is not exception in the code.
But when I try to get current user context, SecurityUtils.getCurrentUser(), which should give me the current logged in user, I’m getting null in the service task immediately after the timer catching event (highlighted one).
But same thing works fine before the timer event.

Can you upload the BPMN file itself, as well as the specific error being thrown

AssignmentFlow.bpmn (33.1 KB)
Attaching the bpmn file.
As i mentioned, I’m not getting any exception,
I’m just not getting the current logged in user. I’m not using Camunda’s identityService to do the authentication, instead I’m using the Spring security for authentication.