3.6 Using Session Status
Let's have a look at a simple implementation of session management.
First, set the BEGIN_COM command in the WAM RDMLX to indicate that each webroutine in this WAM must have an active session status before it can be executed UNLESS otherwise indicated by the ONENTRY parameter associated with the specific webroutine.
The entry point webroutine, in this example MaintainGrid, will be allowed to execute with no session status, as indicated by ONENTRY(*SESSIONSTATUS_NONE). All other webroutines in the WAM (which do not have this parameter setting) require an active session status by default.
This entry webroutine sets the session status to active and can now invoke other webroutines in the WAM, which require an active session status.
So what happens if the session status is invalid (for example, if I try to invoke another webroutine in this same WAM which does not have the ONENTRY(*SESSIONSTATUS_NONE) setting)?
An invalid session status fires a SessionInvalid event, which can be handled to issue the appropriate information to the user.