Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add NewFSMFromTemplate #89

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

add NewFSMFromTemplate #89

wants to merge 6 commits into from

Conversation

sjqzhang
Copy link

@sjqzhang sjqzhang commented Jul 30, 2022

suppor create from template

template := `
1=New
2=Ready
3=Waiting
4=Running
5=Terminated
Admitted:1->2
Dispatch:2 -> 4
Interrupt:4->2
InputOutputoreventwait:4->3
InputOutputoreventcompletion:3->2
Exit:4->5
`

format as follow:

//for example:
action1:state1 -> state2
action2:state12-> state3
action3:state13-> state2

@maxekman
Copy link
Member

Great idea! Is there some accepted syntax/DSL for defining state machines that could be used instead?

@@ -7,7 +7,7 @@ import (
"context"
"fmt"

"github.com/looplab/fsm"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is obviously not accepted.

@maxekman
Copy link
Member

maxekman commented Oct 1, 2022

Please take some time to answer the question from July.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants