internal TransitionInstance(TaskInstance fromTaskInstance,Transition transition, wf_transitionInstance model=null)
 {
     _fromTaskInstance = fromTaskInstance;
     _transition = transition;
     if (_model == null)
     {
         var bpmContext = fromTaskInstance.getProcessInstance().getBpmContext();
         _model = new wf_transitionInstance();
         _model.FromTaskInstanceId = fromTaskInstance.getTaskInstanceModel().Id;
         _model.TransitionId = transition.GetId();
         _model.Id = bpmContext.save(this);
     }
 }
Exemple #2
0
 internal Token(TaskInstance taskInstance, wf_token model = null)
 {
     _taskInstance = taskInstance;
     _model        = model;
     if (_model == null)
     {
         var bpmContext = taskInstance.getProcessInstance().getBpmContext();
         _model = new wf_token();
         _model.TaskInstanceId    = taskInstance.getTaskInstanceModel().Id;
         _model.ProcessInstanceId = taskInstance.getProcessInstance().getProcessInstanceModel().Id; //冗余保存
         _model.Id = bpmContext.save(this);
     }
 }
Exemple #3
0
 internal Token(TaskInstance taskInstance, wf_token model = null)
 {
     _taskInstance = taskInstance;
     _model = model;
     if (_model == null)
     {
         var bpmContext = taskInstance.getProcessInstance().getBpmContext();
         _model = new wf_token();
         _model.TaskInstanceId = taskInstance.getTaskInstanceModel().Id;
         _model.ProcessInstanceId = taskInstance.getProcessInstance().getProcessInstanceModel().Id; //冗余保存
         _model.Id = bpmContext.save(this);
     }
 }
Exemple #4
0
 internal TransitionInstance(TaskInstance fromTaskInstance, Transition transition, wf_transitionInstance model = null)
 {
     _fromTaskInstance = fromTaskInstance;
     _transition       = transition;
     if (_model == null)
     {
         var bpmContext = fromTaskInstance.getProcessInstance().getBpmContext();
         _model = new wf_transitionInstance();
         _model.FromTaskInstanceId = fromTaskInstance.getTaskInstanceModel().Id;
         _model.TransitionId       = transition.GetId();
         _model.Id = bpmContext.save(this);
     }
 }
Exemple #5
0
 //设置Token对应的流程实例,并保存
 public Token setTaskInstance(TaskInstance taskInstance)
 {
     _taskInstance            = taskInstance;
     _model.ProcessInstanceId = _taskInstance.getTaskInstanceModel().Id;
     return(this);
 }
Exemple #6
0
 //设置Token对应的流程实例,并保存
 public Token setTaskInstance(TaskInstance taskInstance)
 {
     _taskInstance = taskInstance;
     _model.ProcessInstanceId = _taskInstance.getTaskInstanceModel().Id;
     return this;
 }
        //public DataAccess da;

        public TaskEventArgs(TaskInstance taskInstance)
        {
            //this.taskInstance = taskInstance;
            //this.da = taskInstance.GetProcessInstance().GetContextInstance().da;
        }
 public TransitionInstance loadTransitionInstance(TaskInstance fromTaskInstance, wf_transitionInstance model)
 {
     return new TransitionInstance(fromTaskInstance, this, model);
 }
 public TransitionInstance createTransitionInstance(TaskInstance fromTaskInstance)
 {
     return new TransitionInstance(fromTaskInstance, this, null);
 }
Exemple #10
0
 public TransitionInstance loadTransitionInstance(TaskInstance fromTaskInstance, wf_transitionInstance model)
 {
     return(new TransitionInstance(fromTaskInstance, this, model));
 }
Exemple #11
0
 public TransitionInstance createTransitionInstance(TaskInstance fromTaskInstance)
 {
     return(new TransitionInstance(fromTaskInstance, this, null));
 }
 //保存工作项实例
 public int save(TaskInstance taskInstance) 
 {
     var model = taskInstance.getTaskInstanceModel();
     var result = save<wf_taskInstance>(model);
     return result;
 }