01-02-2012 11:37 AM
String deploymentName;
if (workFlow.getModule().isInDevelopment()) {
deploymentName = workFlow.getName() + "_" + System.currentTimeMillis();
} else {
deploymentName = workFlow.getName() + "_" + workFlow.getModule().getVersion();
}
deploymentName += ".bpnm20.xml";
final Deployment deployment = repositoryService.createDeploymentQuery()
.deploymentName(deploymentName).singleResult();
if (deployment == null) {
final DeploymentBuilder deploymentBuilder = repositoryService.createDeployment()
.enableDuplicateFiltering().name(deploymentName);
if (workFlow.getImagePath() != null) {
deploymentBuilder.addInputStream(workFlow.getImagePath(), this.getClass()
.getResourceAsStream("/" + workFlow.getImagePath()));
}
deploymentBuilder.addInputStream(deploymentName, new ByteArrayInputStream(workFlow
.getWorkflow().getBytes("UTF-8")));
deploymentBuilder.deploy();
}
01-04-2012 05:38 AM
10-02-2014 11:13 AM
10-03-2014 05:26 AM
10-13-2014 03:38 AM
10-17-2014 06:38 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.