Exemplo n.º 1
0
        public TaskInstance save()
        {
            var bpmContext = _processInstance.getBpmContext();

            bpmContext.save(this);
            return(this);
        }
Exemplo n.º 2
0
 internal TaskInstance(ProcessInstance processInstance, Task task, wf_taskInstance model = null)
 {
     _processInstance = processInstance;
     _task = task;
     if (_model == null)
     {
         var bpmContext = processInstance.getBpmContext();
         _model = new wf_taskInstance();
         _model.ProcessInstanceId = processInstance.getProcessInstanceModel().Id;
         _model.Id = bpmContext.save(this);
     }
 }
Exemplo n.º 3
0
 internal TaskInstance(ProcessInstance processInstance, Task task, wf_taskInstance model = null)
 {
     _processInstance = processInstance;
     _task            = task;
     if (_model == null)
     {
         var bpmContext = processInstance.getBpmContext();
         _model = new wf_taskInstance();
         _model.ProcessInstanceId = processInstance.getProcessInstanceModel().Id;
         _model.Id = bpmContext.save(this);
     }
 }
Exemplo n.º 4
0
        public TaskInstance loadOrCreateTaskInstance(ProcessInstance processInstance)
        {
            if (this.NodeType == NodeType.Join)
            {
                wf_taskInstance dataTaskInstance = null;
                var bpmContext = processInstance.getBpmContext();
                switch (this.LogicType)
                {
                    case LogicType.AND:         //join的Token停留在Temp等待
                        dataTaskInstance = bpmContext.loadDataTaskInstanceFirstRun(processInstance.getProcessInstanceModel().Id, this.Name);
                        return this.loadTaskInstance(processInstance, dataTaskInstance);
                        break;
                    case LogicType.OR:          //join的Token不停留Temp
                        dataTaskInstance = bpmContext.loadDataTaskInstanceFirst(processInstance.getProcessInstanceModel().Id, this.Name);
                        return this.loadTaskInstance(processInstance, dataTaskInstance);
                        break;
                }

            }
            return createTaskInstance(processInstance);
        }
Exemplo n.º 5
0
        public TaskInstance loadOrCreateTaskInstance(ProcessInstance processInstance)
        {
            if (this.NodeType == NodeType.Join)
            {
                wf_taskInstance dataTaskInstance = null;
                var             bpmContext       = processInstance.getBpmContext();
                switch (this.LogicType)
                {
                case LogicType.AND:             //join的Token停留在Temp等待
                    dataTaskInstance = bpmContext.loadDataTaskInstanceFirstRun(processInstance.getProcessInstanceModel().Id, this.Name);
                    return(this.loadTaskInstance(processInstance, dataTaskInstance));

                    break;

                case LogicType.OR:              //join的Token不停留Temp
                    dataTaskInstance = bpmContext.loadDataTaskInstanceFirst(processInstance.getProcessInstanceModel().Id, this.Name);
                    return(this.loadTaskInstance(processInstance, dataTaskInstance));

                    break;
                }
            }
            return(createTaskInstance(processInstance));
        }