diff options
-rw-r--r-- | workflow.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/workflow.go b/workflow.go index 89d5459..f079e6c 100644 --- a/workflow.go +++ b/workflow.go @@ -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 |