/// <summary> /// 构造函数 /// </summary> /// <param name="xml">字符串参数</param> /// <param name="isXmlFile">是否是xml文件</param> public ManualActivity(ConfigureElement parent, XElement xElem) : base(parent, xElem) { if (xElem == null) { Initilize(); return; } ActivateRule = new ActivateRule(this, xElem.Element("activateRule")); XElement manualElem = xElem.Element("manualActivity"); if (manualElem != null) { CustomURL = new ActionURL("customURL", this, manualElem.Element("customURL")); ResetURL = new ActionURL("resetURL", this, manualElem.Element("resetURL")); Participant = new Participant(this, manualElem.Element("participant")); TimeLimit = new TimeLimit(this, manualElem.Element("timeLimit")); MultiWorkItem = new MultiWorkItem(this, manualElem.Element("multiWorkItem")); var triggerEvents = manualElem.Element("triggerEvents"); if (triggerEvents != null) { var triggerEventlist = triggerEvents.Elements("triggerEvent"); if (triggerEventlist != null) TriggerEvents = triggerEventlist.Select(o => new TriggerEvent(this, o)).ToList(); } RollBack = new CustomAction("rollBack", this, manualElem.Element("rollBack")); FreeFlowRule = new FreeFlowRule(this, manualElem.Element("freeFlowRule")); } }
public override void Initilize() { base.Initilize(); ActivateRule = new ActivateRule(); CustomURL = new ActionURL(); ResetURL = new ActionURL(); Participant = new Participant(); TimeLimit = new TimeLimit(); MultiWorkItem = new MultiWorkItem(); TriggerEvents = new List<TriggerEvent>(); RollBack = new CustomAction(); FreeFlowRule = new FreeFlowRule(); }