Questions tagged [spring-statemachine]

Spring Statemachine is a framework for application developers to use state machine concepts with Spring applications.

Spring Statemachine aims to provide following features:

  • Easy to use flat one level state machine for simple use cases.
  • Hierarchical state machine structure to ease complex state configuration.
  • State machine regions to provide even more complex state configurations.
  • Usage of triggers, transitions, guards and actions.
  • Type safe configuration adapter.
  • State machine event listeners.
  • Spring IOC integration to associate beans with a state machine.

See also

Spring Statemachine Project Page

283 questions
0
votes
1 answer

NullPointerException in AbstractStateMachine.java:591 if using Builder

the following code throws me a NPE, i've no idea what's going wrong. I cannot find the code that is initializing the currentState. Can anybody help? public class TestSMApplication { StateMachine buildMachine1() throws Exception { …
Fredy
  • 21
  • 3
0
votes
1 answer

Create a StateMachineInterceptor to persist StateMachineContext

I'm struggling to persist my state machine following the recipes and examples available. I'm working with the master branch and my state machine uses Hierarchical States, Regions and Orthogonal states. The first example I followed is…
0
votes
1 answer

Error Handling when using annotations

I'm following the documentation (State Machine Error Handling) to implement error handling. However, when an exception occurs it is propagated up rather than intercepted. I tried using the interceptor, the listener and the @OnStateMachineError…
0
votes
2 answers

Spring State Machine task execution not firing

I am having issues with getting a runnable to run in the manner described in the following reference: http://docs.spring.io/autorepo/docs/spring-statemachine/1.0.0.M3/reference/htmlsingle/#statemachine-examples-tasks TasksHandler handler =…
Kurt Clauss
  • 73
  • 1
  • 2
  • 11
0
votes
1 answer

Spring state machine builder using StateTransition object

I couldn't find any reference with this functionality. Shall I just implement a helper method in the builder to read fields in StateTransition object and populate the chain configureTransition() call by myself?? Just to confirm not to reinvent the…
flymelody
  • 13
  • 2
0
votes
2 answers

Get StateContext in @OnTransition annotated method

In the Spring Statemachine reference doc is this sample code: @WithStateMachine static class Bean1 { @OnTransition(source = "S1", target = "S2") public void fromS1ToS2() { } } Is it possible to access the StateContext object from a…
Paul
  • 19,704
  • 14
  • 78
  • 96
0
votes
2 answers

Spring statemachine Persist recipe with two state machine configurations

I am trying to extend the Persist sample of spring statemachine to two different state machine configurations. http://docs.spring.io/spring-statemachine/docs/1.0.0.RELEASE/reference/htmlsingle/#statemachine-examples-persist Therefor I added a new…
user5545707
0
votes
1 answer

Session scope spring statemachine

I am developing a big eCommerce application, and i think this project may be a perfect fit for the checkout process. i just read the documentation but still have some little questions... 1- Can i have StateMachine created and injected in session…
Joseph
  • 3,085
  • 3
  • 23
  • 33
0
votes
1 answer

Independent subtates in a state machine

I need some suggestions. I am trying to implement an online order process through Spring state machine and am trying to construct a state diagram before I get to work. Now say my order can be canceled by three different admin users…
0
votes
2 answers

problems running state machine examples

Congratulations on the spring state machine, I found it yesterday and have been trying it out, specifically the turnstile example running in STS. I found it very easy and intuitive to build a FSM. Because spring shell doesn't work well in STS I…
stephen newman
  • 533
  • 4
  • 17
-1
votes
1 answer

Global transition/actions in Spring state machine

Is there a way in which I can define global transitions/actions on a Spring state machine? The expectation is, I'll not be transitioning to any other state. But just accept the event and perform the action and stay in the current state.
Kannan Ramamoorthy
  • 3,980
  • 9
  • 45
  • 63
-1
votes
1 answer

Spring State Machine

public void configure(StateMachineConfigurationConfigurer config) throws Exception { config .withConfiguration() .machineId("test") .autoStartup(false) .listener(listener()); …
Arpit Pandey
  • 69
  • 1
  • 4
-2
votes
1 answer

Does Spring Statemachine support Java 17 or above?

Does Spring Statemachine support Java 17 or above? Their documentation says that the supported version is Java 8. However, the library dependency does seem to compile in a Java 17 environment. I am new to this library and haven't used a lot of its…
1 2 3
18
19