snaker-core/src/main/java/org/snaker/engine/core/ProcessService.java
public void redeploy(String id, InputStream input) {
		AssertHelper.notNull(input);
		Process entity = access().getProcess(id);
		AssertHelper.notNull(entity);
		try {
			byte[] bytes = StreamHelper.readBytes(input);
			ProcessModel model = ModelParser.parse(bytes);
			String oldProcessName = entity.getName();
			entity.setModel(model);
			entity.setBytes(bytes);
			access().updateProcess(entity);
			if(!oldProcessName.equalsIgnoreCase(entity.getName())) {
				Cache<String, Process> entityCache = ensureAvailableEntityCache();
				if(entityCache != null) {
					entityCache.remove(oldProcessName + DEFAULT_SEPARATOR + entity.getVersion());
				}
			}
			cache(entity);
		} catch(Exception e) {
			e.printStackTrace();
			log.error(e.getMessage());
			throw new SnakerException(e.getMessage(), e.getCause());
		}
	}
public void redeploy(String id, InputStream input) {
		AssertHelper.notNull(input);
		Process entity = access().getProcess(id);
		AssertHelper.notNull(entity);
		try {
			byte[] bytes = StreamHelper.readBytes(input);
			ProcessModel model = ModelParser.parse(bytes);
			String oldProcessName = entity.getName();
			entity.setModel(model);
			entity.setBytes(bytes);
			access().updateProcess(entity);
			if(!oldProcessName.equalsIgnoreCase(entity.getName())) {
				Cache<String, Process> entityCache = ensureAvailableEntityCache();
				if(entityCache != null) {
					entityCache.remove(oldProcessName + DEFAULT_SEPARATOR + entity.getVersion());
				}
			}
			cache(entity);
		} catch(Exception e) {
			e.printStackTrace();
			log.error(e.getMessage());
			throw new SnakerException(e.getMessage(), e.getCause());
		}
	}
public void redeploy ( String id , InputStream input ) { AssertHelper . notNull ( input ) ; Process entity = access ( ) . getProcess ( id ) ; AssertHelper . notNull ( entity ) ; try { byte [ ] bytes = StreamHelper . readBytes ( input ) ; ProcessModel model = ModelParser . parse ( bytes ) ; String oldProcessName = entity . getName ( ) ; entity . setModel ( model ) ; entity . setBytes ( bytes ) ; access ( ) . updateProcess ( entity ) ; if ( ! oldProcessName . equalsIgnoreCase ( entity . getName ( ) ) ) { Cache < String , Process > entityCache = ensureAvailableEntityCache ( ) ; if ( entityCache != null ) { entityCache . remove ( oldProcessName + DEFAULT_SEPARATOR + entity . getVersion ( ) ) ; } } cache ( entity ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; log . error ( e . getMessage ( ) ) ; throw new SnakerException ( e . getMessage ( ) , e . getCause ( ) ) ; } }
根据流程定义id、xml的输入流解析为字节数组，保存至数据库中，并且重新put到缓存中
@param input 定义输入流
根据流程定义id、xml的输入流解析为字节数组，保存至数据库中，并且重新put到缓存中