예제 #1
0
        /// <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"));
            }
        }
예제 #2
0
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="elemName">元素名</param>
        /// <param name="xml">字符串参数</param>
        /// <param name="isXmlFile">是否是xml文件</param>
        public ActionURL(string elemName, ConfigureElement parent, XElement xElem)
            : base(parent, elemName, xElem)
        {
            if (xElem == null) return;

            ManualProcess = new CustomAction("manualProcess", this, xElem.Element("manualProcess"));
        }
예제 #3
0
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="xml">字符串参数</param>
        /// <param name="isXmlFile">是否是xml文件</param>
        public AutoActivity(ConfigureElement parent, XElement xElem)
            : base(parent, xElem)
        {
            if (xElem == null) return;

            ActivateRule = new ActivateRule(this, xElem.Element("activateRule"));
            XElement elem = xElem.Element("autoActivity");
            if (elem != null)
            {
                TimeLimit = new TimeLimit(this, elem.Element("timeLimit"));
                TriggerEvents = elem.Element("triggerEvents").Elements("triggerEvent").Select(o => new TriggerEvent(this, o)).ToList();
                RollBack = new CustomAction("rollBack", this, elem.Element("rollBack"));
            }
        }
예제 #4
0
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="xml">字符串参数</param>
        /// <param name="isXmlFile">是否是xml文件</param>
        public SubflowActivity(ConfigureElement parent, XElement xElem)
            : base(parent, xElem)
        {
            if (xElem == null)
            {
                Initilize();
                return;
            }

            ActivateRule = new ActivateRule(this, xElem.Element("activateRule"));
            XElement subElem = xElem.Element("subflowActivity");

            if (subElem != null)
            {
                if (subElem.Element("subProcess") != null)
                    SubProcess = subElem.Element("subProcess").Value;

                if (subElem.Element("InvokePattern") != null)
                    InvokePattern = subElem.Element("InvokePattern").Value.Cast<InvokePattern>(InvokePattern.Synchronous);

                if (subElem.Element("isMultiSubProcess") != null)
                    IsMultiSubProcess = subElem.Element("isMultiSubProcess").Value.Cast<bool>(false);

                if (subElem.Element("iterationRelevantData") != null)
                    IterationRelevantData = subElem.Element("iterationRelevantData").Value;

                if (subElem.Element("iterationVariableName") != null)
                    IterationVariableName = subElem.Element("iterationVariableName").Value;

                if (subElem.Element("triggerEvents") != null && subElem.Element("triggerEvents").Elements("triggerEvent") != null)
                    TriggerEvents = subElem.Element("triggerEvents").Elements("triggerEvent")
                                   .Select(e => new TriggerEvent(this, e)).ToList();
            }

            RollBack = new CustomAction("rollBack", this, xElem.Element("rollBack"));
        }
예제 #5
0
        public override void Initilize()
        {
            base.Initilize();

            ActivateRule = new ActivateRule();
            TriggerEvents = new List<TriggerEvent>();
            RollBack = new CustomAction("rollBack", this, null);
        }
예제 #6
0
        public override void Initilize()
        {
            base.Initilize();

            ActivateRule = new ActivateRule();
            TimeLimit = new TimeLimit();
            TriggerEvents = new List<TriggerEvent>();
            RollBack = new CustomAction();
        }
예제 #7
0
        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();
        }