I have 2 questions
I need to get all Sessions IDs to send msg to them using the message handler, there are any way to do that?
if i try to get The current SessionId to pass the message directly with this code:
String SessionId = InternalSession.SESSION.get().getSession().getSessionId().toString();
I got this error:
I think I had misunderstood using
InternalSession, should I import its package and use it directly or declare it in specific Scope
Thanks in advanced
And you are trying to do this in a model (more specific the gateway delegate)?
Or just trying to get it through a (system) function so you can use it in an external lib?
I made a (system) function for that once like this.
You'll also need to register these functions in the gateway and designer
You can probably get all the sessionInfo's from here
My fault that I didn't set Gatewaycontext,
Thank you again
January 21, 2023, 9:42pm
Whay is the proper way to set the gatewayContext?
January 21, 2023, 10:21pm
You capture it in your module's setup hook and save it in a field. I tend to use a private static field and matching getter so the rest of the module can obtain it via that static method.
January 23, 2023, 10:34pm
Proper indeed, thanks