M
mparish
Guest
Here’s a small fragment that shows how Corticon can be invoked in-process from .NET. Its code that might be in a button that sends some data from the screen to Corticon for evaluation. The bold line is the important one private void btnExecute_Click(object sender, EventArgs e) { string DECISION_SERVICE_NAME = "Skydiver"; C_Applicant lC_Applicant = new C_Applicant(); lC_Applicant.StrName = txtName.Text; lC_Applicant.IntAge = Convert.ToInt32(txtAge.Text); lC_Applicant.BlnSkydiver = chkSkydiver.Checked; ArrayList llistObjects = new ArrayList(); llistObjects.add(lC_Applicant); iICcServer.execute(DECISION_SERVICE_NAME, llistObjects); C_Applicant lC_ApplicantReturned = (C_Applicant)llistObjects.get(0); txtRating.Text = lC_ApplicantReturned.StrRiskRating; } You would create an instance of the Server using code like this public static ICcServer createServer() { ICcServer lICcServer = CcServerFactory .getCcServer(); lICcServer.startDynamicUpdateMonitoringService(); lICcServer.startServerExecutionTimesIntervalService(); lICcServer.startServerPerformanceMonitoringService(); lICcServer.startServerResultsDistributionMonitoringService(); return lICcServer; } The full documentation is provided with your install of Studio. Do a search of .NET and you will also see some examples there. You can also execute Corticon as a web service when the server is installed (in IIS, Tomcat, Websphere, Weblogic etc). The .NET code for that would be the same as any standard web service. In that case client then doesn’t need to know whether the server is .NET or java. Mike
Continue reading...
Continue reading...