[jboss-user] [JBoss jBPM] - Re: Process Definition Deployment using ZipInputStream

jbarrez do-not-reply at jboss.com
Fri Jul 31 06:15:01 EDT 2009


I included a test case for this in the test suite, but the test succeeds. So either I'm testing the wrong thing or you are doing something wrong:


  |  public void testZippedResourceDeployment() {
  |     FileInputStream fip = null;
  |     try {
  |       
  |       fip = new FileInputStream("src/test/resources/org/jbpm/test/deploy/process.zip");
  |       ZipInputStream zis = new ZipInputStream(fip);
  |       
  |       NewDeployment newDeployment = repositoryService.createDeployment();
  |       newDeployment.addResourcesFromZipInputStream(zis);
  |       String deployId = newDeployment.deploy();
  |       
  |       ProcessDefinition procDef = repositoryService.createProcessDefinitionQuery()
  |                                                    .deploymentId(deployId)
  |                                                    .uniqueResult();
  |       assertNotNull(procDef);
  |       assertEquals("ImageTest", procDef.getName());
  |       repositoryService.deleteDeploymentCascade(deployId);
  |       
  |     } catch (IOException e) {
  |       fail(e.getMessage());
  |     } finally {
  |       if (fip != null) {
  |         try {
  |           fip.close();
  |         } catch (IOException e) {
  |           fail(e.getMessage());
  |         }
  |       }
  |     }
  |     
  |   }
  |   
  | 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247209#4247209

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247209



More information about the jboss-user mailing list