Below find some explanations to what is required to write a rule.
A rule file consists of a group which contains one to many subgroups. Each subgroups contains one to many rules. Subgroups are connected using the intergroupoperator with values of "and" or "or". Rules are connected using the ruleoperator, again using "and" or "or".
Number 1) A name of a Java class is required. In case of the PDI step it is always the class shown below (RowFieldCollection)
Number 2) The name of the method of the class to be invoked. For Strings it is "getFieldValue", for Integers it is getIntegerFieldValue, for Booleans it is getBooleanFieldValue, etc.
Number 3) Together with the method goes the parametertype and parameter tags. The methods explained before expect the name of a field, so the parametertype is always "string" and the parameter is the name of the field against which you want to run the rule(s).
Number 4) The name of the check that is used. The rule engine comes with several checks to choose from. E.g. CheckIsEqual, CheckIsGreater, CheckIsNull, CheckIsNumeric, CheckContains, CheckMatches, CheckIsInList, CheckSoundLike, CheckStartsWith etc.
Just above the line there is a tag "expected" with the attribute "value". This is used when comparing a field against an expected value.
Number 5) A message text for both conditions if the rule fails or passes, that indicates, what happened. The variable $1 is the actual value found. The variable $0 is the expected value from the rule. These variables will be replaced with the real values during runtime.
Number 6) The ruleoperator indicates how the rules of one subgroup are connected by "and" or "or".
This is a quick intro. The detailed documentation shows all possible variations for writing rules and also gives examples, e.g. how to compare fields or how to w