Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: modernize for 0.52.2

...

Note that the web server displays the URL of its document root, ex. "http://localhost:8080" pico-engine logo and some debug messages and then continues to run.  Messages are logged to this console, so do not close the command window.

The Primary, or

...

Root, Pico

The pico engine starts with a primary pico named "Owner Root Pico".  The Owner Root Pico is setup with the minimum required rulesets for running the a pico and the developer UI. You can visit the developer UI at http://localhost:8080 and see the Owner Root Pico.

The owner root pico is represented by a rounded rectangle, which is placed on a canvas, allowing you to change its size and placement. Keep this tab open for use in registering and installing your ruleset.

...

Code Block
titlehellow_world.krl
linenumberstrue
ruleset hello_world {
  meta {
    name "Hello World"
    description <<
A first ruleset for the Quickstart
>>
    author "Phil Windley"
    logging on
    shares hello
  }
  
  global {
    hello = function(obj) {
      msg = "Hello " + obj;
      msg
    }
  }
  
  rule hello_world {
    select when echo hello
    send_directive("say", {"something": "Hello World"})
  }
  
}

The following describes parts of the ruleset shown above:

...

A recommended workflow for writing KRL is found in KRL Programming Workflow. This example uses github GitHub as a host. 

When you Register a ruleset, the pico engine parses and compiles the KRL source code and makes the uniqe unique ruleset ID available to install inside the picos that it is hosting.

Installing a ruleset inside a pico enables the pico engine to evaluate each rule on that pico when corresponding events are raised to that pico.

View your Owner Root Pico by visiting the "My Picos" page (linked from the "Pico Bootstrap" page), as shown above.

Single click on the rounded rectangle which represents your Owner Root Pico. It opens up, giving you access to information about it.

...

Clicking on the "install ruleset from URL" button will cause the pico engine to get your ruleset using an HTTP GET, compile it, and register it. 

...