diff options
Diffstat (limited to 'subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/rule/BoundPropagationRule.java')
-rw-r--r-- | subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/rule/BoundPropagationRule.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/rule/BoundPropagationRule.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/rule/BoundPropagationRule.java index 6e6a78d2..a70292ad 100644 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/rule/BoundPropagationRule.java +++ b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/propagation/impl/rule/BoundPropagationRule.java | |||
@@ -13,10 +13,12 @@ import tools.refinery.store.query.ModelQueryAdapter; | |||
13 | import tools.refinery.store.query.resultset.ResultSet; | 13 | import tools.refinery.store.query.resultset.ResultSet; |
14 | 14 | ||
15 | class BoundPropagationRule { | 15 | class BoundPropagationRule { |
16 | private final Model model; | ||
16 | private final ResultSet<Boolean> resultSet; | 17 | private final ResultSet<Boolean> resultSet; |
17 | private final BoundAction action; | 18 | private final BoundAction action; |
18 | 19 | ||
19 | public BoundPropagationRule(Model model, Rule rule) { | 20 | public BoundPropagationRule(Model model, Rule rule) { |
21 | this.model = model; | ||
20 | resultSet = model.getAdapter(ModelQueryAdapter.class).getResultSet(rule.getPrecondition()); | 22 | resultSet = model.getAdapter(ModelQueryAdapter.class).getResultSet(rule.getPrecondition()); |
21 | action = rule.createAction(model); | 23 | action = rule.createAction(model); |
22 | } | 24 | } |
@@ -27,6 +29,7 @@ class BoundPropagationRule { | |||
27 | } | 29 | } |
28 | var cursor = resultSet.getAll(); | 30 | var cursor = resultSet.getAll(); |
29 | while (cursor.move()) { | 31 | while (cursor.move()) { |
32 | model.checkCancelled(); | ||
30 | var result = action.fire(cursor.getKey()); | 33 | var result = action.fire(cursor.getKey()); |
31 | if (!result) { | 34 | if (!result) { |
32 | return PropagationResult.REJECTED; | 35 | return PropagationResult.REJECTED; |