I have added a module for visualising the finite s...
# opensource
c
I have added a module for visualising the finite state-machine definition as both a plantuml state diagram and an asciidoc table. https://github.com/open-jumpco/kfsm-viz
👍 2
j
this is incredible. is there a bigger tool framework this is aimed at? or at leaszt a gradle/maven plugin for the home gamer?
c
I am working on the gradle plugin for generating the visualisations should not be too long now.
The main aim with KFSM is support all Kotlin platforms. The gradle plugin will obviously be able to render any of the definitions because it parses the code in question in order to obtain the full lambdas for actions and guard expressions.
This example still uses a unit test to generate the diagram. https://github.com/open-jumpco/kfsm-samples
j
i noticed the fsm's being drawn conform to a convention. fwiw i'm in agreement with what i know of it so far. is there any genre of coding that applies to the conventions?
c
Go look at the samples to see how to define and use the FSMs. KFSM provides a DSL for defining an FSM which you can then instanciate and use. In some case like UI you may want to keep the FSM instance active. In the backend you want to externalise the state and supply the state when instanciating the FSM before use.
There are samples for Spring MVC and Spring REST with HATEOAS and then browser with pure Kotlin/JS and one where Javascript is invoking FSM.
j
@raulraja ^
👍 1
c
I'll be finalizing and publishing the gradle plugin this weekend.
r
Amazing work @corneil! Thanks for sharing and thanks for the mention @jimn
c
Any input would be welcome
Hi @raulraja if you have some time I would really appreciate some feedback from someone wear a functional hat.
r
Hi @corneil, just saw your message, I'll DM you on slack