20.5 Visual LANSA integration with WAMs

If you already have a LANSA application using WAMs and session management, it is possible to integrate your new Visual LANSA web development and use the same session.

First of all, to ensure your WAMs and Server Modules are part of the same session you need to include a SessionGroupName identifier in the respective BEGIN_COMS:

In your WAM this may look something like:

Begin_Com Role(*EXTENDS #PRIM_WAM) Sessionkeymethod(Cookie) Sessiongroupname('MONSTER')

 

Then in any Server Modules to be part of the same session add the equivalent:

Begin_Com Role(*EXTENDS #PRIM_SRVM) Sessionkeymethod(Cookie) Sessionidentifier('MONSTER')

 

The next step may be to execute a secure call to a SrvRoutine from a WAM. This is implemented using the same syntax used to invoke a WebRoutine, that is replace the WAM/Webroutine with a Server Module/SrvRoutine. The SrvRoutine can be used to process data or it could redirect to deliver your Visual LANSA Web Page. You can even pass fields and lists by defining appropriate input and output maps. 

SrvRoutine Name(ShowPage) Response(*WEBPAGE #MYPAGE) Session(*REQUIRED)

Field_Map For(*input) Field(#SearchValue)
*Show MYPAGE
Endroutine