Created
February 8, 2017 03:01
-
-
Save JunqiangYang/8a89fdbe8ef4d1c27ad7bd3ce41ef20c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class WorkflowPaymentTestUT extends BaseWorkflowTest { | |
private static String businessKey = "1"; | |
private String processDefinitionKey = "payment"; | |
@Before | |
public void setUp() throws Exception { | |
PropertyFileUtil.init(); | |
String filePath = getProcessDefinitionXmlDir() + "erp/payment/payment.bpmn20.xml"; | |
deployprocessDefinition(filePath); | |
} | |
@Test | |
public void verifyProcess() { | |
List<ProcessDefinition> list = repositoryService.createProcessDefinitionQuery() | |
.processDefinitionKey(processDefinitionKey).list(); | |
Assert.assertEquals(1, list.size()); | |
} | |
/** | |
* 使用垫付方式启动流程 | |
*/ | |
@Test | |
public void startWithPayStyleOfAdvance() { | |
Map<String, Object> variables = WorkflowUtils.createEmptyVariables(); | |
variables.put("paymentMode", "advance"); | |
setPaymentVars(variables); | |
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processDefinitionKey, businessKey, variables); | |
Assert.assertNotNull(processInstance); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment