Comments (5)
Hello, you are welcome) Your case looks like ChoiseState, have you tried it?
https://nsk90.github.io/kstatemachine/#:~:text=in%20machine%20behaviour.-,Choice%20state,-Choice%20state%20allows
from kstatemachine.
How can a ChoiceState be used as an initial state, and will it emit the state to the flow?
Can you show an example?
Thanks!
from kstatemachine.
Oops looks that choiceState as initial state is not supported.
Here is a test:
https://github.com/nsk90/kstatemachine/blob/b9c09c9e9b82015199b740680562dd79e612f745/tests/src/commonTest/kotlin/ru/nsk/kstatemachine/ChoiceStateTest.kt#L59
I dont remember why, should check the reason.
from kstatemachine.
Currently the library, does not resolve such complex redirections (like joinState) on entering into initial state path.
As this may lead to purely configured machine structure. I will see if I can implement this in new version.
I recommend using your current solution as workaround.
from kstatemachine.
now ChoiceState can be used in initial state path. The StateMachine will check it and redirect to calculated state.
from kstatemachine.
Related Issues (20)
- Update Data of a DataState HOT 4
- data transition should no be self targeted, use simple transition instead HOT 2
- please add choiceDataState method HOT 3
- java.lang.IllegalArgumentException: Cannot set current state in child mode PARALLEL HOT 1
- State machine and Android lifecycle HOT 6
- Export to PlantUml: GuardedTransitionOnBuilder are not drawn in diagram HOT 4
- Sources are not packaged correctly HOT 2
- app crash when sending multiple events at once(through for loop) HOT 11
- Versions HOT 3
- State, transition names HOT 10
- Getting crash if I try to use `machine.startBlocking` from machine created with `createStdLibStateMachine` HOT 3
- Support wasmJs HOT 6
- Clarification of concurrency HOT 5
- Event queue is not empty, internal error HOT 5
- Need explanation for choice states HOT 3
- Data validation and transformation via events or state HOT 4
- How to do parallel data states? HOT 2
- Initial Choice State as Nested State of Data State HOT 3
- Implement Intellij visualisation plugin
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kstatemachine.