Beispiel #1
0
        /// <summary>
        /// 具体业务逻辑
        /// </summary>
        /// <param name="context"></param>
        public override void Execute(BpmContext context)
        {
            ZEndEvent ender = Context.Element as ZEndEvent;

            Throwing(ender);
            //结束 流程 或 流程中一个分支
            FinishProcess(context);

            logger.Info("执行" + Context.Element.ID);
        }
Beispiel #2
0
        /// <summary>
        /// 捕获事件
        /// </summary>
        private void Throwing(ZEndEvent element)
        {
            string elementType = string.Empty;

            if (string.IsNullOrEmpty(element.Type))
            {
                elementType = "None";
            }
            else
            {
                elementType = element.Type;
            }
            element = new ZEndEvent();
            Type    type = Type.GetType(typeof(IAction).Namespace + "." + elementType + "Action");
            IAction act  = System.Activator.CreateInstance(type) as IAction;

            act.Define = element.Define;
            act.Fire();

            FinishProcess(Context);
        }