Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The build process for rulesets primarily involves editing them and then parsing them to ensure it is they are correctly formatted. The preferred way to do this ensure they parse is using a Git pre-commit hook. 

  1. Follow the directions in Setting Up a Git Pre-Commit Hook to Parse KRL to set up the KRL parser and ensure that KRL files are parsed before they are committed. 

  2. Add the file to the repository and commit it. 

    Code Block
    languagebash
    $ git add hello_world.krl
    $ git commit -a -m "initial commit"
    All rulessets parse
    [master (root-commit) 4a2f95c] initial commit
     1 file changed, 34 insertions(+)
     create mode 100644 hello_world.krl

    With the pre-commit hook in place, you're assured that there are no parse errors in your ruleset if it commits.

Register the ruleset with the pico engine. There are automated ways to do this, but for initial development, you can do in manually. Navigate to the ruleset.html resource on your engine (i.e. if you engine is running at localhost:8080, then go to http://localhost:8080/ruleset.html. You can enter the URL of the ruleset in the box marked in red in the screen shot below. You can use the file: URL scheme to load the ruleset from the filesystem directly into the engine rather than relying on an external server. The file URL is the schema file:// prepended to the full pathname of the file (yes, there are three slashes): 

file:///Users/pjw/prog/picolabs/pico_lessons/workflow/hello_world.krl

...

  1. .

...

Deploy

Deploying consists of installing the ruleset in any picos it needs to run in. If the ruleset has already been installed, then it will just need to be flushed. 

...