Page 1 of 1
Convert old server functions to server routines
Posted: Thu Mar 29, 2018 2:24 pm
by gillettd
Hi,
Just for a proof of concept (i haven't used v14 much yet) ..how to integrate old lansa function into server module ..can the server module just be a container/wrapper around a lansa server function?
Any feedback would be much appreciated
Cheers,
Dominique
Re: Convert old server functions to server routines
Posted: Fri Mar 30, 2018 5:23 am
by atostaine
You can't call a server routine from VL-Forms and you can't call server functions from VL-Web.
Someone previously posted a way to have multiple wrappers to accomplish something like it. I think dingo did it.
Re: Convert old server functions to server routines
Posted: Fri Mar 30, 2018 6:38 am
by jyoung
Not sure what you mean by "old lansa function", but if you referring to Function that is contained in a Process you can call that Function from a Server Module's server routine.
Code: Select all
srvroutine name(Get) session(*REQUIRED)
* maps omitted as there a quite a few in this routine
#wk_Status := ER
#wk_OfficeType := #OFOTY
#wk_OfficeNumber := #OFOFID
#wk_JobType := #CWJTYP
#ApplicationService.SetLibraryList( #wk_CountryCode )
exchange fields(#ExchangeFields)
call process(*DIRECT) function(CMGSANCreateReport) pass_lst(#HeaderList #OfficeList #ClientList)
endroutine
In this case, the server routine is could be considered a wrapper around the function that allows web client components to call the function.
- Joe