| 
					
				 | 
			
			
				@@ -19,13 +19,14 @@ import com.flow.service.NotifyService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import lombok.extern.slf4j.Slf4j; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.flowable.bpmn.model.FlowElement; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.flowable.common.engine.api.delegate.event.FlowableEngineEntityEvent; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.flowable.engine.ManagementService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.flowable.engine.RuntimeService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.flowable.engine.TaskService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.flowable.engine.delegate.DelegateExecution; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.flowable.engine.delegate.event.AbstractFlowableEngineEventListener; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.flowable.engine.delegate.event.FlowableCancelledEvent; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.flowable.engine.delegate.event.FlowableProcessStartedEvent; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.flowable.engine.delegate.event.impl.FlowableProcessCancelledEventImpl; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.flowable.engine.impl.persistence.entity.ExecutionEntityImpl; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.flowable.task.service.impl.persistence.entity.TaskEntityImpl; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -44,13 +45,13 @@ public class GlobalActivityEventListener extends AbstractFlowableEngineEventList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private FlowTaskService flowTaskService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private RuntimeService runtimeService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private TaskService taskService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private NotifyService notifyService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private FlowInstanceService flowInstanceService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private ProcessEngineConfigurationImpl processEngineConfiguration; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 任务创建监听器 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -63,7 +64,6 @@ public class GlobalActivityEventListener extends AbstractFlowableEngineEventList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         FlowElement currentFlowElement = execution.getCurrentFlowElement(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String nobody = ProcessElementUtil.getExtensionElementValue(currentFlowElement, "nobody"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String assigneeType = ProcessElementUtil.getExtensionElementValue(currentFlowElement, "assigneeType"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        String nobodyUsers = ProcessElementUtil.getExtensionElementValue(currentFlowElement, "nobodyUsers"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (StringUtils.isNotBlank(assigneeType)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (assigneeType.equals(AssigneeTypeEnum.AUTO_PASS.getType())) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -84,17 +84,6 @@ public class GlobalActivityEventListener extends AbstractFlowableEngineEventList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     flowTaskService.autoComplete(entity.getId(), " 审批人为空"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } else if (nobody.equals(ApprovalNobodyEnum.REFUSE.getNobody())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     flowTaskService.autoRefuse(entity.getId(), " 审批人为空"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } else if (nobody.equals(ApprovalNobodyEnum.ASSIGN.getNobody())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if (StringUtils.isNotBlank(nobodyUsers)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        String[] split = nobodyUsers.split(","); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        if(split.length > 0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            entity.setAssignee(split[0]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } else if (nobody.equals(ApprovalNobodyEnum.ADMIN.getNobody())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    DelegateExecution parent = execution.getParent(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 |