Tom McDevitt · Jul 3, 2017

Available API for Creating a Business Service

Is there an available API for creating a business service? Is it just a table that Business Service Wizard is inserting the data into or it is something more? 

1 0 3 298


Yes, and InterSystems provides quite a few examples for developing Business Services. A Service generally extends an existing class, since there's a lot of operational stuff that is common between services. A Service also has a Parameter that defines the Adapter class it uses, which provides the methods to communicate with other processes/applications/servers. You can browse the EnsLib package for something that comes close to fitting your needs, then create a new class that either extends it or replaces its functionality with something different.

Look at the COS (Caché ObjectScript) source for, say, EnsLib.HL7.Service.TCPService to get an idea of how it hangs together. And if you need a custom Adapter to support something that isn't built-in, you can look at the code for those as well (for example, EnsLib.HL7.Adapter.TCPInboundAdapter). This is obviously all done through Studio, and guides for developing using the pre-built adapters are included in the Caché/Ensemble documentation.

Now, if you're talking about an API for some development platform other than COS, that's a different beast.

Re-reading the question, this probably makes more sense than my answer blush