canoe icon indicating copy to clipboard operation
canoe copied to clipboard

Only one scenario

Open Masynchin opened this issue 3 years ago • 4 comments

From the README:

Scenarios are executed concurrently in a non-blocking fashion, allowing to handle multiple users at the same time. In fact, even the same scenario can be triggered multiple times before the previous execution is completed.

Can I forbid start of the new scenario if previous isn't completed?

Masynchin avatar Aug 05 '22 07:08 Masynchin

I can suggest you to use the stopWith/stopOn method in the Scenario class, where the stop condition will be some message from the beginning of another scenario. I hope this will be enough for your task

mikabele avatar Aug 08 '22 11:08 mikabele

stopWith/stopOn method in the Scenario class, where the stop condition will be some message from the beginning of another scenario.

But in this case new scenario can start before previous was ended, or I am not right?

Masynchin avatar Aug 08 '22 18:08 Masynchin

stopWith/stopOn method in the Scenario class, where the stop condition will be some message from the beginning of another scenario. But in this case new scenario can start before previous was ended, or I am not right?

yes, they will start in parallel, but in this case the old scenario will not go further and immediately stop and the new one will continue to work. I agree that it may happen that these 2 scenarios simultaneously send a message to the user (for example, the old script will report that something went wrong, and the new one will ask the user to enter something), but I have not yet found a better solution.

mikabele avatar Aug 09 '22 14:08 mikabele

the old scenario will not go further and immediately stop and the new one will continue to work

No, I don't want that the new one can start until previous was ended. And I don't want that the new scenario can stop previous, I want that the new scenario can start only after the old one was naturally finished.

Masynchin avatar Aug 09 '22 14:08 Masynchin