rslc. This guide runs the staffing
example, a guideline for the synthetic carrier Example Mutual. Run your own guideline the same way.
rslc examples get staffing saves the example, and open starts a log for its guideline:
open pins the log to the program, so later commands name only
the log. Every command prints the entries it wrote, then the status: the stage and the open questions.
The log’s name ends in .jsonl for a file of JSON lines, or in .sqlite for a database.
Submission log compares the two.
Each command that writes names its writer as --as role:name. The role is one that the guideline
declares in Roles. The name is free text for the person or the tool.
Answer questions
A question is an input’s path, such aspolicy.payroll, or a referral’s name. To answer from a
JSON file, pass --file:
question=value:
--becauserecords why the writer gives the answer.--fromrecords where the answer comes from, such as a document or a system.- A value is JSON, or a bare word for a string:
2500000,true,no_claims. - Quote a value that the shell changes, such as
'policy={"payroll": 2500000}'. - One command takes several
question=valuepairs and applies all of them or refuses all of them. - To replace an answer, answer the question again.
- Name a list item by its key, as in
'placements[class="clerical"].share=0.6'. Submission log gives the rules.
Check the status
open block lists each question that still needs an answer, its kind, and the lowest role
that may answer. A signoff line is a referral with its reason, and each reads line under it
is an answer that the sign-off stands for. outcomes known so far lists each outcome that the
answers already decide.
Retract an answer
To make a question open again, retract its answer by the path it was given at:Sign off a referral
A sign-off is an answer to the referral’s name, from the referral’s role or a role above it:Approvedlets the submission go on.Declinedmakes itIneligible; see Decline a submission.- The entry records the answers that the manager saw, after
on. retractwith the referral’s name takes a sign-off back.- A sign-off lapses when an answer that the referral’s condition reads changes. Sign off again on the new answers.
Quote
Give the quote a name:quoteworks in theQuotablestage: every question has an answer and every open referral is approved.- A quote name starts with a lowercase letter and holds lowercase letters, digits and
_. A log uses each name once. - A quote lapses when an answer or a sign-off changes after it. Quote again under a new name.
Offer quote options
The broker asks for a second quote with a $2,000,000 limit. Both quotes price the same firm, so only the limit differs. The rater markslimit with per quote:
high, with --in:
--in is the status of that option: the premium is $5,500 at the
higher limit. The shared answers still hold the $1,000,000 limit, so q1 stands.
Quote the option under a new name:
q1 at $5,000 and q2 at $5,500. A plain status reads the shared
answers, at the $1,000,000 limit:
--in high to read the option, at $5,500.
An option answers terms only. The log refuses a fact in an option with the code NOT_A_TERM:
--inworks withanswer,retract,quoteandstatus.- An option’s name follows the rule for a quote’s name.
- An option starts with its first answer.
quote --inon an option that holds zero answers is refused asNOT_QUOTABLE. retract --in hightakes back the option’s answer, and the option reads the shared answer again.- A new answer to a fact, given as usual, changes every option. Each quote that it changes lapses.
- A sign-off given as usual counts in each option that holds the answers it read. A sign-off with
--incounts in that option alone.
Bind
bind names one quote that stands. The insured accepts the higher limit:
bindtakes a quote that stands. A bound submission is final.- A quote keeps its option, so
bindtakes the name alone. - The
outcomesblock of a plainstatusreads the shared answers, here the $1,000,000 limit. The bound policy is the option ofq2: read it withstatus --in high.
Read the history
history lists every entry, with its number and its writer:
--at:
Write on what you read
Another person may change a submission between your read and your write.--based-on names the
last entry you read, and the log then refuses a write whose facts changed after that entry.
Start a second log, with the application and the loss experience in it:
STALE and names the answer that changed. Read the status again,
then write on the entry it shows:
--based-onworks withanswer,retract,quote,bindandclose.- The log compares only what the command reads. A change elsewhere in the log leaves your write valid.
- With
--in, the log compares what the command reads in that option. - The entry number is the last number in
history, orseqin the--jsonoutput.
Close a submission
To end a submission before a quote is bound, close it with a reason:withdrawn, expired or lost.
Decline a submission
A fourth reason,declined, records the carrier’s decision to turn a submission down. It follows
the Ineligible stage.
A third applicant is a PEO that is 2 years old. Open a log for it:
Ineligible. A sign-off of Declined
gives the same stage. The declines block lists each rule and each sign-off that declines.
An Ineligible submission stays open, because a typing error and a true answer break a rule alike.
The log refuses quote, and it accepts two things:
- A correction. Answer the question again, and the stage follows the new answers.
- A decision.
close declinedturns the submission down for good.
close declinedtakes the role of thequoteact, or a role above it.- The entry lists, after
on, each code that the decision rests on. - In the
OpenandQuotablestages, the log refusesclose declinedasNOT_DECLINABLE. Declinedis final, likeBoundandClosed.
Read the result from a program
Add--json to any command to get one JSON value on standard output. This Python reads the
status of both logs, then sends a write to the bound one:
submission is a helper that this page defines, in ordinary Python. A report holds ok, the
applied entries, the refusal, the last entry number seq, the program hash and the status.
Submission log lists every field.
A program that writes to a log needs the questions, the roles and the rules first.
rslc submission contract submission.jsonl prints them as one JSON value, and
Submission log lists its parts.
Exit codes
These codes belong to
rslc submission. For the other rslc commands, 2 marks a wrong command line.
Submission log explains each refusal code.
Replay a story with a script
A script file plays one submission from its first step and checks the results it expects. The example’sstale.script tells the story of the two sign-offs above:
rslc script:
- The script’s log lives in memory.
--keep log.jsonlwrites it to a new log. rslc scriptexits with0when every step passes, and with1otherwise.- Submission log gives every line form.
Related
- Write your first guideline builds the staffing guideline and works one submission step by step.
- Raters and guidelines explains why a sign-off lapses and why a quote keeps its name.
- Submission log lists every command, entry, stage and refusal code, and the contract.
- Examples shows each file of the staffing example.