Skip to content

Omiting calling on_enter and on_exit callbacks, if origin and target state is the same (reentrant state) #698

Answered by aleneum
nadlechSICKAG asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, I noticed the internal states, but this is not exactly what I am looking for.

Could you specify what you are looking for? If you are looking for transitions that can execute callbacks before and after a trigger has been called but do not exit or enter a state then I'd say internal transitions are what you are looking for. An 'external' transition is the default transitions type (we tried to follow state chart SCXML behaviour here; Section 3.5) should exit a state and enter a state, regardless of their source and destination.

So if you want a trigger to act as an internal transition when in the target state but different when not you could do something like the following:

machine.ad…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@nadlechSICKAG
Comment options

@aleneum
Comment options

Answer selected by nadlechSICKAG
@nadlechSICKAG
Comment options

@aleneum
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants