This page (revision-11) was last changed on 13-Jun-2014 17:49 by Albrecht Striffler

This page was created on 07-Mar-2013 06:26 by Volker Belli

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
11 13-Jun-2014 17:49 2 KB Albrecht Striffler to previous
10 13-Jun-2014 17:45 2 KB Albrecht Striffler to previous | to last
9 07-Mar-2013 19:58 2 KB Volker Belli to previous | to last
8 07-Mar-2013 17:05 2 KB Volker Belli to previous | to last
7 07-Mar-2013 16:16 2 KB Volker Belli to previous | to last
6 07-Mar-2013 16:10 2 KB Volker Belli to previous | to last
5 07-Mar-2013 06:46 2 KB Volker Belli to previous | to last
4 07-Mar-2013 06:31 1 KB Volker Belli to previous | to last
3 07-Mar-2013 06:30 1 KB Volker Belli to previous | to last
2 07-Mar-2013 06:29 1 KB Volker Belli to previous | to last
1 07-Mar-2013 06:26 1 KB Volker Belli to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 2 removed one line
At this page you can find the documentation for conditions. Conditions are an essential part of several markups, e.g. [rules | Doc Rules], [covering lists | Doc CoveringList], and checks in [test cases | Doc TestCaseTable]. Conditions are used to define a logical expression on some findings and/or outcomes of a d3web diagnostic session, to tell d3web how to action under specific circumstances.
At line 3 added 2 lines
At this page you can find the documentation for conditions. Conditions are an essential part of several markups, e.g. [rules | Doc Rules], [covering lists | Doc SetCoveringKnowledge], [abstraction tables | Doc AbstractionTable] and [test cases | Doc TestCaseTable]. Conditions are used to define a logical expression on some findings and/or outcomes of a d3web diagnostic session, to tell d3web how to action under specific circumstances.
At line 12 added one line
// note: for multiple-choice questions this evaluated to "true" if the choice is selected, regardless is any other choice is additionally selected
At line 13 changed 8 lines
// note: for multiple-choice questions the operator evaluates to "true"
// if the compared choice is selected, regardless is any other choice is
// additionally selected.
mc-question = choice1 AND mc-question = choice2
// check if the question is answered with a value of its normal range,
// or if the value is "unknown" (which means that the "unknown" choice
// of the question is selected explicitly)
// check if the value is "known" (a value of its normal range is answered) or selected as "unknown" (the "unknown" choice of the value is selected explicitly)
At line 29 changed 4 lines
// check a question value to match a regular expression.
// the operator evaluates to "true" if the regular expression matches
// the whole answer given to the question. This is usually used for
// text questions. Please note that the regular expression is quoted in "/"
// check a question to match a regular expression
// the operator evaluates to "true" if the regular expression matches the whole answer given
// for more details to regular expression, see e.g. [http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html]
// note: the special "/" before and after the regular expression
At line 35 changed one line
/%
%
At line 37 removed 3 lines
For more details to regular expression, see e.g. [java documentation of regular expressions | http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html].
At line 42 removed 25 lines
Especially for numerical questions, there is a set of additional test operators.
%%prettify
{{{
// first we might use the original compare to equal,
// both operators are the same
num-question = 10
num-question == 10
// there are also checks against limits of various types
num-question <= 10
num-question >= 10
num-question < 10
num-question > 10
// finally there is a special operator to check for intervals
// note that open and closed intervals borders are allowed for this
num-question [10 20]
num-question ]10 20]
num-question [10 20[
num-question ]10 20[
}}}
/%
At line 68 removed 11 lines
The following operators can be used to build more complex expressions from simple rule conditions:
* __NOT__(condition): true, if the condition does not apply
* (condition1) __AND__ (condition2): true, only if both conditions apply at the same time
* (condition1) __OR__ (condition2): true, if at least one of the conditions do apply
!! Complex Formulas as Conditions
For more complex formulas on any values there is an additional plugin available. Be aware, that this extension is non-LGPL-licensed for commercial use: [Extended Expressions: Conditions and actions | Doc Expressions]