public void AdjustBranches(WfAdjustBranchesParams adjustParams) { lock (this) { WfBranchProcessInfoCollection deletedBranchProcesses; AddBranchProcess(adjustParams.User, adjustParams.AddedBranchesParamsCollection); deletedBranchProcesses = DeleteBranchProcesses(adjustParams.DeletedBranchIDs); UpdateBranchesSort(adjustParams.SortBranchParamsList); FinalInitBranches(); this.OpState = State.Modified; WorkflowSettings.GetConfig().EnqueueWorkItemExecutor.EnqueueAdjustBranchesWorkItem(this, deletedBranchProcesses); } }