Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WorkflowPaymentTestUT
/**
* 测试收费/缴费流程
*
* @author HenryYan
*
*/
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
You can’t perform that action at this time.