404 CSRF Token Validation Error : - CSRFToken_Session from SAPODATAConnector was Empty when we are trying with Scheduler Microflow .

0
Hello Team , I want to retrieve the CSRF token from the SAPODataconnector by he current session , Which means I have a scheduler microflow at that time I am retrieving the CSRFtoken from the assosiation of currentsession. Please refer below image  So , for the Scheduler microflow we are using the JavaAction :- "ExecuteMicroflowAsUser" to get the currentsession . But by using current session of association $currentSession/CSRFToken_Session it was empty .  The same Microflow when we trigger with the button from account it is fetching all the assosiation values i.e  $currentSession/CSRFToken_Session, but when we are fetching via scheduler the session assosiation was empty.    Please suggest me the possible way to solve this issue , If any more information required please let me know in the comments .   Thanks in Advance  Sunkara Pavan Kalyan  
asked
1 answers
0

Hello Sunkara,

 

For what you've described it's pointing the problem to the currentSession token, because since you're executing that by the java action simulating an user action, your current session is still empty because it's the system executing it so even if you execute the java action with success, in your microflow you still won't get the currentSession filled.

Defining a workaround could be difficult but please note what kind of permissions and connections do you have, and if for SAP you can connect to it from the system, probably could be better for you to split the logic from user actions and system actions and adapt what you need for the system one.

 

Hope it helps,

 

Rui Cunha

answered