diff options
author | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2020-07-15 16:08:05 +0300 |
---|---|---|
committer | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2020-07-15 16:08:05 +0300 |
commit | 2b10929c48977b72453a6e3bacb18af7d3d13dfe (patch) | |
tree | a280e6e6b0d613f01c323c7b4500c6bf52053fd6 | |
parent | 083fa85ee5301f3e330510e7ea1a279d4f47c208 (diff) |
Added mergev1.0.1
-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 |