Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Causality problems with rule systems. #529

Closed
Heizelmann opened this issue Feb 10, 2015 · 2 comments
Closed

Causality problems with rule systems. #529

Heizelmann opened this issue Feb 10, 2015 · 2 comments
Labels

Comments

@Heizelmann
Copy link
Contributor

I have several problems with rules. Here is one of them:
Let's look at the following rule:

if $timerRemain gets updated and $timerRemain > 0 
    then set $timerRemain to ($timerRemain - 1) after 1s
  1. $timerRemain is initially 0 or below
  2. Now change it to a positve value. Nothing will happen
  3. Change it again to different positiv value. Now the rule will fire and counts down the variable
  4. $timerRemain reaches 0. The process doesn't stop as expected by the rule
  5. $timerRemain reaches -1. The process stops one step to late.

Alternativ:
3. b) Change it back to a value <= 0. The rule fires once.

I conclude that the change of the variable $timerRemain triggers the rule before its value of $timerRemain is updated.

@sweetpi
Copy link
Contributor

sweetpi commented Feb 12, 2015

I will look into that problem. Seems indeed that the "gets updated" event fires to early.

@sweetpi sweetpi added the bug label Feb 12, 2015
@Heizelmann
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants