Sachini Wickramaratne
Sachini Wickramaratne

Reputation: 599

Spring State machine - reuse Submachine

I have difficulty in re-using a sub-machine diagram.

I have a need to Re-Use one State machine that I have linked to a state as a sub-machine, in another state as a sub-machine. But when I give the reference to it I get a null pointer exception.

Refer image

enter image description here

I Have added a submachine reference to GeneralTopup, I want to add the same to Register. But it seems impossible. Is this so?

Upvotes: 3

Views: 775

Answers (1)

Janne Valkealahti
Janne Valkealahti

Reputation: 2646

This would not work as you need to have unique states in a whole machine and this would add same state multiple times. Having said that, it is a story what has been in my mind for a long time but I don't yet know how to implement it.

Upvotes: 2

Related Questions