Scheduler Microflow didnt have $currentsession and $currentuser , When I try to access that was empty.

0
Hello Team ,    I have Scheduler microflow that calls every 5 minutes, In that microflow I need to access currentsession details. But every time i am getting an empty object , Can anyone help me to understand what's happening and how to solve this issue.   We need to retrieve the CSRF token association From the currentsession , Please refer below image .    Thanks in Advance Sunkara Pavan Kalyan
asked
3 answers
2

Hi Sunkara,

 

 

The scheduled events are triggered by the system. So they do not have a current user of current session context as the system is not a user or session. They are all executed in the background, and you cannot get any user interaction with that by default.

answered
2

Scheduled events are run as the system user so won't have a session. 

 

What are you trying to achieve? We may be able to suggest an alternative approach.

answered
1

The Community Commons module includes functionality to let you run a microflow as another user. This will provide the currentUser and currentSession objects you need

answered