this.resourceName = resourceName;
}
public InputStream execute(CommandContext commandContext) {
if (deploymentId == null) {
throw new ActivitiException("deploymentId is null");
}
if(resourceName == null) {
throw new ActivitiException("resourceName is null");
}
ResourceEntity resource = commandContext
.getResourceManager()
.findResourceByDeploymentIdAndResourceName(deploymentId, resourceName);
if(resource == null) {
throw new ActivitiException("no resource found with name '" + resourceName + "' in deployment '" + deploymentId + "'");
}
return new ByteArrayInputStream(resource.getBytes());
}