· Sep 15, 2017

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.


Discussion (2)0
Log in or sign up to continue

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