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

Intermittent "IllegalArgumentException: Source must be set" from hierarchical spring state machine

I'm trying to build a hierarchical state machine with spring-statemachine. It should have two orthogonal states each representing the state of two services. The following code has a reduced number of states for simplicity but the same error still…
antonbasic
  • 33
  • 7
0
votes
0 answers

Spring Statemachine context variables not updating in action

I am having some problems with Spring statemachine + Spring boot application. I am using Redis for persistence, as in Event service demo. I have one action which is executed when state machine enters state 'VALIDATION'. In it, I modify extended…
glevacic
  • 3
  • 5
0
votes
2 answers

Using StateMachineFactory from PersistHandlerConfig

We are doing a POC with SSM using PersistHandlerConfig (Persist recipe). It looks good, but some other questions appeared. Since it needs to be a multi user webapp with a single instance per user, we was trying to follow the StateMachineFactory…
Ruben Trancoso
  • 1,444
  • 5
  • 27
  • 55
0
votes
1 answer

Spring Statemachine persister for spring data

We are currently investigating spring state machine and we have a very similar need to the eventservice sample with a pool and context switching using a repository, the only problem is redis is linux only (for production) and we can not lean on…
jvice
  • 3
  • 2
0
votes
1 answer

Spring Statemachine - building hierarchical state machine from UML

Short: Is it possible to create hierarchichal (nested) statemachine UML diagram in Papyrus and then use it to build working statemachine instance? Explained: Simple example without nested states, as in documentation, is working correctly. I tried…
glevacic
  • 3
  • 5
0
votes
1 answer

How to achieve implementation dependend transition guards for a Spring statemachine provided in a library?

I provide a Spring statemachine with basic program states in a library as base for different implementations. Adding custom transition actions depending on the current implementation using the basic statemachine, seems to be easy because of the…
AntiTiming
  • 2,094
  • 3
  • 22
  • 33
0
votes
1 answer

spring state machine changing to one of two possible states based on action

i'm having trouble configuring my SSM for a very simple scenario: the culprit is the 'validation' action that needs to happen when the log_on event is fired. i re-read the SSM documentation and am not sure if this is a 'fork', 'guard' or a…
maspen
  • 301
  • 1
  • 6
  • 17
0
votes
2 answers

Show events available in the given state?

I am trying to find a way to render UI buttons (actions) depending on the object state. Is there a way to ask the state machine: "show me events that are applicable for a given state ?" Example of confguration: public class…
Peter
  • 566
  • 4
  • 14
0
votes
1 answer

Handling code/configuration error from entry action classes in spring state machine

I am using a state machine builder to build state machine in my app. Also the application has Action classes which implements org.springframework.statemachine.action.Action. These Action classes are for executing entry actions for each stages. If…
user2330825
  • 77
  • 2
  • 9
0
votes
1 answer

can spring state machine be triggered from an external entity

we have a project where SSM seems like a viable option. the question i have is whether SSM can be triggered from an external source. the documentation talks about 'local' vs 'external' transitions but, to me, this is talking about a hierarchical…
maspen
  • 301
  • 1
  • 6
  • 17
0
votes
1 answer

spring state machine throws NullPointerException when you throw exception from your action

When I throw an exception from the custom action defined in the StateMachineConfigurerAdapter, any subsequent call to state machine throws NPE as it gets null currentState . My call to state machine is: PersistStateMachineHandler handler; …
krmanish007
  • 6,749
  • 16
  • 58
  • 100
0
votes
1 answer

spring state machine getting bean creation exception

My state machine was working fine but as soon as I added active-mq in my pom, I started getting null pointer exception while creating state machine factory at my configuration: @Autowired private StateMachineFactory
krmanish007
  • 6,749
  • 16
  • 58
  • 100
0
votes
1 answer

Need help for building state machine config

I was trying to build a config for the state diagram attached. Thr problem is I couldn't register entry actions to states in regions inside a fork. ie for states S41, S41E , S42, S42E. The config looks like below. Builder builder =…
user2330825
  • 77
  • 2
  • 9
0
votes
1 answer

False evaluation in a choice resulting in state machine being paused

The state machine pauses at the choice state when the evaluation inside the choice state returns false, instead of moving to the next state. Code below: States definition: @Override public void configure(StateMachineStateConfigurer
0
votes
1 answer

NullPointerException error in AbstractStateMachine.acceptEvent method

Below is my one class project, which is using spring-statemachine-core-1.0.2.RELEASE-sources.jar, which implements a simple transition from one state to another. It's coughing up null pointer exception on currentState in…
nanda
  • 13
  • 2
1 2 3
18
19