Package com.founder.fix.fixflow.core.task

Examples of com.founder.fix.fixflow.core.task.TaskMgmtInstance


  }

  // 覆写父类的节点执行方法
  public void execute(ExecutionContext executionContext) {

    TaskMgmtInstance tmi = getTaskMgmtInstance(executionContext.getToken());

    // 是否启用验证
    if (executionContext.getProcessDefinition().isVerification()) {
      // 这里是验证的设计阶段有没有配置处理者
      if (!checkResources()) {
        throw new FixFlowException("节点: " + this.getId() + " 没有定义处理者,请重新检查节点定义!");
      }
    }

    // 创建并分配任务
    TaskInstanceEntity taskInstance = null;

    if (executionContext.getGroupID() != null) {
      taskInstance = tmi.createTaskInstanceEntity(getTaskDefinition(), executionContext, executionContext.getGroupID());
    } else {
      taskInstance = tmi.createTaskInstanceEntity(getTaskDefinition(), executionContext);
    }

    // 是否启用验证
    // if (!executionContext.getProcessDefinition().isVerification()) {
    // return;
View Full Code Here


    super.leaveClearData(executionContext);
  }

  private void removeTaskInstanceSynchronization(TokenEntity token) {
    // TODO Auto-generated method stub
    TaskMgmtInstance tmi = getTaskMgmtInstance(token);
    for (TaskInstanceEntity taskInstance : tmi.getTaskInstanceEntitys(token)) {
      if (!taskInstance.hasEnded()) {
        taskInstance.customEnd(null, null);
      }
    }
  }
View Full Code Here

    ExpandClassConfig expandClassConfig = processEngineConfiguration.getExpandClassConfig();
    List<ExpandClass>  expandClasses=expandClassConfig.getExpandClass();
    for (ExpandClass expandClass : expandClasses) {
      if(expandClass.getClassId().equals("TaskMgmtInstance")){
       
        TaskMgmtInstance taskMgmtInstance =(TaskMgmtInstance) ReflectUtil.instantiate(expandClass.getClassImpl());
        return taskMgmtInstance;
      }
    }
    throw new FixFlowException("流程引擎扩展配置里的TaskMgmtInstance实现类指定错误");
   
View Full Code Here

  public void assign(ExecutionContext executionContext) {

    // 这里会有泳道的处理 暂时没有实现泳道

    TaskMgmtInstance taskMgmtInstance = executionContext.getTaskMgmtInstance();

    taskMgmtInstance.performAssignment(getTaskDefinition(), this, executionContext);

  }
View Full Code Here

      if (getParent() != null) {
        // 添加日志
        // parent.addLog(new TokenEndLog(this));
      }
      // 移除这个将要结束的令牌上的所有未完成的任务
      TaskMgmtInstance taskMgmtInstance = (TaskMgmtInstance) this.getProcessInstance().getTaskMgmtInstance();
      for (TaskInstanceEntity taskInstance : taskMgmtInstance.getTaskInstanceEntitys(this)) {
        if (!taskInstance.hasEnded()) {
          taskInstance.customEnd(null, null);
        }
      }
      if (verifyParentTermination) {
View Full Code Here

    }
    if (admin != null) {
      assigneeIdObj = admin;
      adminObj = admin;
    }
    TaskMgmtInstance tmi = getTaskMgmtInstance(token);
    for (TaskInstanceEntity taskInstance : tmi.getTaskInstanceEntitys(token)) {
      if (!taskInstance.hasEnded()) {
        taskInstance.customEnd(null, null);
        if (assigneeId != null) {
          taskInstance.setAssignee(assigneeIdObj);
        }
View Full Code Here

      }
    }
  }

  void suspendTaskInstances() {
    TaskMgmtInstance taskMgmtInstance = (getProcessInstance() != null ? getProcessInstance().getTaskMgmtInstance() : null);
    if (taskMgmtInstance != null) {
      taskMgmtInstance.suspend(this);
    }
  }
View Full Code Here

      taskMgmtInstance.suspend(this);
    }
  }

  void resumeTaskInstances() {
    TaskMgmtInstance taskMgmtInstance = (getProcessInstance() != null ? getProcessInstance().getTaskMgmtInstance() : null);
    if (taskMgmtInstance != null) {
      taskMgmtInstance.resume(this);
    }
  }
View Full Code Here

TOP

Related Classes of com.founder.fix.fixflow.core.task.TaskMgmtInstance

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.