@Override public void update(File artifact) throws Exception { LOGGER.debug("WorkflowDeployer.update(\"{}\")", artifact.getAbsolutePath()); try { RuleBaseElementId id = getIdforFile(artifact); String code = FileUtils.readFileToString(artifact); boolean changed = false; if (id.getType().equals(RuleBaseElementType.Process)) { RuleBaseElementId cachedId = cache.get(artifact.getName()); if (!id.equals(cachedId)) { ruleManager.delete(cachedId); changed = true; } } ruleManager.addOrUpdate(id, code); if (changed) { cache.put(artifact.getName(), id); } } catch (Exception e) { LOGGER.error(e.getMessage()); throw e; } LOGGER.info("Successfully updated workflow file \"{}\"", artifact.getName()); }