junit 进行jbpm4实例

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

import org.jbpm.api.Configuration;
import org.jbpm.api.ProcessEngine;
import org.junit.Before;
import org.junit.Test;

public class leaveTest {
ProcessEngine processEngine;
@Test
public void test() throws FileNotFoundException {
ZipInputStream zipInputStream = new ZipInputStream(new FileInputStream("c:\\leave.zip"));
processEngine.getRepositoryService().createDeployment().addResourcesFromZipInputStream(zipInputStream).deploy();
  
}
    @Before
public void setUp(){
/* processEngine.getRepositoryService().createProcessDefinitionQuery()
.orderAsc(ProcessDefinitionQuery.PROPERTY_VERSION)
.list();*/
/*ZipInputStream zipInputStream = new ZipInputStream(new FileInputStream("c:\\leave.zip"));
processEngine.getRepositoryService().createDeployment().addResourcesFromZipInputStream(zipInputStream).deploy();*/
processEngine = Configuration.getProcessEngine();
}

/*public void testProcessInstance(){
System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
processEngine.getRepositoryService().createProcessDefinitionQuery()
.orderAsc(ProcessDefinitionQuery.PROPERTY_VERSION)
.list();
}*/

}

你可能感兴趣的:(JUnit)