camunda任务的一些简单操作

2019-10-14 14:44| 发布者: |

public class ZccTaskService {
TaskService taskService;

@Before
public void init{
ProcessEngineConfiguration processEngineConfiguration = ProcessEngineConfiguration.createProcessEngineConfigurationFromResource;
ProcessEngine processEngine = processEngineConfiguration.buildProcessEngine;
taskService=processEngine.getTaskService;
System.out.println;
}

/**
* 查询个人任务
* select distinct RES.REV_, RES.ID_, RES.NAME_, RES.PARENT_TASK_ID_, RES.DESCRIPTION_, RES.PRIORITY_, RES.CREATE_TIME_, RES.OWNER_, RES.ASSIGNEE_, RES.DELEGATION_, RES.EXECUTION_ID_, RES.PROC_INST_ID_, RES.PROC_DEF_ID_, RES.CASE_EXECUTION_ID_, RES.CASE_INST_ID_, RES.CASE_DEF_ID_, RES.TASK_DEF_KEY_, RES.DUE_DATE_, RES.FOLLOW_UP_DATE_, RES.SUSPENSION_STATE_, RES.TENANT_ID_
* from ACT_RU_TASK RES WHERE order by RES.ID_ asc LIMIT ? OFFSET ?
*/
@Test
public void getUserTask{

TaskQuery taskQuery = taskService.createTaskQuery;
// TaskQuery taskAssignee;
//分配到任务的人
String assignee="张三";
List Task list = taskQuery.taskAssignee.list;
for ;i++){
Task task = list.get;
System.out.println);
}
}

/**
* 完成个人任务
* Result 0: insert into ACT_HI_TASKINST values Update counts: [1]
* Result 1: insert into ACT_HI_IDENTITYLINK values Update counts: [1]
* Result 2: insert into ACT_HI_ACTINST values Update counts: [1]
* Result 3: insert into ACT_RU_TASK values Update counts: [1]
* Result 4: delete from ACT_RU_TASK where ID_ = ? and REV_ = ? Update counts: [1]
* Result 5: update ACT_RU_EXECUTION set REV_ = ?, PROC_DEF_ID_ = ?, BUSINESS_KEY_ = ?, ACT_ID_ = ?, ACT_INST_ID_ = ?, IS_ACTIVE_ = ?, IS_CONCURRENT_ = ?, IS_SCOPE_ = ?, IS_EVENT_SCOPE_ = ?, PARENT_ID_ = ?, SUPER_EXEC_ = ?, SUSPENSION_STATE_ = ?, CACHED_ENT_STATE_ = ?, SEQUENCE_COUNTER_ = ?, TENANT_ID_ = ? where ID_ = ? and REV_ = ? Update counts: [1]
* Result 6: UPDATE ACT_HI_ACTINST SET EXECUTION_ID_ = ?, PROC_DEF_KEY_ = ?, PROC_DEF_ID_ = ?, ACT_ID_ = ?, ACT_NAME_ = ?, ACT_TYPE_ = ?, PARENT_ACT_INST_ID_ = ? , END_TIME_ = ? , DURATION_ = ? , ACT_INST_STATE_ = ? WHERE ID_ = ? Update counts: [1]
* Result 7: update ACT_HI_TASKINST set EXECUTION_ID_ = ?, PROC_DEF_KEY_ = ?, PROC_DEF_ID_ = ?, NAME_ = ?, PARENT_TASK_ID_ = ?, DESCRIPTION_ = ?, OWNER_ = ?, ASSIGNEE_ = ?, DELETE_REASON_ = ?, TASK_DEF_KEY_ = ?, PRIORITY_ = ?, DUE_DATE_ = ?, FOLLOW_UP_DATE_ = ?, CASE_INST_ID_ = ? , END_TIME_ = ? , DURATION_ = ? where ID_ = ? Update counts: [1]
*
* ACT_RU_TASK:当前任务完成后会删除当前任务,下一个任务会插入进来
*/
@Test
public void completeTask{
// void complete;
String taskId="2804";
taskService.complete;
System.out.println;
}


}
猜你喜欢
<
>
关于我们
AB模版网成立于2014年,我们是一家专注用户体验设计开发与互联网品牌建设的设计公司,创立至今为2000多位客户提供了创新与专业的设计方案。设计服务范围包括:交互原型设计、产品视觉设计、网站设计与开发建设、移动及软件产品界面设计、图标设计、品牌及平面设计等。

联系我们

13588889999服务时间:9:00-18:00)

admin@adminbuy.cn

官方微信官方微信

部门热线

前   台:13588889999
业务部:13588889999
客服部:13588889999
技术部:13566667777
人事部:13566667777

咨询电话13588889999 返回顶部
返回顶部