public static void MoveToAndSaveNextActivityWithDefSelectTranstion(OguObject oguObject, IWfProcess process) { IWfActivityDescriptor nextActivityDesp = process.CurrentActivity.Descriptor.ToTransitions.FindDefaultSelectTransition().ToActivity; WfTransferParams transferParams = ProcessTestHelper.GetInstanceOfWfTransferParams(nextActivityDesp, oguObject); process.MoveTo(transferParams); WfRuntime.PersistWorkflows(); }
/// <summary> /// 获取下一节点的参数实例 /// </summary> /// <param name="nextActivityDesp">下一个节点的流程描述</param> /// <param name="oguObject">传入人员的名称</param> /// <returns></returns> public static WfTransferParams GetInstanceOfWfTransferParams(IWfActivityDescriptor nextActivityDesp, OguObject oguObject) { WfTransferParams tp = new WfTransferParams(nextActivityDesp); IUser user = (IUser)OguObjectSettings.GetConfig().Objects[oguObject.ToString()].Object; tp.Assignees.Add(user); return(tp); }
/// <summary> /// 获取下一节点的参数实例 /// </summary> /// <param name="nextActivityDesp">下一个节点的流程描述</param> /// <param name="oguObject">传入人员的名称</param> /// <returns></returns> public static WfTransferParams GetInstanceOfWfTransferParams(IWfActivityDescriptor nextActivityDesp, OguObject oguObject) { WfTransferParams tp = new WfTransferParams(nextActivityDesp); IUser user = (IUser)OguObjectSettings.GetConfig().Objects[oguObject.ToString()].Object; tp.Assignees.Add(user); return tp; }