activiti5.14 增加新的特性
cookqq ›博客列表 ›activiti

activiti5.14 增加新的特性

2014-02-27 14:36:57.0|分类: activiti|浏览量: 1715

摘要: 1、public interface TaskService : /** * A shortcut to {@link #claim} with null user in order to unclaim the task * @param task...

1、public interface TaskService :

/**
   * A shortcut to {@link #claim} with null user in order to unclaim the task
   * @param taskId task to unclaim, cannot be null.
   * @throws ActivitiObjectNotFoundException when the task doesn't exist. 
   */
  void unclaim(String taskId);



void claim(String taskId, String userId) 都很熟悉,就是声明某个任务。使这个任务只能有 userId能完成这个任务。

怎么取消这个声明呢?activiti增加新的特性方法unclaim();

2、自己写sql来查询自己的任务和待办的任务

// 已经签收的或者直接分配到当前人的任务

        StringBuffer asigneeSql = new StringBuffer(" select distinct RES.* from ACT_RU_TASK RES ");
        asigneeSql.append(" inner join ACT_RE_PROCDEF D on RES.PROC_DEF_ID_ = D.ID_ ");
        asigneeSql.append(" WHERE RES.ASSIGNEE_ = #{userId}");
        asigneeSql.append(" and D.KEY_ = #{processDefinitionKey} ");
        asigneeSql.append(" and RES.SUSPENSION_STATE_ = #{suspensionState}");


        // 当前人在候选人或者候选组范围之内
        StringBuffer needClaimSql = new StringBuffer("select distinct RES1.* from ACT_RU_TASK RES1   ");
        needClaimSql.append(" inner join ACT_RU_IDENTITYLINK I on I.TASK_ID_ = RES1.ID_ ");
        needClaimSql.append(" inner join ACT_RE_PROCDEF D1 on RES1.PROC_DEF_ID_ = D1.ID_ ");
        needClaimSql.append(" WHERE D1.KEY_ = #{processDefinitionKey} ");
        needClaimSql.append(" and RES1.ASSIGNEE_ is null  ");
        needClaimSql.append(" and I.TYPE_ = 'candidate' ");
        needClaimSql.append(" and ( I.USER_ID_ = #{userId} or ");
        needClaimSql.append("  I.GROUP_ID_ IN (select g.GROUP_ID_ from ACT_ID_MEMBERSHIP g where g.USER_ID_ = #{userId} ) ) ");
        needClaimSql.append(" and RES1.SUSPENSION_STATE_ = #{suspensionState} ");






一键分享文章

分类列表

  • • struts源码分析
  • • flink
  • • struts
  • • redis
  • • kafka
  • • ubuntu
  • • zookeeper
  • • hadoop
  • • activiti
  • • linux
  • • 成长
  • • NIO
  • • 关键词提取
  • • mysql
  • • android studio
  • • zabbix
  • • 云计算
  • • mahout
  • • jmeter
  • • hive
  • • ActiveMQ
  • • lucene
  • • MongoDB
  • • netty
  • • flume
  • • 我遇到的问题
  • • GRUB
  • • nginx
  • • 大家好的文章
  • • android
  • • tomcat
  • • Python
  • • luke
  • • android源码编译
  • • 安全
  • • MPAndroidChart
  • • swing
  • • POI
  • • powerdesigner
  • • jquery
  • • html
  • • java
  • • eclipse
  • • shell
  • • jvm
  • • highcharts
  • • 设计模式
  • • 列式数据库
  • • spring cloud
  • • docker+node.js+zookeeper构建微服务
版权所有 cookqq 感谢访问 支持开源 京ICP备15030920号
CopyRight 2015-2018 cookqq.com All Right Reserved.