-
Notifications
You must be signed in to change notification settings - Fork 73
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
execute() is called just once for the first state of a concurrent container #87
Comments
Good catch, thanks for reporting! The bug was indeed introduced by the commit you mentioned and appeared to be caused by the fact that sleep mechanism of the concurrency container was called incorrectly. In fact, in your example, always the sleep function of the rate object of the first state is called, irrespectively of which state executes. That's the reason why the first state always had a positive sleep time. Can you take a look at the PR #88 and verify whether the fix works as you would expect? Thanks! |
Thank you for the quick solution. I can confirm that the fix works as expected. |
I ran into the same issue yesterday and I can also confirm the fix above works. |
Works like a charm. Issue can be closed I think |
The
execute()
function of the concurrent's first state (the one where the initial state dot is connected to) is called just once.Example root:
![image](https://user-images.githubusercontent.com/483721/69076594-1e3b4780-0a34-11ea-9ea6-f9ba12d7c367.png)
Example concurrent container:
![image](https://user-images.githubusercontent.com/483721/69076657-34e19e80-0a34-11ea-84dc-35f9939eae01.png)
The concurrent container does have three wait states.
wait_1
which will wait for one second.wait_2
wait's for two seconds andwait_3
for three seconds. The expected behavior would be afinished
outcome of the container.wait_1
should result indone
after one second and the concurrent container should preempt the other two wait's. But that is not the case. After two secondswait_2
finishes and triggers the failed outcome of the concurrent container.I could track the problem a bit down and believe that the bug was introduced in f4bf981. First concurrent state's remaining-sleep-duration will always be above 0 after the first run. So the execute will never get called again...
test_behaviors.tar.gz
The text was updated successfully, but these errors were encountered: