Added merge
This commit is contained in:
parent
083fa85ee5
commit
2b10929c48
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue