jbpm 4.3 流程定义的发布

package com.family168;

import junit.framework.TestCase;
import org.jbpm.api.*;
import java.util.*;

public class Hello extends TestCase {
ProcessEngine processEngine;

public Hello() {
processEngine = Configuration.getProcessEngine();
}

public void testDeploy() {
RepositoryService repositoryService = processEngine
.getRepositoryService();
String deploymentId = repositoryService.createDeployment()
.addResourceFromClasspath("helloworld.jpdl.xml").deploy();
List<ProcessDefinition> list = repositoryService
.createProcessDefinitionQuery().list();
for (ProcessDefinition pd : list) {
System.out.println(pd.getId());
}
repositoryService.deleteDeploymentCascade(deploymentId);
System.out.println(repositoryService.createProcessDefinitionQuery()
.list().size());
}
}

你可能感兴趣的:(xml,JUnit,jbpm)