File: How to Invoke Corticon Decision Services from a Corticon Decision Service

  • Thread starter Thread starter mparish
  • Start date Start date
Status
Not open for further replies.
M

mparish

Guest
see attachment for an example You will have to use either an extended operator or a service call out in order to call one Corticon decision service from another. The extended operator approach means you can call out to Corticon either as an action or as a condition in a rule sheet. The attachment contains an example of the java code necessary to make an in-process call to Corticon. The operator would appear in the Corticon Studio Rule Operator tab. Then you can use it in a condition or action of a rule sheet. You would construct the Corticon SOAP payload something like this CorticonRequest decisionServiceName="Skydiver" WorkDocuments Applicant age 20 /age isSkydiver true /isSkydiver /Applicant /WorkDocuments /CorticonRequest The result would come back like this: ?xml version="1.0" encoding="UTF-8"? CorticonResponse decisionServiceName="Skydiver" WorkDocuments xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance " Applicant id="Applicant_id_595945461" age 20 /age isSkydiver true /isSkydiver riskRating High /riskRating /Applicant /WorkDocuments Messages version="4.26" Message severity Info /severity text Applicants who skydive have a High Risk rating. /text entityReference href="#Applicant_id_595945461" / /Message /Messages /CorticonResponse This approach does however require that you construct the SOAP message somehow (either by hand or using other rules to concatenate the various parts) And you also have to parse through the returned XML to get the results. But technically it can be done with just that small amount of java code – and its entirely generic you can call any decision service using this mechanism. If you want to try it you will have to read the Corticon docs that cover creation of extended operators. You might also be able to make this a bit simpler by using the REST interface.

Continue reading...
 
Status
Not open for further replies.
Back
Top