jbpm测试用例2

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.zip.ZipInputStream;

import org.jbpm.api.ProcessEngine;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class test {
static ZipInputStream zip ;
   public static void main(String[] args) throws FileNotFoundException {
   ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
       applicationContext.start();
       zip =new ZipInputStream(new FileInputStream("c:\\leave.zip"));
       ProcessEngine processEngine = (ProcessEngine)applicationContext.getBean("processEngine");
       processEngine.getRepositoryService().createDeployment().addResourcesFromZipInputStream(zip).deploy();
}
}

你可能感兴趣的:(jbpm)