1 package org.jbpm.bpel.def; 2 3 import org.jbpm.bpel.db.AbstractDbTestCase; 4 import org.jbpm.bpel.service.def.Receiver; 5 6 public class ReceiveDbTest extends AbstractDbTestCase { 7 8 public void testCreateInstance() { 9 BpelDefinition processDefinition = new BpelDefinition(); 10 Receive receive = new Receive("child"); 11 receive.setCreateInstance(true); 12 processDefinition.addNode(receive); 13 14 processDefinition = saveAndReload(processDefinition); 15 16 receive = (Receive) processDefinition.getNode("child"); 17 assertTrue( receive.isCreateInstance() ); 18 } 19 20 public void testReceiver() { 21 BpelDefinition processDefinition = new BpelDefinition(); 22 Receive receive = new Receive("child"); 23 Receiver receiver = new Receiver(receive); 24 receive.setReceiver(receiver); 25 26 processDefinition.addNode(receive); 27 28 processDefinition = saveAndReload(processDefinition); 29 30 receive = (Receive) processDefinition.getNode("child"); 31 assertNotNull( receive.getReceiver() ); 32 } 33 } 34 | Popular Tags |