...
registerRuleset
unregisterRuleset(rid)
Info | ||
---|---|---|
| ||
unregisterRuleset does not accept a map, but a single ruleset ID (rid) value as its parameter. |
Unregisters the ruleset given by the rid. It will throw an error if the ruleset is installed on any picos, or depended on by another ruleset.
Parameter | Datatype | Required |
---|---|---|
<rid> | <string> | YES |
If your filename is myRuleset.krl, then the ruleset id will be "myRuleset".
Code Block | ||
---|---|---|
| ||
response = engine:unregisterRuleset("myRuleset").klog("Response Structure: ") /* Response Structure: undefined //engine:unregisterRuleset("myRuleset") does not return anything */ |
installRuleset( )
Installs ruleset(s) into a pico.
...
Do not provide the "rid" key if you want to retrieve the krl file from a remote repository (just provide the "base" and "url" keys). If you provide the "rid" key at all, this function will assume the ruleset is already registered with the engine and will simply throw an error if it is not found, ignoring the "base" and "url" as if they were not submitted. If the "base" and "url" are provided, then the krl file will be registered if not already and then installed on the pico with the given "pico_id".
Code Block | ||
---|---|---|
| ||
response = engine:installRuleset( { "pico_id": ent:id, "rid": "wrangler" } ); response = engine:installRuleset( { "pico_id": ent:id, "rid": ["wrangler","Pds"] } ); response = engine:installRuleset( { "pico_id": ent:id, "base": <base>, "url": <url> } ); /* Response Structure: "myRuleset" Simply returns the rulesetID as a string. The rulesetID is the ruleset's name. */ |
...