1、不重新部署,更新当前已部署的流程引擎。
/*===更新模板====*/
ActGeBytearray currentAct = actGeBytearrayService.getByDeploymentId(deploymentId);
currentAct.setBYTES_(xmlBytes);
actGeBytearrayService.updateById(currentAct);
/*===清理模板缓存====*/
DeploymentManager deploymentManager = ((ProcessEngineConfigurationImpl)processEngine.getProcessEngineConfiguration()).getDeploymentManager();
DeploymentCache<ProcessDefinitionCacheEntry> deploymentCache = deploymentManager.getProcessDefinitionCache();
deploymentCache.remove(processDefinition.getId());