[Java][activiti]Activiti的流程委托功能[getAssignee()与getOwner()的区别]

一、流程图


二、流程定义文件:
AssigneeUserAndGroup.bpmn


三、单元测试
ProcessTestDelegateTask.java

四、主要执行语句

   
   
   
   
// 签收
taskService . claim ( task . getId (), "user1" );
task = taskService.createTaskQuery().singleResult();
assertNull(task.getOwner());
assertEquals("user1", task.getAssignee());
// 委派
taskService . delegateTask ( task . getId (), "henryyan" );
task = taskService . createTaskQuery (). singleResult ();
assertEquals("user1",task.getOwner());
// 被委派人完成任务
taskService . resolveTask ( task . getId ());
     
     
     
     
// 查询已完成的委派任务
task = taskService . createTaskQuery (). taskDelegationState ( DelegationState . RESOLVED ). singleResult ();
assertEquals ( "user1" , task . getAssignee ());
assertEquals ( "user1" , task . getOwner ());



你可能感兴趣的:([Java][activiti]Activiti的流程委托功能[getAssignee()与getOwner()的区别])