Question
· Nov 14, 2022

Business Service Pool Size with Ens.Director.CreatBusinessService()

  • I have created a business service that uses an adaptor that I wrote by extending Ens.InboundAdapter (i.e. the ADAPTOR parameter is set to my custom adaptor  ).  
  • The OnTask() method of my adaptor polls our IRIS database to determine which records are ready to be sent out of our system to an external target system.
  • If the record is ready the OnTask() method creates an instance of the Business Service and then calls the OnProcess() method sending in the record as the input.
  • The Business Service is also a custom design that simple calls the business process using an async request. 

Originally, I had designed the business service's ADAPTOR parameter to be Ens.InboundAdapter and just defined the OnProcess() method to do the database query that the adaptor now does.  OnProcess would call the async request still without creating an instance of the business service.  However, I would get the error that the business process wasn't registered, so that's when I created the custom adaptor.  Things are working well with the setup in the bullets above. 

That said, I came across this documentation (https://docs.intersystems.com/healthconnect20212/csp/docbook/DocBook.UI....) saying that "You must use a value of 0 if the business service is being invoked via the Ens.Director method CreateBusinessService(); this is called an adapterless business service."  If I turn the pool size to 0, then nothing works.  I feel like I have a gap in understanding.  Some questions:

  • When a business service uses Ens.InboundAdaptor, what method is supposed to be getting the data from the source when the source is the internal database?
  • How would I register the business service without using the Ens.Director method?
  • It's working as I have it (early stages of dev) and I'm using an adaptor, but according do the doc, since I'm using Ens.Director, I'm now 'adaptor-less' but that's not the case. What am I not understanding?

A more generic Ensemble question or two that if people can link to discussions or documentation on, I would be grateful:

- My idea is that a single object passed in will be used to generate two HL7 messages; should I be able to call two transformations, send them as requests to business operations to send externally and send a response back to the business service that they were sent?  When I use the BPL editor, it seems the request to the next service is also the response of the current service. Does it have to be this way?

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