Versions Compared

Key

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

This Quickstart will help you get your KRL programming environment set up and working. 

The old Quickstart for SquareTag is still available. 

Learning Objectives

After completing this Quickstart lesson, you will:

...

  1. Create a git repo for your KRL rulesets and put it on Github. You can create a different repo for each ruleset if you like or create one repo and put multiple rulesets in it. 
  2. Create  file in your ruleset repo called hello.krl and put the following in it:

    Code Block
    languagejavascript
    themeConfluencelanguagejavascript
    ruleset hello_world {
      meta {
        name "Hello World"
        description <<
    A first ruleset for the Quickstart
    >>
        author "Phil Windley"
        logging on
        sharing on
        provides hello
    
      }
      global {
        hello = function(obj) {
          msg = "Hello " + obj
          msg
        };
    
      }
      rule hello_world {
        select when echo hello
        send_directive("say") with
          something = "Hello World";
      }
    
    }
  3. Use one of the methods in Tips for Developers to validate (parse) your ruleset.

    Info

    Installing and using the KRL command line parser can be a real time saver if you're going to be writing several rulesets. Checking in and trying to execute rulesets that don't parse is one of the primary frustrations of beginning KRL developers.

  4. Check your ruleset into Github.

...