@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016 the original author or authors.
|
||||
* Copyright 2016-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,6 +29,8 @@ import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
@Controller
|
||||
public class StateMachineController {
|
||||
|
||||
@@ -59,7 +61,10 @@ public class StateMachineController {
|
||||
}
|
||||
}
|
||||
listener.resetMessages();
|
||||
stateMachine.sendEvent(MessageBuilder.createMessage(event, new MessageHeaders(headers)));
|
||||
stateMachine
|
||||
.sendEvent(Mono.just(MessageBuilder
|
||||
.createMessage(event, new MessageHeaders(headers))))
|
||||
.blockLast();
|
||||
}
|
||||
model.addAttribute("states", stateMachine.getState().getIds());
|
||||
model.addAttribute("messages", listener.getMessages());
|
||||
|
||||
Reference in New Issue
Block a user