I don't know what question #1 was supposed to be. I can see that the line
($tmp>100)
is syntactically incorrect; the condition should be part of the preceding pattern or enclosed in eval().
Question #2: You can insert any number of facts and call fireAllRules(), or you can call fireAllRules() after each insertion. Note, however, that the result may not be the same. Consider a scenario, where a rule removes a fact X() as soon as it triggers on a single X, and where another rule triggers as soon as there are two facts of type X(). The second rule may never fire if fireAllRules() is called after each insertion,