Progress Software provides a GitHub repository of Corticon.js sample projects at https://github.com/corticon/corticon.js-samples. You will see several references to samples in the Corticon.js documentation.

Accessing sample JavaScript (.js) files

Corticon.js JavaScript files are easily downloaded from their repository location. They might be updated occasionally as that examples listed in the documentation might have changed.

To access a sample's configuration file:
  1. For a configuration file, click on the active link noted as CODE, as illustrated in a PDF file:


  2. The link opens github.com at the file's location in the repository:


  3. Click Raw to open the file as a .js file:

  4. Save the file locally, and then open it for editing in your preferred text editor.

Accessing sample Corticon.js projects

Corticon projects are a collection of several asset types. The samples repository includes several projects.
  1. Connect to the repository at https://github.com/corticon/corticon.js-samples
  2. On the repository's page, click Code, and then click Download ZIP, as illustrated:

  3. Expand the downloaded ZIP file into a staging area on your local machine
  4. In Corticon.js Studio, choose File > New > Rule Project, and give it your preferred name, such as bar.
  5. In the file system, locate the project you want to import. Drill into the tree until you have a list of files that include a Vocabulary, an .ecore file.
  6. Select all the files at that location, and then drag to the empty project, bar, and drop them there.
  7. In the Studio:
    1. Right-click on the project, and then choose Properties.
    2. Choose Corticon.js Extensions, and then click Add From Project. In the left panel, click the checkbox to select all resources. Click OK, and click Apply and Close.
    3. Right-click on the project, and then choose Upgrade Rule Assets.
    4. Right-click on the project, and then choose Validate Project.
  8. It is a good practice to open the sample's Ruletest (.ert) file, and then run it. After taking a few seconds for the first compile, the Output should match the Expected.
The project is loaded. Double-click any file in the project to open it in its appropriate editor.