This example demonstrates a custom service for Determinations Server and illustrates how it is possible to load reference data before calling the Assess method.
It deals with the scenario of a real-time inquiry for a claimant's medical outpatient benefits. When a claimant visits a clinic for a check-up, the system should be able to return all of the outpatient services for which the claimant is eligible and is currently entitled to.
To achieve this, we develop a custom service that meets the following requirements:
There are two basic actions that are exposed by the custom service:
The examples\custom-service directory in Oracle_Policy_Automation_Runtime_Java_10.2.1.zip file contains all of the files required to set up this example.
The examples\custom-service\webapp directory contains the determinations-server.war file. This is a fully set-up instance of Determinations Server, with the custom service already installed.
The examples\custom-service\source\Java directory contains the Java source code for the service (the .NET source code is very similar). The service has the following two classes:
To build and deploy the service code, do the following:
The examples\custom-service\source\Java directory contains the XML data file health-insurance-data.xml which contains the reference data loaded by the Java code above.
It is suggested this file be placed in the determinations-server\WEB-INF\classes\plugins directory. Note that as the XML file location is not strictly mandated by Oracle Policy Automation, it can actually be placed anywhere on the file system, but if you do choose to locate the file in a path other than that recommended here, then that path will need to be specified in XML_FILE_PATH of the OutpatientEligibilityService.java file.
Copy the health-insurance-data.xml file from examples\custom-service\source\Java to determinations-server\WEB-INF\classes\plugins.
The examples\custom-service\source\wsdl directory contains the WSDL templates that expose the custom service operations. Do the following:
The examples\custom-service\rulebase directory contains the rulebase which implements reasoning for outpatient eligibility. Do the following:
To test that Determinations Server has been successfully installed, access the “determinations-server” web application from a browser; for example, http://localhost:8080/determinations-server. You should see the following links:
To examine the custom WSDL, click the last link labelled /determinations-server/custom/eligibility/OutpatientEligibility?wsdl.
To test the new custom service, you can use a tool such as SoapUI; sample SOAP requests and expected responses can be found in the examples\custom-service\sample-requests-responses.