| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -182,10 +182,7 @@ public abstract class RequirementBaseServiceImpl<T extends RequirementBase> exte
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							}
 | 
					 | 
					 | 
					 | 
							}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						@Override
 | 
					 | 
					 | 
					 | 
						protected void approve(T entity, User user) {
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						@Transactional
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						@PreAuthorize("this.canApprove(#entity)")
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						public void approve(T entity) {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							T e = (T) dao.getById(entity.getId());
 | 
					 | 
					 | 
					 | 
							T e = (T) dao.getById(entity.getId());
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							
 | 
					 | 
					 | 
					 | 
							
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							Workflow wf = getNextWorkflow(e);
 | 
					 | 
					 | 
					 | 
							Workflow wf = getNextWorkflow(e);
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -195,7 +192,7 @@ public abstract class RequirementBaseServiceImpl<T extends RequirementBase> exte
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							
 | 
					 | 
					 | 
					 | 
							
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							Role role = wf.getRole();
 | 
					 | 
					 | 
					 | 
							Role role = wf.getRole();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							AuthItem auth = new AuthItem();
 | 
					 | 
					 | 
					 | 
							AuthItem auth = new AuthItem();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							auth.setApprover(getLoggedInUser());
 | 
					 | 
					 | 
					 | 
							auth.setApprover(user);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							auth.setRole(role);
 | 
					 | 
					 | 
					 | 
							auth.setRole(role);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							auth.setAuthDate(new Date());
 | 
					 | 
					 | 
					 | 
							auth.setAuthDate(new Date());
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							
 | 
					 | 
					 | 
					 | 
							
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -211,6 +208,7 @@ public abstract class RequirementBaseServiceImpl<T extends RequirementBase> exte
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							
 | 
					 | 
					 | 
					 | 
							
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							super.update(e);
 | 
					 | 
					 | 
					 | 
							super.update(e);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							
 | 
					 | 
					 | 
					 | 
							
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							if (!autoApprove(entity)) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								this.sendToApprovers(e);
 | 
					 | 
					 | 
					 | 
								this.sendToApprovers(e);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								
 | 
					 | 
					 | 
					 | 
								
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								SettingsData settings = settingsService.getSettings();
 | 
					 | 
					 | 
					 | 
								SettingsData settings = settingsService.getSettings();
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -231,6 +229,18 @@ public abstract class RequirementBaseServiceImpl<T extends RequirementBase> exte
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									}
 | 
					 | 
					 | 
					 | 
									}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								}
 | 
					 | 
					 | 
					 | 
								}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							}
 | 
					 | 
					 | 
					 | 
							}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						@Override
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						@Transactional
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						@PreAuthorize("this.canApprove(#entity)")
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						public void approve(T entity) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							approve(entity, getLoggedInUser());
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						protected boolean autoApprove(T entity) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							return false;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						@Override
 | 
					 | 
					 | 
					 | 
						@Override
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						@Transactional
 | 
					 | 
					 | 
					 | 
						@Transactional
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -243,7 +253,7 @@ public abstract class RequirementBaseServiceImpl<T extends RequirementBase> exte
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							return false;
 | 
					 | 
					 | 
					 | 
							return false;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						
 | 
					 | 
					 | 
					 | 
						
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						private Workflow getNextWorkflow(T e) {
 | 
					 | 
					 | 
					 | 
						protected Workflow getNextWorkflow(T e) {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							AuthItem authItem = null;
 | 
					 | 
					 | 
					 | 
							AuthItem authItem = null;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							if (e.getWorkflow() == null) {
 | 
					 | 
					 | 
					 | 
							if (e.getWorkflow() == null) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								return null;
 | 
					 | 
					 | 
					 | 
								return null;
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |