invoke an adapterless ensemble service
Hi world , can you show me if you have a code for how invoke an adapterless service from a task classe in an ensemble prodution please.
thank's
Discussion (2)0
Comments
Take a look at the section invoking a business service directly...
Essentially, you need to create an instance of a business service using the ens director, then you can call the process input method of your adapterless service.
Assume you have a business service called 'ServiceOne' in your production which is adapterless
You then just need the following code to call it..
set st = ##class(Ens.Director).CreateBusinessService("ServiceOne", .theService)
quit:$$$ISERR(st) // or whatever you want on an error
set st = theService.ProcessInput(request, .response)
quit:$$$ISERR(st) // or whatever you want on an error