| 
					
				 | 
			
			
				@ -524,38 +524,60 @@ public class FlowManager { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @throws Exception 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Integer updateCamelFile(Integer flowTempId, Integer flowId, String newCron) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Integer updateCamelFile(String jobId,Integer flowTempId, Integer flowId, String newCron) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         /* 修改route文件无需重新生成flowClass记录,文件名根据className+routeId 生成;*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<SystemServiceFlowTemp> flowTempRouters = flowTempDao.getFlowTemps(flowTempId, ServiceFlowConstant.FLOW_TYPE_ROUTE); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<SystemServiceFlowTemp> flowTempProces = flowTempDao.getFlowTemps(flowTempId, ServiceFlowConstant.FLOW_TYPE_PROCESSOR); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        SystemServiceFlow flow = flowDao.getEntity(SystemServiceFlow.class, flowId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //route模板文件记录是否存在。不存在就返回。 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (!flowTempRouters.isEmpty()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            SystemServiceFlowTemp flowTemp = flowTempRouters.get(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            StringBuilder basePath = new StringBuilder(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            ; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (flowTemp.getPackageName() != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String packagePath[] = flowTemp.getPackageName().split("\\."); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                for (int i = 0; i < packagePath.length; i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    basePath.append(packagePath[i]).append("/"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            ArrayList<ServiceFlow.HandleFile> handleFiles = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            ServiceFlow serviceFlow = new ServiceFlow(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //新增processor记录 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            for (SystemServiceFlowTemp process : flowTempProces) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String deName = DES.decrypt(process.getClassPath(), DES.COMMON_PASSWORD);//吉阿米果的文件名 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String newFileName = genProcessorJavaFile(jobId, flow.getCode(), deName, process.getClassName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //生成新的java文件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String enNewFileName = DES.encrypt(newFileName, DES.COMMON_PASSWORD); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (newFileName != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    //发送消息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    serviceFlow.setRouteCode(flow.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    serviceFlow.setFlowType(ServiceFlowConstant.CLASS); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    ServiceFlow.HandleFile handleFile = new ServiceFlow.HandleFile(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    handleFile.setRouteCode(flow.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    handleFile.setFileType(ServiceFlowConstant.JAVA); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    handleFile.setPackageName(process.getPackageName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    handleFile.setClassName(process.getClassName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    handleFile.setFilePath(enNewFileName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    handleFile.setUsage(ServiceFlowConstant.FLOW_TYPE_PROCESSOR); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    handleFiles.add(handleFile); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    serviceFlow.setHandleFiles(handleFiles); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    System.out.println("生成processor的java文件过程出错"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    return null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String deName = DES.decrypt(flowTemp.getClassPath(), DES.COMMON_PASSWORD);//吉阿米果的文件名 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String deName = DES.decrypt(flowTemp.getClassPath(), DES.COMMON_PASSWORD);//吉阿米果的文件名 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //生成新的route文件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String newFileName = genRouteJavaFile(flow.getCode(), flowTemp.getClassName(), deName, newCron); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String enNewFileName = DES.encrypt(newFileName, DES.COMMON_PASSWORD); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            ServiceFlow serviceFlow = new ServiceFlow(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            serviceFlow.setRouteCode(flow.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            serviceFlow.setFlowType(ServiceFlowConstant.JAVA); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            ServiceFlow.HandleFile handleFile = new ServiceFlow.HandleFile(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            handleFile.setRouteCode(flow.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            handleFile.setFileType(ServiceFlowConstant.JAVA); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            handleFile.setPackageName(basePath.toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            handleFile.setPackageName(flowTemp.getPackageName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            handleFile.setClassName(flowTemp.getClassName() + flow.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            handleFile.setFilePath(enNewFileName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            handleFile.setUsage(ServiceFlowConstant.FLOW_TYPE_ROUTE); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            ArrayList<ServiceFlow.HandleFile> handleFiles = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            handleFiles.add(handleFile); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            serviceFlow.setHandleFiles(handleFiles); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            serviceFlowEventService.serviceFlowModifiedAdd(serviceFlow); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -583,7 +605,9 @@ public class FlowManager { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //新增processor记录 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String deName = DES.decrypt(flowTemp.getClassPath(), DES.COMMON_PASSWORD);//吉阿米果的文件名 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String enClassName = DES.encrypt(deName.replace(".java", ".class"), DES.COMMON_PASSWORD);//生成机密过的classPath 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String newFileName = genRouteJavaFile(newFlow.getCode(), flowTemp.getClassName(), deName, newCron); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String enClassName = DES.encrypt(newFileName.replace(".java", ".class"), DES.COMMON_PASSWORD);//生成机密过的classPath 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            SystemServiceFlowClass newFlowClass = new SystemServiceFlowClass(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            newFlowClass.setPackageName(flowTemp.getPackageName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            newFlowClass.setClassName(flowTemp.getClassName() + newFlow.getCode()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -593,8 +617,7 @@ public class FlowManager { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            flowClassDao.saveEntity(newFlowClass); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            newFlowClass.setIsUpdate("1"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //生成新的route文件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String newFileName = genRouteJavaFile(newFlow.getCode(), flowTemp.getClassName(), deName, newCron); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String enNewFileName = DES.encrypt(newFileName, DES.COMMON_PASSWORD); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String enNewFileName = DES.encrypt(newFileName, DES.COMMON_PASSWORD);//加密文件名 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (newFileName != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                ServiceFlow serviceFlow = new ServiceFlow(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -653,8 +676,9 @@ public class FlowManager { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String deName = DES.decrypt(process.getClassPath(), DES.COMMON_PASSWORD);//吉阿米果的文件名 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String enClassName = DES.encrypt(deName.replace(".java", ".class"), DES.COMMON_PASSWORD);//生成机密过的classPath 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String newFileName = genProcessorJavaFile(jobId, newFlow.getCode(), deName, process.getClassName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String enClassName = DES.encrypt(newFileName.replace(".java", ".class"), DES.COMMON_PASSWORD);//生成机密过的classPath 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                SystemServiceFlowClass processClass = new SystemServiceFlowClass(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                processClass.setPackageName(process.getPackageName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                processClass.setClassName(process.getClassName()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -663,7 +687,6 @@ public class FlowManager { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                processClass.setType(ServiceFlowConstant.FLOW_TYPE_PROCESSOR); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                processClass.setIsUpdate("1"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //生成新的java文件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String newFileName = genProcessorJavaFile(jobId, newFlow.getCode(), deName, processClass.getClassName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String enNewFileName = DES.encrypt(newFileName, DES.COMMON_PASSWORD); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (newFileName != null) { 
			 |