Convert old server functions to server routines

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
gillettd
Posts: 19
Joined: Tue May 24, 2016 2:13 pm

Convert old server functions to server routines

Post 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
atostaine
Posts: 696
Joined: Wed Jan 20, 2016 7:38 am

Re: Convert old server functions to server routines

Post 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.
Art Tostaine
jyoung
Posts: 694
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Re: Convert old server functions to server routines

Post 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
Post Reply