Permalink
Browse files

fix all tests

  • Loading branch information...
1 parent 6bddc4d commit 77b68c780ae27deaf44b3b59a173063b68476217 @mariofusco mariofusco committed with etirelli Nov 14, 2012
Showing 476 changed files with 1,818 additions and 2,618 deletions.
@@ -35,15 +35,15 @@
import org.drools.audit.event.RuleFlowLogEvent;
import org.drools.audit.event.RuleFlowNodeLogEvent;
import org.drools.audit.event.RuleFlowVariableLogEvent;
-import org.drools.impl.StatelessKnowledgeSessionImpl;
-import org.jbpm.process.audit.event.ExtendedRuleFlowLogEvent;
-import org.jbpm.process.instance.impl.ProcessInstanceImpl;
import org.kie.event.KnowledgeRuntimeEventManager;
import org.kie.event.process.ProcessCompletedEvent;
import org.kie.event.process.ProcessStartedEvent;
+import org.drools.impl.StatelessKnowledgeSessionImpl;
import org.kie.runtime.Environment;
import org.kie.runtime.EnvironmentName;
import org.kie.runtime.KnowledgeRuntime;
+import org.jbpm.process.audit.event.ExtendedRuleFlowLogEvent;
+import org.jbpm.process.instance.impl.ProcessInstanceImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -24,8 +24,8 @@
import org.drools.audit.event.LogEvent;
import org.drools.audit.event.RuleFlowLogEvent;
import org.drools.audit.event.RuleFlowNodeLogEvent;
-import org.hibernate.Session;
import org.kie.event.KnowledgeRuntimeEventManager;
+import org.hibernate.Session;
/**
* This class has been deprecated in favor of {@link JPAWorkingMemoryDbLogger}.
@@ -12,9 +12,9 @@
<mapping-file>META-INF/ProcessInstanceInfo.hbm.xml</mapping-file>
<mapping-file>META-INF/ExtraIndexes.hbm.xml</mapping-file>
- <class>org.kie.persistence.info.SessionInfo</class>
+ <class>org.drools.persistence.info.SessionInfo</class>
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
- <class>org.kie.persistence.info.WorkItemInfo</class>
+ <class>org.drools.persistence.info.WorkItemInfo</class>
<class>org.jbpm.process.audit.ProcessInstanceLog</class>
<class>org.jbpm.process.audit.NodeInstanceLog</class>
@@ -16,30 +16,21 @@
package org.jbpm.process.audit;
-import static org.jbpm.persistence.util.PersistenceUtil.JBPM_PERSISTENCE_UNIT_NAME;
-import static org.jbpm.persistence.util.PersistenceUtil.cleanUp;
-import static org.jbpm.persistence.util.PersistenceUtil.createEnvironment;
-import static org.jbpm.persistence.util.PersistenceUtil.setupWithPoolingDataSource;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.jbpm.persistence.util.PersistenceUtil.*;
+import static org.junit.Assert.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
-import org.drools.io.impl.ClassPathResource;
-import org.jbpm.process.instance.impl.demo.SystemOutWorkItemHandler;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
import org.kie.KnowledgeBase;
import org.kie.KnowledgeBaseFactory;
import org.kie.builder.KnowledgeBuilder;
import org.kie.builder.KnowledgeBuilderFactory;
import org.kie.builder.ResourceType;
+import org.drools.io.impl.ClassPathResource;
import org.kie.persistence.jpa.JPAKnowledgeService;
import org.kie.runtime.Environment;
import org.kie.runtime.KnowledgeSessionConfiguration;
@@ -48,6 +39,10 @@
import org.kie.runtime.process.WorkItem;
import org.kie.runtime.process.WorkItemHandler;
import org.kie.runtime.process.WorkItemManager;
+import org.jbpm.process.instance.impl.demo.SystemOutWorkItemHandler;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -13,11 +13,11 @@
</logger>
<!-- marshalling utils -->
- <logger name="org.kie.marshalling.util.CompareViaReflectionUtil">
+ <logger name="org.drools.marshalling.util.CompareViaReflectionUtil">
<level value="INFO"/>
</logger>
- <logger name="org.kie.marshalling.util">
+ <logger name="org.drools.marshalling.util">
<level value="DEBUG"/>
</logger>
@@ -2,7 +2,7 @@
<process xmlns="http://drools.org/drools-5.0/process"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="http://drools.org/drools-5.0/process drools-processes-5.0.xsd"
- type="RuleFlow" name="ruleflow" id="com.sample.ruleflow" package-name="org.kie.process.workflow" >
+ type="RuleFlow" name="ruleflow" id="com.sample.ruleflow" package-name="org.drools.process.workflow" >
<header>
</header>
@@ -2,7 +2,7 @@
<process xmlns="http://drools.org/drools-5.0/process"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="http://drools.org/drools-5.0/process drools-processes-5.0.xsd"
- type="RuleFlow" name="ruleflow2" id="com.sample.ruleflow2" package-name="org.kie.process.workflow" >
+ type="RuleFlow" name="ruleflow2" id="com.sample.ruleflow2" package-name="org.drools.process.workflow" >
<header>
</header>
@@ -2,7 +2,7 @@
<process xmlns="http://drools.org/drools-5.0/process"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="http://drools.org/drools-5.0/process drools-processes-5.0.xsd"
- type="RuleFlow" name="ruleflow" id="com.sample.ruleflow3" package-name="org.kie.process.workflow" >
+ type="RuleFlow" name="ruleflow" id="com.sample.ruleflow3" package-name="org.drools.process.workflow" >
<header>
<imports>
View
@@ -144,7 +144,7 @@
<Bundle-SymbolicName>org.jbpm.bpmn2;singleton:=true</Bundle-SymbolicName>
<_removeheaders>Ignore-Package</_removeheaders>
<Require-Bundle>org.jbpm.flow.builder;bundle-version="${jbpm.osgi.version}"</Require-Bundle>
- <Import-Package>!org.jbpm.*, !org.kie.*, *</Import-Package>
+ <Import-Package>!org.jbpm.*, !org.drools.*, *</Import-Package>
<Export-Package>org.jbpm.*</Export-Package>
<DynamicImport-Package>*</DynamicImport-Package>
<Bundle-Activator>org.jbpm.osgi.bpmn2.Activator</Bundle-Activator>
@@ -24,6 +24,7 @@
import org.drools.compiler.xml.XmlDumper;
import org.drools.rule.builder.dialect.java.JavaDialect;
+import org.drools.rule.builder.dialect.mvel.MVELDialect;
import org.drools.xml.BaseAbstractHandler;
import org.drools.xml.ExtensibleXmlParser;
import org.drools.xml.Handler;
@@ -39,7 +39,7 @@ public void writeNode(Node node, StringBuilder xmlDump, int metaDataType) {
DroolsConsequenceAction action = (DroolsConsequenceAction) actionNode.getAction();
if (action != null) {
String s = action.getConsequence();
- if (s.startsWith("org.kie.process.instance.impl.WorkItemImpl workItem = new org.kie.process.instance.impl.WorkItemImpl();")) {
+ if (s.startsWith("org.drools.process.instance.impl.WorkItemImpl workItem = new org.drools.process.instance.impl.WorkItemImpl();")) {
writeNode("intermediateThrowEvent", actionNode, xmlDump, metaDataType);
xmlDump.append(">" + EOL);
String variable = (String) actionNode.getMetaData("MappingVariable");
@@ -88,7 +88,7 @@ public void writeNode(Node node, StringBuilder xmlDump, int metaDataType) {
String type = s.substring(0, s.indexOf("\""));
xmlDump.append(" <compensateEventDefinition activityRef=\"" + XmlBPMNProcessDumper.replaceIllegalCharsAttribute(type.substring(11)) + "\"/>" + EOL);
endNode("intermediateThrowEvent", xmlDump);
- } else if (s.startsWith("org.kie.process.instance.context.exception.ExceptionScopeInstance scopeInstance = (org.kie.process.instance.context.exception.ExceptionScopeInstance) ((org.kie.workflow.instance.NodeInstance) kcontext.getNodeInstance()).resolveContextInstance(org.kie.process.core.context.exception.ExceptionScope.EXCEPTION_SCOPE, \"")) {
+ } else if (s.startsWith("org.drools.process.instance.context.exception.ExceptionScopeInstance scopeInstance = (org.drools.process.instance.context.exception.ExceptionScopeInstance) ((org.drools.workflow.instance.NodeInstance) kcontext.getNodeInstance()).resolveContextInstance(org.drools.process.core.context.exception.ExceptionScope.EXCEPTION_SCOPE, \"")) {
writeNode("intermediateThrowEvent", actionNode, xmlDump, metaDataType);
xmlDump.append(">" + EOL);
s = s.substring(327);
@@ -18,12 +18,12 @@
import java.util.List;
+import org.kie.definition.process.Connection;
import org.drools.xml.ExtensibleXmlParser;
import org.jbpm.bpmn2.core.SequenceFlow;
import org.jbpm.process.core.context.variable.VariableScope;
import org.jbpm.workflow.core.Node;
import org.jbpm.workflow.core.node.DynamicNode;
-import org.kie.definition.process.Connection;
import org.w3c.dom.Element;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
@@ -19,6 +19,7 @@
import java.util.HashSet;
import java.util.List;
+import org.kie.definition.process.Process;
import org.drools.xml.BaseAbstractHandler;
import org.drools.xml.ExtensibleXmlParser;
import org.drools.xml.Handler;
@@ -28,9 +29,9 @@
import org.jbpm.bpmn2.core.SequenceFlow;
import org.jbpm.process.core.context.variable.Variable;
import org.jbpm.workflow.core.Node;
-import org.kie.definition.process.Process;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
+
/**
* @author <a href="mailto:atoulme@intalio.com">Antoine Toulme</a>
*
@@ -25,9 +25,9 @@
import org.jbpm.workflow.core.node.FaultNode;
import org.jbpm.workflow.core.node.ForEachNode;
import org.jbpm.workflow.core.node.Join;
+import org.jbpm.workflow.core.node.ThrowLinkNode;
import org.jbpm.workflow.core.node.Split;
import org.jbpm.workflow.core.node.StateNode;
-import org.jbpm.workflow.core.node.ThrowLinkNode;
import org.jbpm.workflow.core.node.TimerNode;
import org.jbpm.workflow.core.node.WorkItemNode;
@@ -29,7 +29,9 @@
import org.jbpm.process.core.event.EventTypeFilter;
import org.jbpm.workflow.core.Node;
import org.jbpm.workflow.core.NodeContainer;
+import org.jbpm.workflow.core.node.EndNode;
import org.jbpm.workflow.core.node.EventNode;
+import org.jbpm.workflow.core.node.StateNode;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import org.xml.sax.Attributes;
@@ -22,10 +22,10 @@
import org.drools.xml.BaseAbstractHandler;
import org.drools.xml.ExtensibleXmlParser;
import org.drools.xml.Handler;
-import org.jbpm.bpmn2.core.Bpmn2Import;
import org.jbpm.bpmn2.core.DataStore;
import org.jbpm.bpmn2.core.Definitions;
import org.jbpm.bpmn2.core.Escalation;
+import org.jbpm.bpmn2.core.Bpmn2Import;
import org.jbpm.bpmn2.core.Interface;
import org.jbpm.bpmn2.core.ItemDefinition;
import org.jbpm.bpmn2.core.Message;
@@ -26,6 +26,7 @@
import org.jbpm.workflow.core.node.Assignment;
import org.jbpm.workflow.core.node.DataAssociation;
import org.jbpm.workflow.core.node.RuleSetNode;
+import org.jbpm.workflow.core.node.WorkItemNode;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import org.w3c.dom.Text;
@@ -19,12 +19,12 @@
import java.util.ArrayList;
import java.util.List;
+import org.kie.definition.process.Connection;
import org.jbpm.process.core.context.variable.Variable;
import org.jbpm.process.core.context.variable.VariableScope;
import org.jbpm.workflow.core.Node;
import org.jbpm.workflow.core.node.CompositeContextNode;
import org.jbpm.workflow.core.node.CompositeNode;
-import org.kie.definition.process.Connection;
import org.xml.sax.Attributes;
public class CompositeContextNodeHandler extends AbstractNodeHandler {
@@ -19,13 +19,13 @@
import java.util.HashSet;
import java.util.List;
+import org.kie.definition.process.Process;
import org.drools.xml.BaseAbstractHandler;
import org.drools.xml.ExtensibleXmlParser;
import org.drools.xml.Handler;
import org.jbpm.bpmn2.core.Definitions;
import org.jbpm.compiler.xml.ProcessBuildData;
import org.jbpm.ruleflow.core.RuleFlowProcess;
-import org.kie.definition.process.Process;
import org.w3c.dom.Element;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
@@ -166,11 +166,11 @@ public void handleMessageNode(final Node node, final Element element, final Stri
List<DroolsAction> actions = new ArrayList<DroolsAction>();
actions.add(new DroolsConsequenceAction("java",
- "org.kie.process.instance.impl.WorkItemImpl workItem = new org.kie.process.instance.impl.WorkItemImpl();" + EOL +
+ "org.drools.process.instance.impl.WorkItemImpl workItem = new org.drools.process.instance.impl.WorkItemImpl();" + EOL +
"workItem.setName(\"Send Task\");" + EOL +
"workItem.setParameter(\"MessageType\", \"" + message.getType() + "\");" + EOL +
(variable == null ? "" : "workItem.setParameter(\"Message\", " + variable + ");" + EOL) +
- "((org.kie.process.instance.WorkItemManager) kcontext.getKnowledgeRuntime().getWorkItemManager()).internalExecuteWorkItem(workItem);"));
+ "((org.drools.process.instance.WorkItemManager) kcontext.getKnowledgeRuntime().getWorkItemManager()).internalExecuteWorkItem(workItem);"));
endNode.setActions(EndNode.EVENT_NODE_ENTER, actions);
}
xmlNode = xmlNode.getNextSibling();
@@ -49,7 +49,7 @@ public void writeNode(Node node, StringBuilder xmlDump, int metaDataType) {
if (actions.size() == 1) {
DroolsConsequenceAction action = (DroolsConsequenceAction) actions.get(0);
String s = action.getConsequence();
- if (s.startsWith("org.kie.process.instance.impl.WorkItemImpl workItem = new org.kie.process.instance.impl.WorkItemImpl();")) {
+ if (s.startsWith("org.drools.process.instance.impl.WorkItemImpl workItem = new org.drools.process.instance.impl.WorkItemImpl();")) {
xmlDump.append(">" + EOL);
String variable = (String) endNode.getMetaData("MappingVariable");
if (variable != null) {
@@ -20,10 +20,10 @@
import java.util.List;
import org.drools.compiler.xml.XmlDumper;
+import org.kie.definition.process.Connection;
import org.jbpm.workflow.core.Node;
import org.jbpm.workflow.core.node.CompositeNode;
import org.jbpm.workflow.core.node.ForEachNode;
-import org.kie.definition.process.Connection;
import org.xml.sax.Attributes;
public class ForEachNodeHandler extends AbstractNodeHandler {
@@ -4,6 +4,7 @@
import java.util.HashSet;
import java.util.Map;
+import org.kie.definition.process.Process;
import org.drools.xml.BaseAbstractHandler;
import org.drools.xml.ExtensibleXmlParser;
import org.drools.xml.Handler;
@@ -5,6 +5,7 @@
import java.util.HashSet;
import java.util.Map;
+import org.kie.definition.process.Process;
import org.drools.xml.BaseAbstractHandler;
import org.drools.xml.ExtensibleXmlParser;
import org.drools.xml.Handler;
@@ -226,7 +226,7 @@ public void handleMessageNode(final Node node, final Element element,
actionNode
.setAction(new DroolsConsequenceAction(
"java",
- "org.kie.process.instance.impl.WorkItemImpl workItem = new org.kie.process.instance.impl.WorkItemImpl();"
+ "org.drools.process.instance.impl.WorkItemImpl workItem = new org.drools.process.instance.impl.WorkItemImpl();"
+ EOL
+ "workItem.setName(\"Send Task\");"
+ EOL
@@ -237,7 +237,7 @@ public void handleMessageNode(final Node node, final Element element,
+ (variable == null ? ""
: "workItem.setParameter(\"Message\", "
+ variable + ");" + EOL)
- + "((org.kie.process.instance.WorkItemManager) kcontext.getKnowledgeRuntime().getWorkItemManager()).internalExecuteWorkItem(workItem);"));
+ + "((org.drools.process.instance.WorkItemManager) kcontext.getKnowledgeRuntime().getWorkItemManager()).internalExecuteWorkItem(workItem);"));
}
xmlNode = xmlNode.getNextSibling();
}
@@ -20,6 +20,7 @@
import java.util.HashSet;
import java.util.List;
+import org.kie.definition.process.WorkflowProcess;
import org.drools.xml.BaseAbstractHandler;
import org.drools.xml.ExtensibleXmlParser;
import org.drools.xml.Handler;
@@ -29,7 +30,6 @@
import org.jbpm.process.core.context.variable.Variable;
import org.jbpm.ruleflow.core.RuleFlowProcess;
import org.jbpm.workflow.core.Node;
-import org.kie.definition.process.WorkflowProcess;
import org.w3c.dom.Element;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
@@ -22,6 +22,8 @@
import java.util.List;
import java.util.Map;
+import org.kie.definition.process.Node;
+import org.kie.definition.process.NodeContainer;
import org.drools.xml.BaseAbstractHandler;
import org.drools.xml.ExtensibleXmlParser;
import org.drools.xml.Handler;
@@ -59,8 +61,6 @@
import org.jbpm.workflow.core.node.Split;
import org.jbpm.workflow.core.node.StateBasedNode;
import org.jbpm.workflow.core.node.StateNode;
-import org.kie.definition.process.Node;
-import org.kie.definition.process.NodeContainer;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
@@ -109,7 +109,7 @@ public Object start(final String uri, final String localName,
process.setName(name);
process.setType("RuleFlow");
if (packageName == null) {
- packageName = "org.kie.bpmn2";
+ packageName = "org.drools.bpmn2";
}
process.setPackageName(packageName);
if ("true".equals(dynamic)) {
@@ -23,6 +23,7 @@
import org.drools.compiler.xml.XmlDumper;
import org.drools.process.core.Work;
+import org.drools.process.core.impl.WorkImpl;
import org.drools.xml.ExtensibleXmlParser;
import org.jbpm.workflow.core.Node;
import org.jbpm.workflow.core.node.HumanTaskNode;
Oops, something went wrong.

0 comments on commit 77b68c7

Please sign in to comment.