SwatiShah Absent Member.
Absent Member.
343 views

SessionContext with IAction

IAction execute method uses SessionContext and returns SessionID. But can we reuse this session and force code to reuse if session specified exists? Or does it always have to be a new session?

 

For Eg: Some IAction code is executing custom code and puts a specific information in SessionContext. If from OO flow I can't reuse same session developer will have to maintain (read and reuse) that information? Sample exist in HTTPClient actions which store HTTPCookies for the sesion.

Labels (1)
0 Likes
2 Replies
Daniel_Linsley Absent Member.
Absent Member.

Re: SessionContext with IAction

If I recall correctly, the SessionContext has a lifetime of a flow execution on that particular RAS.  It cannot be transferred to another RAS, read by a future execution of a flow, or read by a different flow even if you know the sessionid.

 

You can treat the SessionContext as a java.util.Map (as what the HTTPClient does with cookies).  It is useful for retaining some data between IAction.execute() calls for related IActions.

0 Likes
SwatiShah Absent Member.
Absent Member.

Re: SessionContext with IAction

So for example HTTP Post (Utility operation) is implemented as IAction and exposed to us. The code interface (inputs) allows us to set cookies to true or false. If set to true it stores the session in HTTPCookies variable but how can I use that again if it lasts only for that flow execution.

 

Is there any setting on jetty configuration which can instead manage sessions cause HTTP 1.1 keep session alive but these operations close them. I did modify the Iaction to keep it alive but still can't keep the same session going.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.