spring-statemachine icon indicating copy to clipboard operation
spring-statemachine copied to clipboard

spring-statemachine-core 3.0.0 | StateMachineReactiveLifecycle sendEvent deprecated, in favor of?

Open patpatpat123 opened this issue 4 years ago • 1 comments

Hello Spring state machine team,

Thank you for the release of 3.0.0 for spring-statemachine-core.

StateMachine<RefundState, EventTransitionFromPartner> stateMachine .sendEvent(MessageBuilder.withPayload(transitionEvent).build());

is now deprecated.

Unfortunately, the doc does not tell in favor of what it is deprecated. An update of the doc, or examples for conversion would help.

Thank you

patpatpat123 avatar Apr 14 '21 08:04 patpatpat123

Looks like it's fixed already. Using v3.0.0 currently:

	/**
	 * Send an event {@code E} to the region.
	 * <p>
	 * NOTE: this method is now deprecated in favour of a reactive methods.
	 *
	 * @param event the event to send
	 * @return true if event was accepted
	 * @deprecated in favor of {@link #sendEvent(Mono)}
	 */
	@Deprecated
	boolean sendEvent(E event);

AleksandrRadchenko avatar Jul 12 '21 11:07 AleksandrRadchenko