Rules

Top  Previous  Next

A rule is an entity tested to determine when a certain condition is verified.

Rules are Java objects subclassed from the abstract class com.hite.xbm.chains.Rule and user may define its own rules (see plugin chapter).

Following rules are supplied by default with XBM:

Class name

Verified if

Parameters

com.hite.xbm.chains.RuleTrue

Always  

 

com.hite.xbm.chains.RuleFalse

Never (causes rules checking to stop)  

 

com.hite.xbm.chains.RuleIsFault

an item faults

item name(1)

com.hite.xbm.chains.RuleIsNormallyTerminated

an item terminates normally

item name(1)

com.hite.xbm.chains.RuleReturnCode

an item RC matches condition

item name(1) condition (<, >, =, !=, IN) value

(1)     if "*" is specified any item matches selection.

IN condition allows to check more than one possible value, simply specifying one or more values delimited by "," (comma) or ranges, delimited by "-" (minus).

I.e.

IN 3,8

return true if RC = 3 or RC = 8

IN 3-8

return true if RC >= 3 and RC <=8

IN 5,8-12,20

return true if RC = 5 or (RC>=8 and RC<=12) or RC=20