Now that you have written the Java client code, you can test it and confirm
whether the code accesses the Decision Service.
Copy the Decision Service file, Cargo_v0_16.eds,
from the workspace.
Paste it into src\program\myClient_712.
Run InvokeDS.java. The Decision Service updated the container variable based on the values of weight
and volume provided in the request object message. Based on the rules defined for this
project in Corticon Studio, for an input weight of 1000 and volume of 10, the rules
respond that a standard container should be used. The Decision
Service is responding to the Java client code and the business rules.
Let’s change the value of weight defined in the Java client code to
25000.
try {
Cargo cargo = new Cargo();
cargo.setWeight(25000);
cargo.setVolume(10);
Save and run the Java client code.
The rules triggered to prefer a heavyweight container.
The Decision Service is responding to the client code within the Java
app.
Congratulations! You have completed this tutorial.
You have created Java Object get and set methods, mapped them to the
Vocabulary, packaged the project as a compiled Decision Service file, and created Java
client code to deploy and access the Decision Service. Finally, you tested the Java client
code to confirm that it accesses the Decision Service.
You have created and tested a Corticon Decision Service
deployed in-process under Java.