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
- Redirect inside java interceptor
- Spring RestTemplate passing the type of the response
- spring-integration-dsl-groovy-http return null when i use httpGet method
- Custom Spring annotation for request parameters
- Spring - configure Jboss Intros for xml with java config?
- HTTP Status 404 - Not Found in Spring 3.2.7
- AndroidAnnotations how to use setBearerAuth
- android I/O error: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found
- Show login dialog when not authenticated yet
- Spring Data Rest supporting json and xml
- @Value annotation not resolved in a class that belongs to dependency jar
- Remove nested _embedded fields while using projections
- How to send Rest GET request that contains "#" value in url parameters?
- How to inject spring bean into Validator(hibernate)
- How to keep a variable in the URL when using Spring LocaleChangeInterceptor
Related Questions in STATE-MACHINE
- Calling prepare() after stop() on MediaPlayer throws IllegalStateException
- Game State Implementation Using Protocol And Base Class
- UML state machine: Conflict AFTER choice
- Opengl - Is glDrawBuffers modification stored in a FBO? No?
- peter-murach/finite_machine restore persisted state
- Finite State Machine In C
- Rails 5 - using Pundit Scopes with Statesman state machine: structurally incompatible?
- How define external function call within a guard of state machine in EA
- Bisimulation in state transition system
- How to handle error in event machine using transitions gem on rails?
- Spring State Machine - How many should I create?
- Can't get simple Bit Sequence Recognizer circuit to work (FSM)
- Meta State Machine (Boost) in embedded applications
- Why is it not possible to construct a finite state machine in this case?
- In a UML2 state chart, how to model a condition that might already be active or is triggered?
Related Questions in STATE-MACHINE-WORKFLOW
- Error handling when using a state machine
- OperationContext in State Machine Workflows (WF 4.5)
- How to implement state transition involving multiple states
- How to send events to Windows Workflow 4 state machine to advance state?
- Is it possible to modify the definition of a state machine windows workflow programmatically?
- Is there a function for getting the parent state value when in a compounded state (hierarchical state) in xState?
- state_machine gem integration with rails 4
- Is it a good idea to run workflows created using windows workflow foundation in asp.net mvc environment?
- Persistent Sessions in Meteor
- Get all the failed executions of a state machine in AWS Step function and execute dynamically. (In java)
- Independent subtates in a state machine
- Testing Receive Activities in WF4 State Machine
- Show the history of a State Machine/Workflow
- State Machine WF: Issues with workflow termination
- How do I create dynamic definitions for state machine based on user defined data in DB
Related Questions in SPRING-STATEMACHINE
- problems running state machine examples
- How do I know if a guard rejected a transistion
- Spring State Machine - How many should I create?
- How can I be notified about State Machine Completion?
- BeanNotOfRequiredTypeException when using spring-statemachine and spring cloud slueth
- Eclipse (STS) Welcome dash board error - I am unable to locate welcome dash board
- Using 2 different Papyrus UMLstatemachines with the spring-statemachine project
- Websphere | Spring State Machine | UML Error loading
- Correct way of injecting a repository or service into Spring statemachine Action and Guard
- Spring State Machine send-event returns true when guard is false
- Spring boot state machine Perform some actions before evaluating guards
- When to Use sendEvent in Services vs. Actions in Spring State Machine
- How to use Spring State Machine on the dynamic events
- Spring Statemachine: how to handle two transitions that has the same source state?
- How to get the current substate and the parent state out of the Spring Statemachine?
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 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.