Skip to content

Instantly share code, notes, and snippets.

@henryyan
Created March 24, 2012 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save henryyan/2182869 to your computer and use it in GitHub Desktop.
Save henryyan/2182869 to your computer and use it in GitHub Desktop.
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