The following component diagram lays out the high-level components and how they interact within the Routine Report Service.  As it's name implies the functionality of this Service is to provide the capability to store report definitions and retrieve generated Reporting and Analytics.




As we can see from the diagram this Service owns the Routine Report definitions, interacts with the Reference Data service to add/remove rights based on those report definitions, and finally retrieve filled in Routine Reports on-demand.


Pros/Cons

ProCon
Service owns compiled storage and management, centralizing this in the system while allowing the non-compiled definition to be owned by other ServicesReport SQL will have to have a direct connection to each Service's private database - this means that Reports will likely break often as this internal database(s) change.
Service encapsulates and centralizes the Jasper engineService's will need to store their data all in one database - i.e. if a Service wanted to use it's own PostgreSQL instance, or a separate database, this Report service couldn't handle the multiple connections or types of databases
Report right management (the when and what to add to Reference Data Rights) is centralized here


Out-of-scope


Neither of these two options block the other - they're orthogonal and could be pulled in at any future point.


Alternative - Data wrapper

It's worth noting that an alternative was considered which extended work that had been done in the Requisition Service.  This approach is mainly the same, however instead of the Service having access to the report content database(s), this service expected the report content to be given to it through the RESTful interface.  This has approach has two critical flaws:


For these reasons, this approach of passing the report content data to the Service, was deemed undesirable.

Next Steps