protected InstanceType loadAndCacheBpmnModelInstance(final DefinitionType definitionEntity) { final CommandContext commandContext = Context.getCommandContext(); InputStream bpmnResourceInputStream = commandContext.runWithoutAuthorization(new Callable<InputStream>() { public InputStream call() throws Exception { return new GetDeploymentResourceCmd(definitionEntity.getDeploymentId(), definitionEntity.getResourceName()).execute(commandContext); } }); try { InstanceType bpmnModelInstance = readModelFromStream(bpmnResourceInputStream); instanceCache.put(definitionEntity.getId(), bpmnModelInstance); return bpmnModelInstance; } catch (Exception e) { throwLoadModelException(definitionEntity.getId(), e); } return null; }
protected InstanceType loadAndCacheBpmnModelInstance(final DefinitionType definitionEntity) { final CommandContext commandContext = Context.getCommandContext(); InputStream bpmnResourceInputStream = commandContext.runWithoutAuthorization(new Callable<InputStream>() { public InputStream call() throws Exception { return new GetDeploymentResourceCmd(definitionEntity.getDeploymentId(), definitionEntity.getResourceName()).execute(commandContext); } }); try { InstanceType bpmnModelInstance = readModelFromStream(bpmnResourceInputStream); instanceCache.put(definitionEntity.getId(), bpmnModelInstance); return bpmnModelInstance; } catch (Exception e) { throwLoadModelException(definitionEntity.getId(), e); } return null; }
protected InstanceType loadAndCacheBpmnModelInstance(final DefinitionType definitionEntity) { final CommandContext commandContext = Context.getCommandContext(); InputStream bpmnResourceInputStream = commandContext.runWithoutAuthorization(new Callable<InputStream>() { public InputStream call() throws Exception { return new GetDeploymentResourceCmd(definitionEntity.getDeploymentId(), definitionEntity.getResourceName()).execute(commandContext); } }); try { InstanceType bpmnModelInstance = readModelFromStream(bpmnResourceInputStream); instanceCache.put(definitionEntity.getId(), bpmnModelInstance); return bpmnModelInstance; } catch (Exception e) { throwLoadModelException(definitionEntity.getId(), e); } return null; }