skip to main content
Corticon Server: Integration & Deployment Guide : Decision Service versioning and effective dating : Invoking a Decision Service by version number : Creating samples of versioned Ruleflows

Try Corticon Now
Creating samples of versioned Ruleflows
The Ruleflows we will use in this section are based on Rulesheet variations of a single rule. Notice that the only difference between the three Rulesheets is the threshold for the age-dependent rules (columns 2 and 3 in each Rulesheet). The age threshold is 35, 45, and 55 for Version 1, 2 and 3, respectively. This variation is enough to illustrate how the Corticon Server distinguishes Versions in runtime. The Vocabulary we will use is the lifePolicy.ecore, located in the Training/Advanced project.
Figure 311. Sample Vocabulary for demonstrating versioning
We know we want to have more than one Ruleflow with the same name and differing versions, so we first used File > New Folder to place a Version1 folder in the project. Then we created a Rulesheet for defining our policy risk rating that considers age 35 as a decision point, as shown:
Figure 312. Rulesheet skydiver4.ers in folder Version1
We created a new Ruleflow and added the Version1 skydiver4.ers Rulesheet to it. Then we set the Major version to 1 and the Minor version to 0. The label Thirty-five was entered to express the version in natural language.
Figure 313. Ruleflow in folder Version1 and set as Version 1.0
After saving both files, right-click on the Version1 folder in the Projects tab, and then choose Copy. Right-click Paste at the Advanced folder level, naming the folder Version2. Repeat to create the Version3 folder. Your results look like this:
Figure 314. Folders that distinguish three versions
Note: In the examples in this section, the Ruleflows, Deployment Descriptor, and Decision Services names are elaborated as _dates and _noDates just so that we can deploy both versioned and effective-dated Decision Services at the same time.
We proceed to edit the Rulesheets and Ruleflows in the copied folders as shown, first for Version2:
Figure 315. Rulesheet skydiver4.ers in folder Version2
Figure 316. Ruleflow in folder Version2
And then for Version 3:
Figure 317. Rulesheet skydiver4.ers in folder Version3
Figure 318. Ruleflow in folder Version3