How to Call Corticon From Corticon

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.

 

Here’s an example of the java code necessary to make an in-process call to Corticon:

This would appear in your operator tab like this:

You would invoke it in a rule sheet like this:

Where the vocab has something like

And a sample test case would be:

With the following result being returned:

Corticon Result = <?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.

Download

Download PDF version.