zoukankan      html  css  js  c++  java
  • activiti7完成当前任务

    package com.zcc.acvitivi;

    import org.activiti.engine.ProcessEngine;
    import org.activiti.engine.ProcessEngineConfiguration;
    import org.activiti.engine.TaskService;
    import org.activiti.engine.task.Task;
    import org.activiti.engine.task.TaskQuery;

    import java.util.List;

    /**
    * 完成当前任务
    */
    public class ActivitiCompleteTask {
    /*public static void main(String[] args) {
    //创建流程引擎配置类
    ProcessEngineConfiguration processEngineConfiguration=
    ProcessEngineConfiguration.createProcessEngineConfigurationFromResource("activiti.cfg.xml");
    //流程引擎对象
    ProcessEngine processEngine = processEngineConfiguration.buildProcessEngine();
    //获取taskService
    TaskService taskService = processEngine.getTaskService();

    //处理当前任务(要先查询当前用户下的任务id)
    taskService.complete("2505");
    System.out.println("当前用户完成了当前任务");

    }*/

    /*public static void main(String[] args) {
    //创建流程引擎配置类
    ProcessEngineConfiguration processEngineConfiguration=
    ProcessEngineConfiguration.createProcessEngineConfigurationFromResource("activiti.cfg.xml");
    //流程引擎对象
    ProcessEngine processEngine = processEngineConfiguration.buildProcessEngine();
    //获取taskService
    TaskService taskService = processEngine.getTaskService();

    //处理当前任务(要先查询当前用户下的任务id)
    taskService.complete("5002");
    System.out.println("当前用户完成了当前任务");

    }*/

    //7502
    public static void main(String[] args) {
    //创建流程引擎配置类
    ProcessEngineConfiguration processEngineConfiguration=
    ProcessEngineConfiguration.createProcessEngineConfigurationFromResource("activiti.cfg.xml");
    //流程引擎对象
    ProcessEngine processEngine = processEngineConfiguration.buildProcessEngine();
    //获取taskService
    TaskService taskService = processEngine.getTaskService();

    //处理当前任务(要先查询当前用户下的任务id)
    taskService.complete("7502");
    System.out.println("当前用户完成了当前任务");

    }
    }
  • 相关阅读:
    angular 实现全选、反选、个别选择的实现
    idea下git版本回退
    统一设置滚动条样式
    vue小知识点
    Java面试题之Oracle 支持哪三种事务隔离级别
    Java面试题之hashmap中用什么hash算法解决碰撞的?
    Java面试题之Integer.valueOf(String s);采用了什么设计模式
    TCP面试题之为什么会有TIME_WAIT状态
    Java面试题之如何防止重复下单问题?
    Java面试题之在多线程情况下,单例模式中懒汉和饿汉会有什么问题呢?
  • 原文地址:https://www.cnblogs.com/yscec/p/11802757.html
Copyright © 2011-2022 走看看