Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Disappearing Program Context
Robert_Davies_(unlondonadmin_-_(deleted))
Hi.In a WebNode action in one of my modules I retrieve the current user's id with code like:function void ActionName2( Dynamic parm )...Object prgCtx = parm.prgCtxInteger userId = prgCtx.fUSession.fUserId...endNow sometimes I am finding that the Livelink server aborts when running the action containing this code, debug info suggest that the fUSession parameter of the program context is sometimes undefined.My investigations make it seem like this is likely if the user has a browser and the Livelink intranet service is restarted. This also seems logical.My question is: If this is so, what's the recommended way of regenerating the fUSession parameter? And why doesn't Livelink do this automatically as part of the request handler process?Best regards/matt.
Find more posts tagged with
Comments
Robert_Davies_(unlondonadmin_-_(deleted))
In my haste I was referring to prgCtx.fUSession directly. It looks like you should call prgCtx.USession() which allocates a new USession object when necessary.Best regards/matt.
Application_Services_FUJITSU_(fuji_ware05_-_(delet
Indeed, in the beginning I also had this problem. What is the reason?In fact it seems that it is a private feature that you should not access directly.the right way to do this is:prgCtx.USession().fUserIDThen it will workLet me know if it's (not) OKmailto:jraedemaeker@switch.beKind regardsJohan Raedemaeker