skip to main content
Corticon Server: Deploying Web Services with Java : Consuming a Decision Service on Java server : Integrating and testing a Decision Service on Java server
 

Try Corticon Now

Integrating and testing a Decision Service on Java server

In order to use a Decision Service in a process or application, it is necessary to understand the Decision Service's service contract, also known as its interface. A service contract describes in precise terms the kind of input a Decision Service is expecting, and the kind of output it returns following processing. In other words, a service contract describes how to integrate with a Decision Service.
When an external process or application sends a request message to a Decision Service that complies with its service contract, the Decision Service receives the request, processes the included data, and sends a response message. When a Decision Service is used in this manner, we say that the external application or process has successfully consumed the Decision Service.
This guide describes four paths for consuming a Decision Service:
*Path 1
Use Corticon as a SOAP client to send and receive SOAP messages to a Decision Service running on a remote Corticon Server  - This is different from testing Ruleflows in Corticon locally. This path is the easiest method to use and requires the least amount of technical knowledge to successfully complete. If you have already installed Corticon Studio, then you have all necessary components to complete this path. If not but want to follow this path, we recommend completing the Corticon Installation Guide and the Corticon Studio Tutorial: Basic Rule Modeling before continuing on this path.
*Path 2
Manually integrate and test a Decision Service - In this path, we will use bundled sample code (a command file) to send a request message built in Corticon Studio's Tester, and display the results. This path requires more technical knowledge and confidence to complete, but illustrates some aspects of the software which may be interesting to a more technical audience. If you have already installed Corticon Studio, then you have all necessary components to complete this path. If not but want to follow this path, we recommend completing the Corticon Installation Guide and the Corticon Studio Tutorial: Basic Rule Modeling before continuing on this path.
*Path 3
Use a commercially available SOAP client to integrate with and test a Decision Service - In other words, this SOAP client will read a web-services-standard service contract (discussed below), generate a request message from it, send it to the Corticon Server, process it, and then return the response message.  Progress Corticon does not include such an application, so the reader must obtain one in order to complete this path.
*Path 4
Use a JSON/RESTful client to consume a Decision Service - A JSON RESTful interface is one that follows the REST architectural style and uses JSON as its data representation format. Using a sample Corticon requests in JavaScript Object Notation (JSON), the client will send the JSON-formatted request message to the Corticon Server, process it, and then return the response message.