/// <summary> /// 拼接当前流程至已存在流程后 /// </summary> /// <param name="id">编号</param> /// <param name="category">分类</param> /// <param name="flowEngine">新流程</param> public static void Concat(int id, FlowEngine newFlowEngine) { FlowManager flowMgr = FlowManager.Instance(); if (flowMgr.FlowExists(id)) { int index = 0; FlowEngine oldFlowEngine = flowMgr.Load(id); Step returnedStep = FindLastReturned(oldFlowEngine); if (returnedStep == null) { return; } SetDisableAtReturned(oldFlowEngine, returnedStep); foreach (var step in oldFlowEngine.FlowSteps) { newFlowEngine.Insert(step, index++); } } }