Hi Dave,
Why? The correct, standard way to do disjunctions in rule systems is to have multiple rules. Stick with that approach. Yep, I understand, but the problem is that the number of rules will get quite high with this approach depending on the configuration of the disease modeled. The only rule that that initializes the counter is: rule_dX_NOT_REST_SIGNS which (a) only fires if there is a finding other than sA to sE and (b) asserts your ont:dX_NOT_SIGNS flag. So the only situation in which there is a zero counter to get the counting started is one where you have some other finding and even then those counting rules will never fire because they are guarded by: noValue(?i, ont:hasNegSign ont:dX_NOT_SIGNS) If they did fire than be aware that the counting rules you have do not remove the older counts (the painful bit of counting in JenaRules) so you'll end up with all the count values not a single total value. I saw.. I've been working on this, and I've modified the rules. From my POV are correct, but probably I'm missing something since the new approach is not working: http://pastebin.com/EGB2s2YK I've created a rule to init the counter when a sign is received and the counter doesn't have any value (I'm using value 4 as an example, but I have also tried with noValue builtin), but it doesn't work. I've also modified the rule where the counter is increased, not checking the flag dX_NOT_SIGNS (only is checked in diagnosis). The workflow should be (if I'm not wrong): 1. Check if there is any forbidden sign (allowed: sA to sE). If there is any forbidden sign, set flat dX_NOT_SIGNS 2. Init the counter when: you received a sign & counter != 4 3. Increase counter when you receive sC 4. Return dX as diagnosis: we have as input sA & sB & counter >= 1 & dX_NOT_SIGNS flag is not set