//进入节点
        public void enter(TransitionInstance transitionInstance,Token token)
        {
            //当工作项实体已完成并且结点为join且逻辑为or时,不再启动
            if (!(_task.NodeType == NodeType.Join
                && _task.LogicType == LogicType.OR
                && _model.TaskState == TaskState.Complete.ToString()))
                this.start();

            //更新线实例的到达工作项实例id
            transitionInstance.setToTaskInstanceId(_model.Id).save();
 
            //设置令牌的工作项实例
            token.setTaskInstance(this).save();

            this.enterNode();

            execute(token);

            //Token token = executionContext.getToken();
            //token.setNode(this);
            //// remove the transition references from the runtime context
            //executionContext.setTransition(null);
            //executionContext.setTransitionSource(null);

            //// execute the node
            //if (isAsync)
            //{

            //}
            //else
            //{
            //    execute(executionContext);
            //}
        }
        //进入节点
        public void enter(TransitionInstance transitionInstance, Token token)
        {
            //当工作项实体已完成并且结点为join且逻辑为or时,不再启动
            if (!(_task.NodeType == NodeType.Join &&
                  _task.LogicType == LogicType.OR &&
                  _model.TaskState == TaskState.Complete.ToString()))
            {
                this.start();
            }

            //更新线实例的到达工作项实例id
            transitionInstance.setToTaskInstanceId(_model.Id).save();

            //设置令牌的工作项实例
            token.setTaskInstance(this).save();

            this.enterNode();

            execute(token);

            //Token token = executionContext.getToken();
            //token.setNode(this);
            //// remove the transition references from the runtime context
            //executionContext.setTransition(null);
            //executionContext.setTransitionSource(null);

            //// execute the node
            //if (isAsync)
            //{

            //}
            //else
            //{
            //    execute(executionContext);
            //}
        }
       // public DataAccess da;

        public TransEventArgs(TransitionInstance transitionInstance)
        {
            //this.taskInstance = (TaskInstance)transitionInstance.GetFromTaskInst();
            //this.transitionInstance = transitionInstance;
            //this.da = taskInstance.GetProcessInstance().GetContextInstance().da;
        }
 //离开节点
 public TaskInstance leave(TransitionInstance transitionInstance, Token token)
 {
     this.end().save();
     transitionInstance.take(token);
     return this;
 }
 //离开节点
 public TaskInstance leave(TransitionInstance transitionInstance, Token token)
 {
     this.end().save();
     transitionInstance.take(token);
     return(this);
 }
        // public DataAccess da;

        public TransEventArgs(TransitionInstance transitionInstance)
        {
            //this.taskInstance = (TaskInstance)transitionInstance.GetFromTaskInst();
            //this.transitionInstance = transitionInstance;
            //this.da = taskInstance.GetProcessInstance().GetContextInstance().da;
        }
Beispiel #7
0
 public int save(TransitionInstance transitionInstance)
 {
     var model = transitionInstance.getTransitionInstanceModel();
     var result = save<wf_transitionInstance>(model);
     return result;
 }