1) Command:

//insert a new task node named task004 before task 003(Package Books)

pmb.Insert( "003" , ActivityTypeEnum.TaskNode, "task004" , "004" )

Parameters: (currentActivityCode, addActivityType, addActivityName, addActivityCode)

Explanation: The Insert() method adds a new node in front of the current node, and continues to keep the newly added node on the connection line of the process.

2) Graphical example after command execution:

https://img2018.cnblogs.com/blog/808949/201911/808949-20191128203425239-1398461738.png