Added merge

This commit is contained in:
Alexander Kiryukhin 2020-07-15 16:08:05 +03:00
parent 083fa85ee5
commit 2b10929c48

View file

@ -90,5 +90,14 @@ func (w *Workflow) DumpToDot() []byte {
return buf.Bytes()
}
// Merge another workflow to current
func (w *Workflow) Merge(workflow *Workflow) {
for from, tos := range workflow.transitions {
for _, to := range tos {
w.AddTransition(from, to)
}
}
}
// Place is one of state
type Place string