The Reject Node¶
Sometimes it makes sense to terminate an interview prematurely. For these cases, PolicyModels has a reject node. When the runtime gets to a reject node, the interview stops, and the rejection reason is presented to the user.
Consider a data tagging system that matches a data handling policy to a dataset. Theoretically, every dataset should have a matching policy. The reality is a bit more complex: there is a special case. Datasets that were obtained by violating laws or regulations cannot be automatically accepted to repositories (if at all).
It’s Not Us, Its You¶
A reject node has a textual body, explaining the rejection reason. They look like this:
[reject: Data cannot be accepted.
It is illegal to gather data by hunting down baby unicorns.]
Baby unicorn (illustration by the author)
In the following questionnaire (files: tag space, decision graph), the interview starts with a short validation of the legality of the dataset. If the dataset is, indeed, legal, the interview continues. Otherwise, it ends on the reject node at line 21.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <*
Sample toy interview
*>
[call: ensureLegality]
[ask:
{text: Do the data contains personally identifiable information?}
{terms:
{Personally identifiable information: Any information
about an individual... }
}
{answers:
{yes: [set: Storage=encrypt; Transfer=encrypt]}
{no: [set: Storage=clear; Transfer=clear]}}]
[todo: Test for additional ...] <-- Issue #42 follows
[end]
[>ensureLegality< ask:
{text: Did you get parental consent?}
{answers:
{no:
[reject: Must get parental consent before collecting
data from subjects under 18.]}}]
[end]
|
Warning
This questionnaire is, of course, is intended to show the usage of the reject node. NOT TO BE USED AS LEGAL ADVICE.
The education interview.
Rejection message from the DataTaggingServer, due to a likely PPRA violation.
Next up, we’ll demonstrate how to use the current slot values to conditionally visit parts of the decsion graph.