use of org.jbpm.ruleflow.core.RuleFlowProcess in project jbpm by kiegroup.
the class CompensationTest method testCompensationEventSubProcessSpecific.
@Test
public void testCompensationEventSubProcessSpecific() throws Exception {
String processId = "org.jbpm.process.compensation.event.subprocess";
String[] workItemNames = { "kwik", "kwek", "kwak" };
List<String> eventList = new ArrayList<String>();
RuleFlowProcess process = createCompensationEventSubProcessProcess(processId, workItemNames, eventList);
Node toCompensateNode = findNode(process, "sub0");
String compensationEvent = (String) toCompensateNode.getMetaData().get("UniqueId");
// run process
ksession = createKieSession(process);
runCompensationEventSubProcessSpecificTest(ksession, process, processId, workItemNames, eventList, compensationEvent);
}
use of org.jbpm.ruleflow.core.RuleFlowProcess in project jbpm by kiegroup.
the class CompensationTest method testNestedCompensationBoundaryEventSpecific.
@Test
public void testNestedCompensationBoundaryEventSpecific() throws Exception {
String processId = "org.jbpm.process.compensation.boundary.nested";
String[] workItemNames = { "Don-Quixote", "Sancho", "Ricote" };
List<String> eventList = new ArrayList<String>();
RuleFlowProcess process = createNestedCompensationBoundaryEventProcess(processId, workItemNames, eventList);
// run process
ksession = createKieSession(process);
Node compensatedNode = findNode(process, "work-comp-1");
String compensationEvent = (String) compensatedNode.getMetaData().get("UniqueId");
runCompensationBoundaryEventSpecificTest(ksession, process, processId, workItemNames, eventList, compensationEvent);
}
use of org.jbpm.ruleflow.core.RuleFlowProcess in project jbpm by kiegroup.
the class CompensationTest method testCompensationEventSubProcessGeneral.
@Test
public void testCompensationEventSubProcessGeneral() throws Exception {
String processId = "org.jbpm.process.compensation.event.subprocess.general";
String[] workItemNames = { "kwik", "kwek", "kwak" };
List<String> eventList = new ArrayList<String>();
RuleFlowProcess process = createCompensationEventSubProcessProcess(processId, workItemNames, eventList);
String compensationEvent = CompensationScope.IMPLICIT_COMPENSATION_PREFIX + process.getId();
// run process
ksession = createKieSession(process);
runCompensationEventSubProcessGeneralTest(ksession, process, processId, workItemNames, eventList, compensationEvent);
}
use of org.jbpm.ruleflow.core.RuleFlowProcess in project jbpm by kiegroup.
the class CompensationTest method testCompensationBoundaryEventSpecific.
/*
* TESTS
*/
@Test
public void testCompensationBoundaryEventSpecific() throws Exception {
String processId = "org.jbpm.process.compensation.boundary";
String[] workItemNames = { "Don-Quixote", "Sancho", "Ricote" };
List<String> eventList = new ArrayList<String>();
RuleFlowProcess process = createCompensationBoundaryEventProcess(processId, workItemNames, eventList);
// run process
ksession = createKieSession(process);
Node compensatedNode = findNode(process, "work1");
String compensationEvent = (String) compensatedNode.getMetaData().get("UniqueId");
runCompensationBoundaryEventSpecificTest(ksession, process, processId, workItemNames, eventList, compensationEvent);
}
use of org.jbpm.ruleflow.core.RuleFlowProcess in project jbpm by kiegroup.
the class CompensationTest method testNestedCompensationEventSubProcessGeneral.
@Test
public void testNestedCompensationEventSubProcessGeneral() throws Exception {
String processId = "org.jbpm.process.compensation.event.subprocess.general";
String[] workItemNames = { "apple", "banana", "orange" };
List<String> eventList = new ArrayList<String>();
RuleFlowProcess process = createNestedCompensationEventSubProcessProcess(processId, workItemNames, eventList);
Node toCompensateNode = findNode(process, "sub0");
String compensationEvent = CompensationScope.IMPLICIT_COMPENSATION_PREFIX + toCompensateNode.getMetaData().get("UniqueId");
ksession = createKieSession(process);
runCompensationEventSubProcessGeneralTest(ksession, process, processId, workItemNames, eventList, compensationEvent);
}
Aggregations