I’m trying to set up a session using App Flow, but I can’t get it to work. I’m not even sure if what I’m attempting is possible with this approach.
On my page, I already have a Session Manager component added, but I can’t figure out how to properly connect or trigger the session logic through App Flow.
Has anyone tried something similar or can confirm if this is doable with App Flow? Any guidance or example setup would be greatly appreciated.
If i understand what you are doing correctly, the issue leads from a confusion between server sessions and browser sessions. They share a name but that's about it.
a browser session, which the session manager deals with are stored locally in your browser at the App Connect end.
Server sessions such as those in app flows are Server sessions which store there details on the server.
As i said, they sahre the name seeeion but thats where the relationship ends.
You will need to pass the browser session value to server connect and then set the session value at server level if you want to manage sessions it in an app flow.
I really must make a video on this as it is a common mistake, I fell for it some years ago!
The reason you see a difference is because the Session Storage Manager and the Create Session step in App Flows work a bit differently.
The Session Storage Manager prefixes sessions with dmxState-. That’s on purpose, so Wappler can easily recognize them, avoid conflicts with other scripts, and also keep the data on your page in sync. When you update a session through this component, the page knows about the change and your UI can update automatically.
The Create Session step in a Flow doesn’t add this prefix. It simply writes directly to sessionStorage. That’s fine for working inside flows, but the Session Manager component won’t know about these updates, so it won’t trigger updates in your page.
In short:
Use App Flow sessions if you only need them inside flows.
Use the Session Storage Manager if you want to bind the values on the page and have them update reactively.