Branch node creation: Split()
Branches and merges are usually created as a whole code fragment, as shown below, a flow chart of two branches is created, and there are two task nodes on each branch. The complete code fragment example is as follows:
pmb.Split("split")
.Parallels(
() => pmb.Branch(
() => pmb.Task("task-010"),
() => pmb.Task("task-011")
)
, () => pmb.Branch(
() => pmb.Task("task-020"),
() => pmb.Task("task-021")
)
)
.Join("join")
The graphic screenshot is as follows:
1) Split (): Create branch nodes
Parameters: (activityName, activityCode)
2) Parallels (): external method to create multiple branches
parameter:
(params Func<ProcessModelBuilder>[] branches)
Description: Parameter branches represents a combination of branch lists. A parallel mode can be composed of multiple branches. Params represents a variable parameter list keyword.
3) Branch (): specific branch creation method
parameter :
( params Func<ProcessModelBuilder>[] nodes)
Description: The parameter nodes represents the combination of node lists. A branch can consist of multiple nodes. params represents the variable parameter list keywords.
4) Join (): Create a merge node
Parameters: (activityName, activityCode)
Note: Merges and branches usually appear in pairs to express decision-making branch selection patterns.