11-15-2011 09:32 AM
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
…
<property name="deploymentResources" value="classpath*:/my/app/act/validate.bpmn20.xml" />
</bean>
protected boolean deploymentsDiffer(DeploymentEntity deployment, DeploymentEntity saved) {
Map<String, ResourceEntity> resources = deployment.getResources();
Map<String, ResourceEntity> savedResources = saved.getResources();
if (!resources.keySet().equals(savedResources.keySet())) {
// !!! this is always the case because the auto-generated image is not there locally !!!
return true;
}
for (String resourceName: resources.keySet()) {
ResourceEntity resource = resources.get(resourceName);
byte[] bytes = resource.getBytes();
ResourceEntity savedResource = savedResources.get(resourceName);
byte[] savedBytes = savedResource.getBytes();
if (!Arrays.equals(bytes, savedBytes)) {
return true;
}
}
return false;
}
11-15-2011 10:17 AM
11-16-2011 02:08 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.