KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jbpm > bpel > def > CompensateDbTest


1 package org.jbpm.bpel.def;
2
3 import org.jbpm.bpel.db.AbstractDbTestCase;
4
5 public class CompensateDbTest extends AbstractDbTestCase {
6   
7   public void testScope() {
8     BpelDefinition processDefinition = new BpelDefinition();
9     Scope scope = new Scope("parent");
10     processDefinition.addNode(scope);
11     
12     Compensate activity = new Compensate("activity");
13     scope.addNode(activity);
14     activity.setScope(scope);
15     
16     processDefinition = saveAndReload(processDefinition);
17
18     scope = (Scope) processDefinition.getNode("parent");
19     activity = (Compensate) scope.getNode("activity");
20     assertNotNull(activity.getScope());
21   }
22 }
23
Popular Tags