I would like to have an NPE linked to my current session, NPE's live in memory, nanoflows run in memory, but current session live in the server, what is the memory/client version of this? or am I miss understanding concepts?
You are right about that current session lives on the backend server. But I thought about couple of workarounds:
From your Nanoflow Just call a microflow, that returns the current session object. But if this activity is ocurring very often, then it’s not the best solution.
If your app has mandatory login in (users can only interact with it after login) then you can do the following.
Customize the logging workflow to return the currentSession object and from there on, keep it in memory on the frontEnd.
This is restrictive, since the currentSession object will not get updated and it requires mandatory login.
Make an Abstract Markup Entity which you can use as an Interface, named ‘Content’. It will have no properties.
All the entities that are usually returned by the backend will be generalizations of ‘Content’
New Entity called ‘Response’
- Property 1 : Content entity
- Property 2: Session entity
Make all the workflows return the new Response entity and in it always add their usual returned entity (which is now marked as generalizaiton of Response entity) + the CurrentSession object