otrosien / spring-statemachine-jpa-and-rest

Sample project using Spring-Statemachine, JPA and Spring Data REST
https://otrosien.github.io/spring-statemachine-jpa-and-rest/html5/api-guide.html
91 stars 44 forks source link

Trying to adapt for UmlStateMachineModelFactory #5

Open nicolasduminil opened 5 years ago

nicolasduminil commented 5 years ago

Hi, I'm trying to adapt this code such that to use a state machine externally defined with Papyrus plugin for Eclipse. So, instead of defining the configuration (states, transitions, events, etc.) in the code, I'm defining them using this plugin and I'm loading the resulting UML file using the UmlStateMachineModelFactory class. But then, in order to persist the state machine status, I need to use StateMachinePersister.persist(), which takes as its first argument the StateMachine instance. Generally, a StetMachine instance is obtained from a StatemachineFactory. But I' don't have a StateMachineFactory but a StateMachineModelFactory. And I don't find any way to get the StateMachineFactory from the UmlStateMachineModelfactory or its superclass StateMachineModelFactory. Could you pleas advise ?

Many thanks in advance, Nicolas DUMINIL

otrosien commented 3 years ago

Hey, sorry for not responding earlier. This was just a toy project of mine a few years ago. You might want to reach out to
Janne Valkealahti, the maintainer of Spring Statemachine. He was also very helpful back when I had questions.