VLF-ONE Persistent Application Strings
Posted: Tue Mar 14, 2017 4:20 am
I am having trouble getting persistent application string working.
In my logon handler, I set the Persistent_ApplicationString1 to the #UserNameToDisplay
In the ServerModule that I am trying to access it I have included a Session Identifier.
and defined the persistent fields
When I try to access the #Persistent_ApplicationString1 its always blank.
I know the framework is invoking the correct logon handler as I can step through it and see that the persistent string is getting set.
In the web page the framework is initialized with
One question is how does the logon handler know what session identifier to use to put the persistent strings into? I am not seeing anything that states what session to use. The example always referenced DF_T62H1O and DFT62SMO don't use a logon handler so I am missing how that connection is made.
In my logon handler, I set the Persistent_ApplicationString1 to the #UserNameToDisplay
Code: Select all
mthroutine name(CheckUserCredentials) options(*REDEFINE *RETURNS_MESSAGES)
define_com class(#VF_ELRETC) name(#TemporaryReturnCode)
#uSystemCommon.TraceEvent from(#COM_OWNER) text('CheckUserCredentials started.') systemtrace(False)
* ================= DEFAULT BEHAVIOUR =================
* Successful execution
#MajorReturnCode := OK
* User to display is the same as the one typed in the logon dialog
* #UserProfiletoCheck contains the real or derived user profile.
#UserNametoDisplay := #UserProfiletoCheck
* Temporarily disable framework authority
* TODO: Enable Framework Authority when everything gets working
#UseFrameworkObjectAuthority := false
* stash the userid in a persistent string, we will need to send this to the server for audit tracking
#Persistent_ApplicationString1 := #UserNametoDisplay
#Persistent_ApplicationString1 := ""
#Persistent_ApplicationString2 := ""
#Persistent_ApplicationString3 := ""
#Persistent_ApplicationString4 := ""
#Persistent_ApplicationString5 := ""
* OTHER CODE OMITTED
endroutine
Code: Select all
begin_com role(*EXTENDS #PRIM_SRVM) sessionidentifier('VLFONE')Code: Select all
define field(#Persistent_ApplicationString1) type(*NVARCHAR)
define field(#Persistent_ApplicationString2) type(*NVARCHAR)
define field(#Persistent_ApplicationString3) type(*NVARCHAR)
define field(#Persistent_ApplicationString4) type(*NVARCHAR)
define field(#Persistent_ApplicationString5) type(*NVARCHAR)
persist fields(#Persistent_ApplicationString1 #Persistent_ApplicationString2 #Persistent_ApplicationString3 #Persistent_ApplicationString4 #Persistent_ApplicationString5)
I know the framework is invoking the correct logon handler as I can step through it and see that the persistent string is getting set.
In the web page the framework is initialized with
Code: Select all
#VLF_ONE.uInitialize frameworkidentifer("EXPRESS_SYSTEM") logonhandlerid(VF_AC026O) passwordchangerid("") mtxtloaderid(UF_OMULTI) themecustomizerid(VLFTHEME) logonexpiry(90) logonheaderpanelid(VLFLOGO) logontrailerpanelid("")