extended rules

Registered by Alex Mitchell

Going beyond the reworking of the rules.

Blueprint information

Status:
Not started
Approver:
Alex Mitchell
Priority:
Medium
Drafter:
Alex Mitchell
Direction:
Needs approval
Assignee:
None
Definition:
Discussion
Series goal:
Accepted for 2.4
Implementation:
Not started
Milestone target:
milestone icon 2.4a3

Related branches

Sprints

Whiteboard

Rules:
1) a rule has *conditions* and *actions*
2) rules are attached to links, nodes, or the entire document
3) rule is *triggered* based on certain events (see below)
4) when a rule is triggered, a rule's actions are executed if the rule's conditions are satisfied
5) multiple rules may be attached to the same object
6) rules are evaluated in order
7) each rule has a "do not trigger other rules if this rule is triggered" checkbox which stops any more rules after this one being triggered by the current event

Rules can be attached
1) on a region of text (a "link")
2) on a node
3) on the entire document

[NOTE: I think we may want to simplify when rules are triggered. Lets talk about this. - Alex

Rules on a link can be triggered
1) when the node containing the link is entered
2) when the mouse enters the link
3) when the mouse leaves the link
4) when the mouse is clicked on the link

Rules on a node can be triggered
1) when the node is entered
2) when the node is exited

Rules on the entire document can be triggered
1) when the story begins
2) when the story ends
3) when any node is entered
4) when any node is exited]

Conditions:
1) rules can have multiple conditions
2) a rule is triggered {if any / if all / unless any / unless all} conditions are met

Basic (currently supported) conditions:
1) node visited/not visited/previous
2) link followed/not followed
3) fact true/false

Actions:
1) multiple actions may be attached to a rule
2) actions are executed in order

Basic (currently supported) actions:
1) go to node (links only, only one per rule)
2) change link text (links only, only one per rule)
3) set fact
4) enable links to this node (enter (anywhere) node only, only one per rule)

User Interface:

Accessing the rules:
1) In the node editor window, Edit->Edit node rule opens the rule list for the current node
2) In the node editor window, double-clicking on a link in the link list opens the rule list for that link
3) in the

Rule list:
1) The rule list dialog box contains a tabbed panel.
2) each panel contains a scrolling list of rules
3) each panel contains an "add rule" or "+" button which adds a new, untitled rule to the end of the list
4) one or more rules in the list can be selected
5) each panel contains a "delete selected" or "-" button which deletes selected rules from the list
6) each panel contains up and down arrows, which move the selected rules up or down in the list
7) double-clicking on a rule opens the rule editor dialog
8) at the bottom of the dialog box, outside the tabbed panel, are ok and cancel buttons
9) for nodes, the rule list contains 2 panels: "Enter" and "Exit"
10) for links, the rule list contains 4 panels: "Node entered", "Mouse over", "Mouse out" and "Mouse clicked"
11) for document rules, the list contains 4 panels "Begin", "End", "Node entered" and "Node exited"

Rule editor:
1) the rule editor contains a "not" pulldown, an "all/any" pulldown, a list of conditions, and a list of actions
2) the first pulldown contains "if" and "unless"
3) the second pulldown contains "all" and "any"
4) the first and second pulldown are arranged from left to right, followed by the text "of the following conditions are true:", similar to the current link editor window
5) the list of conditions contains a list of conditions (duh!), which can be selected
6) at the bottom of the list of conditions is an "add condition" or "+" button, which adds a new condition to the end of the list
7) at the bottom of the list of conditions is a "delete selected" or "-" button which deletes the selected conditions
8) between the list of conditions and list of actions is the text "THEN"
9) the list of actions contains a list of selectable conditions
10) below the list is an "add action" and a "delete selected" button"
11) for actions, there are also up and down arrow buttons to reorder the actions
12) at the bottom of the dialog box are "ok" and "cancel" buttons
13) conditions and actions can be edited in place, similar to the current conditions.

Note that this should roughly look similar to the current "edit link" dialog.

Plan to implement in steps
1) preserve current functionality but with multiple rules and new rule editor
2) then we can see how the new functionality can fit into our framework.

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.