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 CanceledByAdmin1,CanceledByAdmin2 and CanceledByAdmin3. Should I make them substate of Cancel state or create three different states? Keeping in mind that all canceled states are the final states and independent of each other, I don't know if making substates does anything other than simplifying the paper diagram. Any help would be appreciated.
Independent subtates in a state machine
433 Views Asked by user At
1
There are 1 best solutions below
Related Questions in SPRING
- HTTPS configuration in Spring Boot, server returning timeout
- Multi Tenancy in Spring - Partitioned Data Approach
- How to create beans of the same class for multiple template parameters in Spring
- org.telegram.telegrambots.meta.exceptions.TelegramApiException: Bot token and username can't be empty
- Springboot: How to get an entity optional property and check null?
- How do I propagate the current SecurityContext to my @RabbitListener in Spring Boot?
- Spring's XML based bean configuration for Object Mapper's Case Insensitive property
- Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. I'm using Postgresql
- springboot class org.hibernate.mapping.Bag cannot be cast to class org.hibernate.mapping.SimpleValue
- Issue while deploying JDK 17 and Spring 6 application in Tomcat 10.1.20
- Spring JPA Data Auditing - How to design it?
- Springframework test: Async not started
- Error: Cannot invoke "jakarta.servlet.http.HttpSession.getAttribute(String)" because "session" is null
- How does spring-retry determine which methods to retry when @Retryable is placed at the class level?
- problem with edge server registration in Eureka
Related Questions in STATE-MACHINE
- Filtering output on AWS State Machine
- send as event name causes stack level too deep after Ruby 3.2 and Rails 7.0 upgrade
- A state-machine event (signal/trigger) implementation question
- Unexpected behavior Spring state machine JOIN
- a challenging finite automata - what is the language?
- AWS Step Function JsonMerge new data
- Problem with generic abstract classes and their constructors
- Is there a way to pass the value of a current iteration to the next state in state machine
- Simulink transitions and superstates, will you go back to the outside state?
- GMock / Virtual Functions / Boost MSM how to correctly combine?
- Typescript state machine that prevents dis-allowed transitions with compile errors
- How to change struct member enum's variant to another, moving the value?
- How to inject custom state machine into Spring Authorization Server to complete authentication in multiple steps
- How to simulate a finite state machine in vhdl
- When to Use sendEvent in Services vs. Actions in Spring State Machine
Related Questions in STATE-MACHINE-WORKFLOW
- AWS StepFunction: Adding new column to the summary
- How to give values with array of objects as input to a step function input?
- RedisStateMachinePersister is not persisting StateMachine with Redis
- step-functions-local: Can't start state machine within state machine
- How do I determine, at the earliest, if an AWS step function state has failed?
- Is there a function for getting the parent state value when in a compounded state (hierarchical state) in xState?
- Get all the failed executions of a state machine in AWS Step function and execute dynamically. (In java)
- AWS Step Functions: How to access the input of the state that generated an exception in a catch block?
- I am trying to implement spring state machine and in each state transition wanted to reply to user before moving from state A to State B
- Spring state machine configuration for rest service requests
- Spring webflow, spring state machine and HTML5
- State Machine Workflow Approve/Reject Buttons on Edit page
- Independent subtates in a state machine
- Error handling when using a state machine
- Can we have more than one trigger between two states in a State Machine?
Related Questions in SPRING-STATEMACHINE
- Statemachine core 4.0.0 ( Executing eventNotAccepted method)
- Unexpected behavior Spring state machine JOIN
- SpringBoot 3.2- BaseStateMachineListener (eventNotAccepted in log instead of LifecycleObjectSupport )
- Send Event and retrieve resulting state to Spring StateMachine
- How to persist Spring State Machine with other machineId
- When to Use sendEvent in Services vs. Actions in Spring State Machine
- java.lang.IllegalStateException: Unable to retrieve @EnableAutoConfiguration base packages
- Integrating Spring State Machine in a Hexagonal Architecture
- Spring boot state machine Perform some actions before evaluating guards
- How to persist the state in the db as part of the entry to each state in spring state machine?
- How to add a reactive guard to a spring state machine external configuration?
- Listen state change in reactive spring state machine
- persist actions and transitions with EnumStateMachineConfigurerAdapter
- StateMachine get Object for Test
- Spring statemachine redis - configure ttl
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
What comes for
Spring Statemachinewe can have only one terminate state and trying to make that as collection of substates is a bit awkward because once you enter it, state machine should stop all processing. Thought this area is something what I've probably overlooked and could try to enhance things.While you could probably have a state
S1having three substatesS11/S11E,S12/S12EandS13/S13Ewith triggerless transition fromS11toS11Eand same with other substates, even this feels a bit weird because none of those would actually terminate root state machine.I guess question is what you're trying to accomplish?
If you only want to keep that information around who/which cancelled the order, could you use a simple single terminate state and during a transition to that terminate state, add/modify extended state variables with this info.
Extended state variablesare usually used to overcome these problems of suddenly having astronomical count of states to keep arbitrary information around. I know that in this example you only have three, but what about if you have 10, or 100? If you actually need to add even one more, you need to change state machine configuration and recompile. With extended state variables you would not need to do that.