zhfeng commented on code in PR #9344:
URL: https://github.com/apache/camel/pull/9344#discussion_r1106505254


##########
core/camel-support/src/main/java/org/apache/camel/saga/InMemorySagaCoordinator.java:
##########
@@ -75,6 +75,13 @@ public String getId() {
 
     @Override
     public CompletableFuture<Void> beginStep(Exchange exchange, CamelSagaStep 
step) {
+        Status status = currentStatus.get();
+        if (status != Status.RUNNING) {
+            CompletableFuture<Void> res = new CompletableFuture<>();
+            res.completeExceptionally(new IllegalStateException("Cannot begin: 
status is " + status));
+            return res;
+        }
+

Review Comment:
   Sure and thanks for pointing the src directory out. I was thinking about a 
test case but have not find the right place.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to