Skip to content

Commit

Permalink
Merge pull request FlexBE#19 from Deleh/fix/concurrent_container_outc…
Browse files Browse the repository at this point in the history
…omes_check

Throw Error if Concurrent Container has Outcome `preempted`
  • Loading branch information
fmessmer authored Jul 17, 2023
2 parents 66224db + 214576a commit eff8d3f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/_helper/checking.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ Checking = new (function() {
return "state machine " + statemachine.getStatePath() + " has no initial state";
}

if (statemachine.isConcurrent() && statemachine.getOutcomes().contains("preempted")) {
return "state machine " + statemachine.getStatePath() + " has outcome 'preempted' which is not permitted for concurrency statemachines";
}

for (var i = 0; i < states.length; i++) {
var error_string = undefined;
if (states[i] instanceof Statemachine) {
Expand Down

0 comments on commit eff8d3f

Please sign in to comment.