[jboss-svn-commits] JBL Code SVN: r20810 - in labs/jbossrules/trunk/drools-compiler/src: main/java/org/drools/rule/builder and 13 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Jun 26 11:06:42 EDT 2008
Author: KrisVerlaenen
Date: 2008-06-26 11:06:41 -0400 (Thu, 26 Jun 2008)
New Revision: 20810
Added:
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/process/builder/ExtendedNodeBuilder.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessActionTest.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessWorkItemTest.java
Removed:
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/ruleflow_old.rfm
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ActionDialects.rf
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ActionDialects_old.rf
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ActionDialects_old.rfm
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ConstraintDialects.rf
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ConstraintDialects_old.rf
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ConstraintDialects_old.rfm
Modified:
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/process/builder/ActionNodeBuilder.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/process/builder/ProcessNodeBuilderRegistry.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/rule/builder/ActionBuilder.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/rule/builder/dialect/java/JavaActionBuilder.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/rule/builder/dialect/mvel/MVELActionBuilder.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/xml/ProcessSemanticModule.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/xml/processes/AbstractNodeHandler.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/xml/processes/ActionNodeHandler.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/xml/processes/SubProcessNodeHandler.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/xml/processes/WorkItemNodeHandler.java
labs/jbossrules/trunk/drools-compiler/src/main/resources/META-INF/drools-processes-4.0.xsd
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ExecutionFlowControlTest.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessMarchallingTest.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessTimerTest.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessUpgradeTest.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/process/builder/StoreNodeBuilder.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/rule/builder/dialect/java/JavaActionBuilderTest.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/rule/builder/dialect/mvel/MVELActionBuilderTest.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/rule/builder/dialect/mvel/MVELDecisionBuilderTest.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/xml/processes/XMLPersistenceTest.java
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ActionDialects.rfm
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ConstraintDialects.rfm
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/xml/XmlDslTest.xml
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/xml/XmlTest.xml
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/xml/processes/ActionNodeTest.xml
Log:
JBRULES-1658: Generalize action framework
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/process/builder/ActionNodeBuilder.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/process/builder/ActionNodeBuilder.java 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/process/builder/ActionNodeBuilder.java 2008-06-26 15:06:41 UTC (rev 20810)
@@ -9,20 +9,19 @@
import org.drools.workflow.core.impl.DroolsConsequenceAction;
import org.drools.workflow.core.node.ActionNode;
-public class ActionNodeBuilder
- implements
- ProcessNodeBuilder {
+public class ActionNodeBuilder extends ExtendedNodeBuilder {
public void build(Process process,
- ProcessDescr processDescr,
- ProcessBuildContext context,
- Node node) {
+ ProcessDescr processDescr,
+ ProcessBuildContext context,
+ Node node) {
+ super.build(process, processDescr, context, node);
ActionNode actionNode = ( ActionNode ) node;
DroolsConsequenceAction action = (DroolsConsequenceAction) actionNode.getAction();
ActionDescr actionDescr = new ActionDescr();
actionDescr.setText( action.getConsequence() );
Dialect dialect = context.getDialectRegistry().getDialect( action.getDialect() );
- dialect.getActionBuilder().build( context, actionNode, actionDescr );
+ dialect.getActionBuilder().build( context, action, actionDescr );
}
}
Added: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/process/builder/ExtendedNodeBuilder.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/process/builder/ExtendedNodeBuilder.java (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/process/builder/ExtendedNodeBuilder.java 2008-06-26 15:06:41 UTC (rev 20810)
@@ -0,0 +1,38 @@
+package org.drools.process.builder;
+
+import java.util.List;
+
+import org.drools.compiler.Dialect;
+import org.drools.lang.descr.ActionDescr;
+import org.drools.lang.descr.ProcessDescr;
+import org.drools.process.core.Process;
+import org.drools.rule.builder.ProcessBuildContext;
+import org.drools.workflow.core.DroolsAction;
+import org.drools.workflow.core.Node;
+import org.drools.workflow.core.impl.DroolsConsequenceAction;
+import org.drools.workflow.core.impl.ExtendedNodeImpl;
+
+public class ExtendedNodeBuilder
+ implements
+ ProcessNodeBuilder {
+
+ public void build(Process process,
+ ProcessDescr processDescr,
+ ProcessBuildContext context,
+ Node node) {
+ ExtendedNodeImpl extendedNode = ( ExtendedNodeImpl ) node;
+ for (String type: extendedNode.getActionTypes()) {
+ List<DroolsAction> actions = extendedNode.getActions(type);
+ if (actions != null) {
+ for (DroolsAction droolsAction: actions) {
+ DroolsConsequenceAction action = (DroolsConsequenceAction) droolsAction;
+ ActionDescr actionDescr = new ActionDescr();
+ actionDescr.setText( action.getConsequence() );
+ Dialect dialect = context.getDialectRegistry().getDialect( action.getDialect() );
+ dialect.getActionBuilder().build( context, action, actionDescr );
+ }
+ }
+ }
+ }
+
+}
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/process/builder/ProcessNodeBuilderRegistry.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/process/builder/ProcessNodeBuilderRegistry.java 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/process/builder/ProcessNodeBuilderRegistry.java 2008-06-26 15:06:41 UTC (rev 20810)
@@ -5,7 +5,15 @@
import org.drools.workflow.core.Node;
import org.drools.workflow.core.node.ActionNode;
+import org.drools.workflow.core.node.EndNode;
+import org.drools.workflow.core.node.FaultNode;
+import org.drools.workflow.core.node.MilestoneNode;
+import org.drools.workflow.core.node.RuleSetNode;
import org.drools.workflow.core.node.Split;
+import org.drools.workflow.core.node.StartNode;
+import org.drools.workflow.core.node.SubProcessNode;
+import org.drools.workflow.core.node.TimerNode;
+import org.drools.workflow.core.node.WorkItemNode;
public class ProcessNodeBuilderRegistry {
private Map<Class< ? extends Node>, ProcessNodeBuilder> registry;
@@ -13,6 +21,22 @@
public ProcessNodeBuilderRegistry() {
this.registry = new HashMap<Class< ? extends Node>, ProcessNodeBuilder>();
+ register( StartNode.class,
+ new ExtendedNodeBuilder() );
+ register( EndNode.class,
+ new ExtendedNodeBuilder() );
+ register( MilestoneNode.class,
+ new ExtendedNodeBuilder() );
+ register( RuleSetNode.class,
+ new ExtendedNodeBuilder() );
+ register( SubProcessNode.class,
+ new ExtendedNodeBuilder() );
+ register( WorkItemNode.class,
+ new ExtendedNodeBuilder() );
+ register( FaultNode.class,
+ new ExtendedNodeBuilder() );
+ register( TimerNode.class,
+ new ExtendedNodeBuilder() );
register( ActionNode.class,
new ActionNodeBuilder() );
register( Split.class,
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/rule/builder/ActionBuilder.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/rule/builder/ActionBuilder.java 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/rule/builder/ActionBuilder.java 2008-06-26 15:06:41 UTC (rev 20810)
@@ -1,12 +1,12 @@
package org.drools.rule.builder;
import org.drools.lang.descr.ActionDescr;
-import org.drools.workflow.core.node.ActionNode;
+import org.drools.workflow.core.DroolsAction;
public interface ActionBuilder {
public void build(final PackageBuildContext context,
- final ActionNode actionNode,
+ final DroolsAction action,
final ActionDescr actionDescr);
}
\ No newline at end of file
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/rule/builder/dialect/java/JavaActionBuilder.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/rule/builder/dialect/java/JavaActionBuilder.java 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/rule/builder/dialect/java/JavaActionBuilder.java 2008-06-26 15:06:41 UTC (rev 20810)
@@ -27,7 +27,7 @@
import org.drools.rule.builder.ActionBuilder;
import org.drools.rule.builder.PackageBuildContext;
import org.drools.rule.builder.ProcessBuildContext;
-import org.drools.workflow.core.node.ActionNode;
+import org.drools.workflow.core.DroolsAction;
/**
* @author etirelli
@@ -41,15 +41,15 @@
* @see org.drools.semantics.java.builder.ConsequenceBuilder#buildConsequence(org.drools.semantics.java.builder.BuildContext, org.drools.semantics.java.builder.BuildUtils, org.drools.lang.descr.RuleDescr)
*/
public void build(final PackageBuildContext context,
- final ActionNode actionNode,
+ final DroolsAction action,
final ActionDescr actionDescr) {
build( context,
- actionNode,
+ action,
actionDescr,
null );
}
public void build(final PackageBuildContext context,
- final ActionNode actionNode,
+ final DroolsAction action,
final ActionDescr actionDescr,
final VariableScope variableScope) {
@@ -82,7 +82,7 @@
(ProcessBuildContext)context,
className,
map,
- actionNode,
+ action,
actionDescr );
}
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/rule/builder/dialect/mvel/MVELActionBuilder.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/rule/builder/dialect/mvel/MVELActionBuilder.java 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/rule/builder/dialect/mvel/MVELActionBuilder.java 2008-06-26 15:06:41 UTC (rev 20810)
@@ -14,7 +14,7 @@
import org.drools.rule.MVELDialectRuntimeData;
import org.drools.rule.builder.ActionBuilder;
import org.drools.rule.builder.PackageBuildContext;
-import org.drools.workflow.core.node.ActionNode;
+import org.drools.workflow.core.DroolsAction;
import org.mvel.Macro;
import org.mvel.MacroProcessor;
@@ -65,7 +65,7 @@
}
public void build(final PackageBuildContext context,
- final ActionNode actionNode,
+ final DroolsAction action,
final ActionDescr actionDescr) {
String text = processMacros( actionDescr.getText() );
@@ -95,7 +95,7 @@
MVELDialectRuntimeData data = (MVELDialectRuntimeData) context.getPkg().getDialectRuntimeRegistry().getDialectData( "mvel" );
factory.setNextFactory( data.getFunctionFactory() );
- actionNode.setAction( new MVELAction( expr, factory ) );
+ action.setMetaData("Action", new MVELAction( expr, factory ) );
} catch ( final Exception e ) {
context.getErrors().add( new DescrBuildError( context.getParentDescr(),
actionDescr,
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/xml/ProcessSemanticModule.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/xml/ProcessSemanticModule.java 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/xml/ProcessSemanticModule.java 2008-06-26 15:06:41 UTC (rev 20810)
@@ -37,7 +37,7 @@
new StartNodeHandler() );
addHandler( "end",
new EndNodeHandler() );
- addHandler( "action",
+ addHandler( "actionNode",
new ActionNodeHandler() );
addHandler( "ruleSet",
new RuleSetNodeHandler() );
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/xml/processes/AbstractNodeHandler.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/xml/processes/AbstractNodeHandler.java 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/xml/processes/AbstractNodeHandler.java 2008-06-26 15:06:41 UTC (rev 20810)
@@ -1,14 +1,20 @@
package org.drools.xml.processes;
+import java.util.ArrayList;
import java.util.HashSet;
+import java.util.List;
+import org.drools.workflow.core.DroolsAction;
import org.drools.workflow.core.Node;
import org.drools.workflow.core.NodeContainer;
+import org.drools.workflow.core.impl.DroolsConsequenceAction;
+import org.drools.workflow.core.impl.ExtendedNodeImpl;
import org.drools.xml.BaseAbstractHandler;
import org.drools.xml.ExtensibleXmlParser;
import org.drools.xml.Handler;
-import org.drools.xml.ProcessBuildData;
+import org.drools.xml.XmlDumper;
import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
@@ -101,6 +107,37 @@
}
}
+ protected void handleAction(final Node node, final Element element, String type) {
+ NodeList nodeList = element.getChildNodes();
+ for (int i = 0; i < nodeList.getLength(); i++) {
+ org.w3c.dom.Node xmlNode = nodeList.item(i);
+ String nodeName = xmlNode.getNodeName();
+ if (nodeName.equals(type)) {
+ List<DroolsAction> actions = new ArrayList<DroolsAction>();
+ NodeList subNodeList = xmlNode.getChildNodes();
+ for (int j = 0; j < subNodeList.getLength(); j++) {
+ Element subXmlNode = (Element) subNodeList.item(j);
+ DroolsAction action = extractAction(subXmlNode);
+ actions.add(action);
+ }
+ ((ExtendedNodeImpl) node).setActions(type, actions);
+ return;
+ }
+ }
+ }
+
+ protected DroolsAction extractAction(Element xmlNode) {
+ String actionType = xmlNode.getAttribute("type");
+ if ("expression".equals(actionType)) {
+ String consequence = xmlNode.getTextContent();
+ DroolsConsequenceAction action = new DroolsConsequenceAction(xmlNode.getAttribute("dialect"), consequence);
+ return action;
+ } else {
+ throw new IllegalArgumentException(
+ "Unknown action type " + actionType);
+ }
+ }
+
public abstract void writeNode(final Node node, final StringBuffer xmlDump, final boolean includeMeta);
protected void writeNode(final String name, final Node node, final StringBuffer xmlDump, final boolean includeMeta) {
@@ -128,6 +165,40 @@
}
}
+ protected void writeActions(final String type, List<DroolsAction> actions, final StringBuffer xmlDump) {
+ if (actions != null && actions.size() > 0) {
+ xmlDump.append(" <" + type + ">" + EOL);
+ for (DroolsAction action: actions) {
+ writeAction(action, xmlDump);
+ }
+ xmlDump.append(" </" + type + ">" + EOL);
+ }
+ }
+
+ protected void writeAction(final DroolsAction action, final StringBuffer xmlDump) {
+ if (action instanceof DroolsConsequenceAction) {
+ DroolsConsequenceAction consequenceAction = (DroolsConsequenceAction) action;
+ xmlDump.append(" <action type=\"expression\" ");
+ String name = consequenceAction.getName();
+ if (name != null) {
+ xmlDump.append("name=\"" + name + "\" ");
+ }
+ String dialect = consequenceAction.getDialect();
+ if (dialect != null) {
+ xmlDump.append("dialect=\"" + dialect + "\" ");
+ }
+ String consequence = consequenceAction.getConsequence();
+ if (consequence == null) {
+ xmlDump.append("/>" + EOL);
+ } else {
+ xmlDump.append(">" + XmlDumper.replaceIllegalChars(consequence.trim()) + "</action>" + EOL);
+ }
+ } else {
+ throw new IllegalArgumentException(
+ "Unknown action " + action);
+ }
+ }
+
protected void endNode(final StringBuffer xmlDump) {
xmlDump.append("/>" + EOL);
}
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/xml/processes/ActionNodeHandler.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/xml/processes/ActionNodeHandler.java 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/xml/processes/ActionNodeHandler.java 2008-06-26 15:06:41 UTC (rev 20810)
@@ -1,12 +1,11 @@
package org.drools.xml.processes;
+import org.drools.workflow.core.DroolsAction;
import org.drools.workflow.core.Node;
import org.drools.workflow.core.impl.DroolsConsequenceAction;
import org.drools.workflow.core.node.ActionNode;
import org.drools.xml.ExtensibleXmlParser;
-import org.drools.xml.XmlDumper;
import org.w3c.dom.Element;
-import org.w3c.dom.Text;
import org.xml.sax.SAXException;
public class ActionNodeHandler extends AbstractNodeHandler {
@@ -20,16 +19,12 @@
throws SAXException {
super.handleNode(node, element, uri, localName, parser);
ActionNode actionNode = (ActionNode) node;
- String text = ((Text)element.getChildNodes().item( 0 )).getWholeText();
- if (text != null) {
- text.trim();
- if ("".equals(text)) {
- text = null;
- }
+ org.w3c.dom.Node xmlNode = element.getFirstChild();
+ if (xmlNode instanceof Element) {
+ Element actionXml = (Element) xmlNode;
+ DroolsAction action = extractAction(actionXml);
+ actionNode.setAction(action);
}
- final String dialect = element.getAttribute("dialect");
- DroolsConsequenceAction actionText = new DroolsConsequenceAction(dialect, text);
- actionNode.setAction(actionText);
}
public Class generateNodeFor() {
@@ -38,19 +33,12 @@
public void writeNode(Node node, StringBuffer xmlDump, boolean includeMeta) {
ActionNode actionNode = (ActionNode) node;
- writeNode("action", actionNode, xmlDump, includeMeta);
+ writeNode("actionNode", actionNode, xmlDump, includeMeta);
DroolsConsequenceAction action = (DroolsConsequenceAction) actionNode.getAction();
if (action != null) {
- String dialect = action.getDialect();
- if (dialect != null) {
- xmlDump.append("dialect=\"" + action.getDialect() + "\" ");
- }
- String consequence = action.getConsequence();
- if (consequence == null) {
- endNode(xmlDump);
- } else {
- xmlDump.append(">" + XmlDumper.replaceIllegalChars(consequence.trim()) + "</action>" + EOL);
- }
+ xmlDump.append(">" + EOL);
+ writeAction(action, xmlDump);
+ endNode("actionNode", xmlDump);
} else {
endNode(xmlDump);
}
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/xml/processes/SubProcessNodeHandler.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/xml/processes/SubProcessNodeHandler.java 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/xml/processes/SubProcessNodeHandler.java 2008-06-26 15:06:41 UTC (rev 20810)
@@ -25,6 +25,9 @@
subProcessNode.setWaitForCompletion(!"false".equals(waitForCompletion));
String independent = element.getAttribute("independent");
subProcessNode.setIndependent(!"false".equals(independent));
+ for (String eventType: subProcessNode.getActionTypes()) {
+ handleAction(node, element, eventType);
+ }
}
public Class generateNodeFor() {
@@ -59,6 +62,9 @@
+ "from=\"" + outMapping.getKey() + "\" "
+ "to=\"" + outMapping.getValue() + "\" />" + EOL);
}
+ for (String eventType: subProcessNode.getActionTypes()) {
+ writeActions(eventType, subProcessNode.getActions(eventType), xmlDump);
+ }
endNode("subProcess", xmlDump);
}
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/xml/processes/WorkItemNodeHandler.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/xml/processes/WorkItemNodeHandler.java 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/xml/processes/WorkItemNodeHandler.java 2008-06-26 15:06:41 UTC (rev 20810)
@@ -19,6 +19,9 @@
WorkItemNode workItemNode = (WorkItemNode) node;
final String waitForCompletion = element.getAttribute("waitForCompletion");
workItemNode.setWaitForCompletion(!"false".equals(waitForCompletion));
+ for (String eventType: workItemNode.getActionTypes()) {
+ handleAction(node, element, eventType);
+ }
}
protected Node createNode() {
@@ -38,6 +41,9 @@
visitWork(work, xmlDump, includeMeta);
visitInMappings(workItemNode.getInMappings(), xmlDump);
visitOutMappings(workItemNode.getOutMappings(), xmlDump);
+ for (String eventType: workItemNode.getActionTypes()) {
+ writeActions(eventType, workItemNode.getActions(eventType), xmlDump);
+ }
endNode("workItem", xmlDump);
}
@@ -69,11 +75,6 @@
if (work != null) {
xmlDump.append(" <work name=\"" + work.getName() + "\" >" + EOL);
for (ParameterDefinition paramDefinition: work.getParameterDefinitions()) {
- if (paramDefinition == null) {
- throw new IllegalArgumentException(
- "Could not find parameter definition " + paramDefinition.getName()
- + " for work " + work.getName());
- }
xmlDump.append(" <parameter name=\"" + paramDefinition.getName() + "\" " +
"type=\"" + paramDefinition.getType().getClass().getName() + "\" ");
Object value = work.getParameter(paramDefinition.getName());
Modified: labs/jbossrules/trunk/drools-compiler/src/main/resources/META-INF/drools-processes-4.0.xsd
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/resources/META-INF/drools-processes-4.0.xsd 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/main/resources/META-INF/drools-processes-4.0.xsd 2008-06-26 15:06:41 UTC (rev 20810)
@@ -95,7 +95,7 @@
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="drools:start"/>
<xs:element ref="drools:end"/>
- <xs:element ref="drools:action"/>
+ <xs:element ref="drools:actionNode"/>
<xs:element ref="drools:ruleSet"/>
<xs:element ref="drools:split"/>
<xs:element ref="drools:join"/>
@@ -128,16 +128,25 @@
<xs:attribute name="height" type="xs:string"/>
</xs:complexType>
</xs:element>
+ <xs:element name="actionNode">
+ <xs:complexType>
+ <xs:sequence minOccurs="0" maxOccurs="1">
+ <xs:element ref="drools:action"/>
+ </xs:sequence>
+ <xs:attribute name="id" type="xs:string" use="required"/>
+ <xs:attribute name="name" type="xs:string"/>
+ <xs:attribute name="x" type="xs:string"/>
+ <xs:attribute name="y" type="xs:string"/>
+ <xs:attribute name="width" type="xs:string"/>
+ <xs:attribute name="height" type="xs:string"/>
+ </xs:complexType>
+ </xs:element>
<xs:element name="action">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
- <xs:attribute name="id" type="xs:string" use="required"/>
<xs:attribute name="name" type="xs:string"/>
- <xs:attribute name="x" type="xs:string"/>
- <xs:attribute name="y" type="xs:string"/>
- <xs:attribute name="width" type="xs:string"/>
- <xs:attribute name="height" type="xs:string"/>
+ <xs:attribute name="type" type="xs:string"/>
<xs:attribute name="dialect" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
@@ -235,6 +244,8 @@
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="drools:work"/>
<xs:element ref="drools:mapping"/>
+ <xs:element ref="drools:onEntry"/>
+ <xs:element ref="drools:onExit"/>
</xs:choice>
<xs:attribute name="id" type="xs:string" use="required"/>
<xs:attribute name="name" type="xs:string"/>
@@ -270,8 +281,21 @@
<xs:attribute name="to" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
- <xs:element name="timer">
+ <xs:element name="onEntry">
<xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="drools:action"/>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="onExit">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="drools:action"/>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element> <xs:element name="timer">
+ <xs:complexType>
<xs:attribute name="id" type="xs:string" use="required"/>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="x" type="xs:string"/>
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ExecutionFlowControlTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ExecutionFlowControlTest.java 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ExecutionFlowControlTest.java 2008-06-26 15:06:41 UTC (rev 20810)
@@ -855,7 +855,7 @@
RuleBase ruleBase = RuleBaseFactory.newRuleBase();
ruleBase.addPackage( builder.getPackage() );
- ruleBase = SerializationHelper.serializeObject(ruleBase);
+ ruleBase = SerializationHelper.serializeObject(ruleBase);
StatefulSession session = ruleBase.newStatefulSession();
List list = new ArrayList();
Added: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessActionTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessActionTest.java (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessActionTest.java 2008-06-26 15:06:41 UTC (rev 20810)
@@ -0,0 +1,94 @@
+package org.drools.integrationtests;
+
+import java.io.Reader;
+import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.drools.RuleBase;
+import org.drools.RuleBaseFactory;
+import org.drools.WorkingMemory;
+import org.drools.compiler.PackageBuilder;
+import org.drools.process.instance.ProcessInstance;
+import org.drools.process.instance.WorkItem;
+import org.drools.process.instance.WorkItemHandler;
+import org.drools.process.instance.WorkItemManager;
+import org.drools.rule.Package;
+
+public class ProcessActionTest extends TestCase {
+
+ public void testOnEntryExit() {
+ PackageBuilder builder = new PackageBuilder();
+ Reader source = new StringReader(
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
+ "<process xmlns=\"http://drools.org/drools-4.0/process\"\n" +
+ " xmlns:xs=\"http://www.w3.org/2001/XMLSchema-instance\"\n" +
+ " xs:schemaLocation=\"http://drools.org/drools-4.0/process drools-processes-4.0.xsd\"\n" +
+ " type=\"RuleFlow\" name=\"flow\" id=\"org.drools.actions\" package-name=\"org.drools\" version=\"1\" >\n" +
+ "\n" +
+ " <header>\n" +
+ " <globals>\n" +
+ " <global identifier=\"list\" type=\"java.util.List\" />\n" +
+ " </globals>\n" +
+ " </header>\n" +
+ "\n" +
+ " <nodes>\n" +
+ " <start id=\"1\" name=\"Start\" />\n" +
+ " <workItem id=\"2\" name=\"HumanTask\" >\n" +
+ " <work name=\"Human Task\" >\n" +
+ " <parameter name=\"ActorId\" type=\"org.drools.process.core.datatype.impl.type.StringDataType\" >John Doe</parameter>\n" +
+ " <parameter name=\"TaskName\" type=\"org.drools.process.core.datatype.impl.type.StringDataType\" >Do something</parameter>\n" +
+ " <parameter name=\"Priority\" type=\"org.drools.process.core.datatype.impl.type.StringDataType\" />\n" +
+ " <parameter name=\"Comment\" type=\"org.drools.process.core.datatype.impl.type.StringDataType\" />\n" +
+ " </work>\n" +
+ " <onEntry>\n" +
+ " <action type=\"expression\" name=\"Print\" dialect=\"mvel\" >list.add(\"Executing on entry action\");</action>\n" +
+ " </onEntry>\n" +
+ " <onExit>\n" +
+ " <action type=\"expression\" name=\"Print\" dialect=\"java\" >list.add(\"Executing on exit action1\");</action>\n" +
+ " <action type=\"expression\" name=\"Print\" dialect=\"java\" >list.add(\"Executing on exit action2\");</action>\n" +
+ " </onExit>\n" +
+ " </workItem>\n" +
+ " <end id=\"3\" name=\"End\" />\n" +
+ " </nodes>\n" +
+ "\n" +
+ " <connections>\n" +
+ " <connection from=\"1\" to=\"2\" />\n" +
+ " <connection from=\"2\" to=\"3\" />\n" +
+ " </connections>\n" +
+ "\n" +
+ "</process>");
+ builder.addRuleFlow(source);
+ Package pkg = builder.getPackage();
+ RuleBase ruleBase = RuleBaseFactory.newRuleBase();
+ ruleBase.addPackage( pkg );
+ WorkingMemory workingMemory = ruleBase.newStatefulSession();
+ TestWorkItemHandler handler = new TestWorkItemHandler();
+ workingMemory.getWorkItemManager().registerWorkItemHandler("Human Task", handler);
+ List list = new ArrayList();
+ workingMemory.setGlobal("list", list);
+ ProcessInstance processInstance =
+ workingMemory.startProcess("org.drools.actions");
+ assertEquals(ProcessInstance.STATE_ACTIVE, processInstance.getState());
+ WorkItem workItem = handler.getWorkItem();
+ assertNotNull(workItem);
+ assertEquals(1, list.size());
+ workingMemory.getWorkItemManager().completeWorkItem(workItem.getId(), null);
+ assertEquals(3, list.size());
+ assertEquals(ProcessInstance.STATE_COMPLETED, processInstance.getState());
+ }
+
+ private static class TestWorkItemHandler implements WorkItemHandler {
+ private WorkItem workItem;
+ public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
+ this.workItem = workItem;
+ }
+ public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {
+ }
+ public WorkItem getWorkItem() {
+ return workItem;
+ }
+ }
+}
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessMarchallingTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessMarchallingTest.java 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessMarchallingTest.java 2008-06-26 15:06:41 UTC (rev 20810)
@@ -164,9 +164,13 @@
" <end id=\"4\" name=\"End\" />\n" +
" <split id=\"5\" name=\"AND\" type=\"1\" />\n" +
" <subProcess id=\"6\" name=\"SubProcess\" processId=\"com.sample.subflow\" />\n" +
- " <action id=\"7\" name=\"Action\" dialect=\"mvel\" >System.out.println(\"Executing action 1\");</action>\n" +
+ " <actionNode id=\"7\" name=\"Action\" >\n" +
+ " <action type=\"expression\" dialect=\"mvel\" >System.out.println(\"Executing action 1\");</action>\n" +
+ " </actionNode>/n" +
" <join id=\"8\" name=\"AND\" type=\"1\" />\n" +
- " <action id=\"9\" name=\"Action\" dialect=\"mvel\" >System.out.println(\"Executing action 2\");</action>\n" +
+ " <actionNode id=\"9\" name=\"Action\" >\n" +
+ " <action type=\"expression\" dialect=\"mvel\" >System.out.println(\"Executing action 2\");</action>\n" +
+ " </actionNode>\n" +
" <ruleSet id=\"10\" name=\"RuleSet\" ruleFlowGroup=\"flowgroup\" />\n" +
" <milestone id=\"11\" name=\"Event Wait\" >Person( )</milestone>\n" +
" <workItem id=\"12\" name=\"Log\" >\n" +
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessTimerTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessTimerTest.java 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessTimerTest.java 2008-06-26 15:06:41 UTC (rev 20810)
@@ -38,9 +38,11 @@
" <start id=\"1\" name=\"Start\" />\n" +
" <end id=\"2\" name=\"End\" />\n" +
" <timer id=\"3\" name=\"Timer\" delay=\"800\" period=\"200\" />\n" +
- " <action id=\"4\" name=\"Action\" dialect=\"java\" >System.out.println(\"Triggered\");\n" +
+ " <actionNode id=\"4\" name=\"Action\" >\n" +
+ " <action type=\"expression\" dialect=\"java\" >System.out.println(\"Triggered\");\n" +
"insert( new Message() );\n" +
"myList.add( new Message() );</action>\n" +
+ " </actionNode>/n" +
" <milestone id=\"5\" name=\"Wait\" >Number( intValue >= 5 ) from accumulate ( m: Message( ), count( m ) )</milestone>\n" +
" </nodes>\n" +
"\n" +
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessUpgradeTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessUpgradeTest.java 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessUpgradeTest.java 2008-06-26 15:06:41 UTC (rev 20810)
@@ -85,8 +85,10 @@
" <nodes>\n" +
" <start id=\"1\" name=\"Start\" />\n" +
" <ruleSet id=\"2\" name=\"Hello\" ruleFlowGroup=\"hello\" />\n" +
- " <action id=\"4\" name=\"Action\" dialect=\"java\">System.out.println();\n" +
+ " <actionNode id=\"4\" name=\"Action\" >" +
+ " <action type=\"expression\" dialect=\"java\">System.out.println();\n" +
"list.add(\"Executed\");</action>/n" +
+ " </actionNode>\n" +
" <end id=\"3\" name=\"End\" />\n" +
" </nodes>\n" +
" <connections>\n" +
Added: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessWorkItemTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessWorkItemTest.java (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessWorkItemTest.java 2008-06-26 15:06:41 UTC (rev 20810)
@@ -0,0 +1,97 @@
+package org.drools.integrationtests;
+
+import java.io.Reader;
+import java.io.StringReader;
+import java.util.HashMap;
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+import org.drools.RuleBase;
+import org.drools.RuleBaseFactory;
+import org.drools.WorkingMemory;
+import org.drools.compiler.PackageBuilder;
+import org.drools.process.instance.ProcessInstance;
+import org.drools.process.instance.WorkItem;
+import org.drools.process.instance.WorkItemHandler;
+import org.drools.process.instance.WorkItemManager;
+import org.drools.rule.Package;
+
+public class ProcessWorkItemTest extends TestCase {
+
+ public void testOnEntryExit() {
+ PackageBuilder builder = new PackageBuilder();
+ Reader source = new StringReader(
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
+ "<process xmlns=\"http://drools.org/drools-4.0/process\"\n" +
+ " xmlns:xs=\"http://www.w3.org/2001/XMLSchema-instance\"\n" +
+ " xs:schemaLocation=\"http://drools.org/drools-4.0/process drools-processes-4.0.xsd\"\n" +
+ " type=\"RuleFlow\" name=\"flow\" id=\"org.drools.actions\" package-name=\"org.drools\" version=\"1\" >\n" +
+ "\n" +
+ " <header>\n" +
+ " <variables>\n" +
+ " <variable name=\"UserName\" >\n" +
+ " <type name=\"org.drools.process.core.datatype.impl.type.StringDataType\" />\n" +
+ " <value>John Doe</value>\n" +
+ " </variable>\n" +
+ " </variables>\n" +
+ " </header>\n" +
+ "\n" +
+ " <nodes>\n" +
+ " <start id=\"1\" name=\"Start\" />\n" +
+ " <workItem id=\"2\" name=\"HumanTask\" >\n" +
+ " <work name=\"Human Task\" >\n" +
+ " <parameter name=\"ActorId\" type=\"org.drools.process.core.datatype.impl.type.StringDataType\" >#{UserName}</parameter>\n" +
+ " <parameter name=\"TaskName\" type=\"org.drools.process.core.datatype.impl.type.StringDataType\" >Do something</parameter>\n" +
+ " <parameter name=\"Priority\" type=\"org.drools.process.core.datatype.impl.type.StringDataType\" />\n" +
+ " <parameter name=\"Comment\" type=\"org.drools.process.core.datatype.impl.type.StringDataType\" />\n" +
+ " </work>\n" +
+ " </workItem>\n" +
+ " <end id=\"3\" name=\"End\" />\n" +
+ " </nodes>\n" +
+ "\n" +
+ " <connections>\n" +
+ " <connection from=\"1\" to=\"2\" />\n" +
+ " <connection from=\"2\" to=\"3\" />\n" +
+ " </connections>\n" +
+ "\n" +
+ "</process>");
+ builder.addRuleFlow(source);
+ Package pkg = builder.getPackage();
+ RuleBase ruleBase = RuleBaseFactory.newRuleBase();
+ ruleBase.addPackage( pkg );
+ WorkingMemory workingMemory = ruleBase.newStatefulSession();
+ TestWorkItemHandler handler = new TestWorkItemHandler();
+ workingMemory.getWorkItemManager().registerWorkItemHandler("Human Task", handler);
+ ProcessInstance processInstance =
+ workingMemory.startProcess("org.drools.actions");
+ assertEquals(ProcessInstance.STATE_ACTIVE, processInstance.getState());
+ WorkItem workItem = handler.getWorkItem();
+ assertNotNull(workItem);
+ assertEquals("John Doe", workItem.getParameter("ActorId"));
+ workingMemory.getWorkItemManager().completeWorkItem(workItem.getId(), null);
+ assertEquals(ProcessInstance.STATE_COMPLETED, processInstance.getState());
+
+ Map<String, Object> parameters = new HashMap<String, Object>();
+ parameters.put("UserName", "Jane Doe");
+ processInstance = workingMemory.startProcess("org.drools.actions", parameters);
+ assertEquals(ProcessInstance.STATE_ACTIVE, processInstance.getState());
+ workItem = handler.getWorkItem();
+ assertNotNull(workItem);
+ assertEquals("Jane Doe", workItem.getParameter("ActorId"));
+ workingMemory.getWorkItemManager().completeWorkItem(workItem.getId(), null);
+ assertEquals(ProcessInstance.STATE_COMPLETED, processInstance.getState());
+ }
+
+ private static class TestWorkItemHandler implements WorkItemHandler {
+ private WorkItem workItem;
+ public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
+ this.workItem = workItem;
+ }
+ public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {
+ }
+ public WorkItem getWorkItem() {
+ return workItem;
+ }
+ }
+}
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/process/builder/StoreNodeBuilder.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/process/builder/StoreNodeBuilder.java 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/process/builder/StoreNodeBuilder.java 2008-06-26 15:06:41 UTC (rev 20810)
@@ -14,9 +14,9 @@
ProcessNodeBuilder {
public void build(Process process,
- ProcessDescr processDescr,
- ProcessBuildContext context,
- Node node) {
+ ProcessDescr processDescr,
+ ProcessBuildContext context,
+ Node node) {
ActionNode actionNode = ( ActionNode ) node;
DroolsConsequenceAction action = (DroolsConsequenceAction) actionNode.getAction();
ActionDescr actionDescr = new ActionDescr();
@@ -24,7 +24,7 @@
Dialect dialect = context.getDialectRegistry().getDialect( action.getDialect() );
- dialect.getActionBuilder().build( context, actionNode, actionDescr );
+ dialect.getActionBuilder().build( context, action, actionDescr );
}
}
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/rule/builder/dialect/java/JavaActionBuilderTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/rule/builder/dialect/java/JavaActionBuilderTest.java 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/rule/builder/dialect/java/JavaActionBuilderTest.java 2008-06-26 15:06:41 UTC (rev 20810)
@@ -20,6 +20,8 @@
import org.drools.rule.builder.ProcessBuildContext;
import org.drools.spi.Action;
import org.drools.spi.KnowledgeHelper;
+import org.drools.workflow.core.DroolsAction;
+import org.drools.workflow.core.impl.DroolsConsequenceAction;
import org.drools.workflow.core.impl.WorkflowProcessImpl;
import org.drools.workflow.core.node.ActionNode;
@@ -54,8 +56,10 @@
pkgBuilder.addPackageFromDrl( new StringReader("package pkg1;\nglobal java.util.List list;\n") );
ActionNode actionNode = new ActionNode();
+ DroolsAction action = new DroolsConsequenceAction("java", null);
+ actionNode.setAction(action);
- javaDialect.getActionBuilder().build( context, actionNode, actionDescr );
+ javaDialect.getActionBuilder().build( context, action, actionDescr );
javaDialect.addProcess( context );
javaDialect.compileAll();
assertEquals( 0, javaDialect.getResults().size() );
@@ -68,7 +72,7 @@
wm.setGlobal( "list", list );
KnowledgeHelper knowledgeHelper = new DefaultKnowledgeHelper();
- ((Action)actionNode.getAction()).execute( knowledgeHelper, wm );
+ ((Action) actionNode.getAction().getMetaData("Action")).execute( knowledgeHelper, wm );
assertEquals("hello world", list.get(0) );
}
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/rule/builder/dialect/mvel/MVELActionBuilderTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/rule/builder/dialect/mvel/MVELActionBuilderTest.java 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/rule/builder/dialect/mvel/MVELActionBuilderTest.java 2008-06-26 15:06:41 UTC (rev 20810)
@@ -18,6 +18,8 @@
import org.drools.rule.builder.PackageBuildContext;
import org.drools.spi.Action;
import org.drools.spi.KnowledgeHelper;
+import org.drools.workflow.core.DroolsAction;
+import org.drools.workflow.core.impl.DroolsConsequenceAction;
import org.drools.workflow.core.node.ActionNode;
public class MVELActionBuilderTest extends TestCase {
@@ -42,10 +44,12 @@
pkgBuilder.addPackageFromDrl( new StringReader("package pkg1;\nglobal java.util.List list;\n") );
ActionNode actionNode = new ActionNode();
+ DroolsAction action = new DroolsConsequenceAction("mvel", null);
+ actionNode.setAction(action);
final MVELActionBuilder builder = new MVELActionBuilder();
builder.build( context,
- actionNode,
+ action,
actionDescr );
final RuleBase ruleBase = RuleBaseFactory.newRuleBase();
@@ -56,7 +60,7 @@
wm.setGlobal( "list", list );
KnowledgeHelper knowledgeHelper = new DefaultKnowledgeHelper();
- ((Action)actionNode.getAction()).execute( knowledgeHelper, wm );
+ ((Action) actionNode.getAction().getMetaData("Action")).execute( knowledgeHelper, wm );
assertEquals("hello world", list.get(0) );
}
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/rule/builder/dialect/mvel/MVELDecisionBuilderTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/rule/builder/dialect/mvel/MVELDecisionBuilderTest.java 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/rule/builder/dialect/mvel/MVELDecisionBuilderTest.java 2008-06-26 15:06:41 UTC (rev 20810)
@@ -18,6 +18,8 @@
import org.drools.rule.builder.PackageBuildContext;
import org.drools.spi.Action;
import org.drools.spi.KnowledgeHelper;
+import org.drools.workflow.core.DroolsAction;
+import org.drools.workflow.core.impl.DroolsConsequenceAction;
import org.drools.workflow.core.node.ActionNode;
public class MVELDecisionBuilderTest extends TestCase {
@@ -43,10 +45,12 @@
pkgBuilder.addPackageFromDrl( new StringReader("package pkg1;\nglobal java.util.List list;\n") );
ActionNode actionNode = new ActionNode();
+ DroolsAction action = new DroolsConsequenceAction("java", null);
+ actionNode.setAction(action);
final MVELActionBuilder builder = new MVELActionBuilder();
builder.build( context,
- actionNode,
+ action,
actionDescr );
final RuleBase ruleBase = RuleBaseFactory.newRuleBase();
@@ -57,7 +61,7 @@
wm.setGlobal( "list", list );
KnowledgeHelper knowledgeHelper = new DefaultKnowledgeHelper();
- ((Action)actionNode.getAction()).execute( knowledgeHelper, wm );
+ ((Action)actionNode.getAction().getMetaData("Action")).execute( knowledgeHelper, wm );
assertEquals("hello world", list.get(0) );
}
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/xml/processes/XMLPersistenceTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/xml/processes/XMLPersistenceTest.java 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/xml/processes/XMLPersistenceTest.java 2008-06-26 15:06:41 UTC (rev 20810)
@@ -207,7 +207,7 @@
milestone.setConstraint("constraint");
process.addNode(milestone);
connection = new ConnectionImpl(join, Node.CONNECTION_DEFAULT_TYPE, milestone, Node.CONNECTION_DEFAULT_TYPE);
- connection.setMetaData("bendpoints", "[10,10;20;20]");
+ connection.setMetaData("bendpoints", "[10,10;20,20]");
SubProcessNode subProcess = new SubProcessNode();
subProcess.setName("subProcess");
Deleted: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/ruleflow_old.rfm
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/ruleflow_old.rfm 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/ruleflow_old.rfm 2008-06-26 15:06:41 UTC (rev 20810)
@@ -1,151 +0,0 @@
-<org.drools.ruleflow.core.impl.RuleFlowProcessImpl id="1">
- <nodes id="2">
- <entry>
- <long>2</long>
- <org.drools.ruleflow.core.impl.RuleSetNodeImpl id="3">
- <ruleFlowGroup>flowgroup-1</ruleFlowGroup>
- <id>2</id>
- <name>RuleSet1</name>
- <incomingConnections id="4">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="5">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.StartNodeImpl" id="6">
- <id>1</id>
- <name>Start</name>
- <incomingConnections id="7"/>
- <outgoingConnections id="8">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="5"/>
- </outgoingConnections>
- </from>
- <to class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="3"/>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- </incomingConnections>
- <outgoingConnections id="9">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="10">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="3"/>
- <to class="org.drools.ruleflow.core.impl.SplitImpl" id="11">
- <type>1</type>
- <constraints id="12"/>
- <id>5</id>
- <name>Split</name>
- <incomingConnections id="13">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="10"/>
- </incomingConnections>
- <outgoingConnections id="14">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="15">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.SplitImpl" reference="11"/>
- <to class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" id="16">
- <ruleFlowGroup>flowgroup-2</ruleFlowGroup>
- <id>3</id>
- <name>RuleSet2</name>
- <incomingConnections id="17">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="15"/>
- </incomingConnections>
- <outgoingConnections id="18">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="19">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="16"/>
- <to class="org.drools.ruleflow.core.impl.JoinImpl" id="20">
- <type>1</type>
- <id>6</id>
- <name>Join</name>
- <incomingConnections id="21">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="22">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" id="23">
- <ruleFlowGroup>flowgroup-3</ruleFlowGroup>
- <id>4</id>
- <name>RuleSet3</name>
- <incomingConnections id="24">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="25">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.SplitImpl" reference="11"/>
- <to class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="23"/>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- </incomingConnections>
- <outgoingConnections id="26">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="22"/>
- </outgoingConnections>
- </from>
- <to class="org.drools.ruleflow.core.impl.JoinImpl" reference="20"/>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="19"/>
- </incomingConnections>
- <outgoingConnections id="27">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="28">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.JoinImpl" reference="20"/>
- <to class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" id="29">
- <ruleFlowGroup>flowgroup-4</ruleFlowGroup>
- <id>7</id>
- <name>RuleSet4</name>
- <incomingConnections id="30">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="28"/>
- </incomingConnections>
- <outgoingConnections id="31">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="32">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="29"/>
- <to class="org.drools.ruleflow.core.impl.EndNodeImpl" id="33">
- <id>8</id>
- <name>End</name>
- <incomingConnections id="34">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="32"/>
- </incomingConnections>
- <outgoingConnections id="35"/>
- </to>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- </outgoingConnections>
- </to>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- </outgoingConnections>
- </to>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- </outgoingConnections>
- </to>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="25"/>
- </outgoingConnections>
- </to>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- </outgoingConnections>
- </org.drools.ruleflow.core.impl.RuleSetNodeImpl>
- </entry>
- <entry>
- <long>4</long>
- <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="23"/>
- </entry>
- <entry>
- <long>8</long>
- <org.drools.ruleflow.core.impl.EndNodeImpl reference="33"/>
- </entry>
- <entry>
- <long>6</long>
- <org.drools.ruleflow.core.impl.JoinImpl reference="20"/>
- </entry>
- <entry>
- <long>1</long>
- <org.drools.ruleflow.core.impl.StartNodeImpl reference="6"/>
- </entry>
- <entry>
- <long>3</long>
- <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="16"/>
- </entry>
- <entry>
- <long>7</long>
- <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="29"/>
- </entry>
- <entry>
- <long>5</long>
- <org.drools.ruleflow.core.impl.SplitImpl reference="11"/>
- </entry>
- </nodes>
- <variables id="36"/>
- <lastNodeId>8</lastNodeId>
- <id>0</id>
- <name>flow</name>
- <type>Workflow</type>
- <packageName>com.sample</packageName>
-</org.drools.ruleflow.core.impl.RuleFlowProcessImpl>
\ No newline at end of file
Deleted: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ActionDialects.rf
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ActionDialects.rf 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ActionDialects.rf 2008-06-26 15:06:41 UTC (rev 20810)
@@ -1,296 +0,0 @@
-<org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper id="1" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ProcessWrapper>
- <default>
- <elements id="2">
- <entry>
- <string>3-Wrapper</string>
- <org.drools.eclipse.flow.ruleflow.core.ActionWrapper id="3" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <default>
- <constraint id="4">
- <x>239</x>
- <y>99</y>
- <width>80</width>
- <height>40</height>
- </constraint>
- <element class="org.drools.workflow.core.node.ActionNode" id="5">
- <action class="org.drools.workflow.core.impl.DroolsConsequenceAction" id="6">
- <dialect>java</dialect>
- <consequence>list.add( "java was here" )</consequence>
- </action>
- <id>3</id>
- <name>java</name>
- <incomingConnections id="7">
- <entry>
- <string>DROOLS_DEFAULT</string>
- <list id="8">
- <org.drools.workflow.core.impl.ConnectionImpl id="9">
- <from class="org.drools.workflow.core.node.ActionNode" id="10">
- <action class="org.drools.workflow.core.impl.DroolsConsequenceAction" id="11">
- <dialect>mvel</dialect>
- <consequence>list.add("mvel was here")</consequence>
- </action>
- <id>2</id>
- <name>mvel</name>
- <incomingConnections id="12">
- <entry>
- <string>DROOLS_DEFAULT</string>
- <list id="13">
- <org.drools.workflow.core.impl.ConnectionImpl id="14">
- <from class="org.drools.workflow.core.node.StartNode" id="15">
- <id>1</id>
- <name>Start</name>
- <incomingConnections id="16"/>
- <outgoingConnections id="17">
- <entry>
- <string>DROOLS_DEFAULT</string>
- <list id="18">
- <org.drools.workflow.core.impl.ConnectionImpl reference="14"/>
- </list>
- </entry>
- </outgoingConnections>
- <nodeContainer class="org.drools.ruleflow.core.RuleFlowProcess" id="19">
- <nodeContainer class="org.drools.ruleflow.core.RuleFlowProcess$WorkflowProcessNodeContainer" id="20">
- <outer-class class="org.drools.ruleflow.core.RuleFlowProcess" reference="19"/>
- <nodes id="21">
- <entry>
- <long>1</long>
- <org.drools.workflow.core.node.StartNode reference="15"/>
- </entry>
- <entry>
- <long>2</long>
- <org.drools.workflow.core.node.ActionNode reference="10"/>
- </entry>
- <entry>
- <long>3</long>
- <org.drools.workflow.core.node.ActionNode reference="5"/>
- </entry>
- <entry>
- <long>4</long>
- <org.drools.workflow.core.node.EndNode id="22">
- <id>4</id>
- <name>End</name>
- <incomingConnections id="23">
- <entry>
- <string>DROOLS_DEFAULT</string>
- <list id="24">
- <org.drools.workflow.core.impl.ConnectionImpl id="25">
- <from class="org.drools.workflow.core.node.ActionNode" reference="5"/>
- <to class="org.drools.workflow.core.node.EndNode" reference="22"/>
- <fromType>DROOLS_DEFAULT</fromType>
- <toType>DROOLS_DEFAULT</toType>
- </org.drools.workflow.core.impl.ConnectionImpl>
- </list>
- </entry>
- </incomingConnections>
- <outgoingConnections id="26"/>
- <nodeContainer class="org.drools.ruleflow.core.RuleFlowProcess" reference="19"/>
- </org.drools.workflow.core.node.EndNode>
- </entry>
- </nodes>
- <lastNodeId>4</lastNodeId>
- </nodeContainer>
- <imports id="27">
- <string>java.util.List</string>
- </imports>
- <globals id="28">
- <entry>
- <string>list</string>
- <string>List</string>
- </entry>
- </globals>
- <id>ActionDialects</id>
- <name>ActionDialects</name>
- <type>RuleFlow</type>
- <packageName>org.drools.test</packageName>
- <variableScope class="org.drools.process.core.impl.VariableScopeImpl" id="29">
- <variables id="30"/>
- </variableScope>
- </nodeContainer>
- </from>
- <to class="org.drools.workflow.core.node.ActionNode" reference="10"/>
- <fromType>DROOLS_DEFAULT</fromType>
- <toType>DROOLS_DEFAULT</toType>
- </org.drools.workflow.core.impl.ConnectionImpl>
- </list>
- </entry>
- </incomingConnections>
- <outgoingConnections id="31">
- <entry>
- <string>DROOLS_DEFAULT</string>
- <list id="32">
- <org.drools.workflow.core.impl.ConnectionImpl reference="9"/>
- </list>
- </entry>
- </outgoingConnections>
- <nodeContainer class="org.drools.ruleflow.core.RuleFlowProcess" reference="19"/>
- </from>
- <to class="org.drools.workflow.core.node.ActionNode" reference="5"/>
- <fromType>DROOLS_DEFAULT</fromType>
- <toType>DROOLS_DEFAULT</toType>
- </org.drools.workflow.core.impl.ConnectionImpl>
- </list>
- </entry>
- </incomingConnections>
- <outgoingConnections id="33">
- <entry>
- <string>DROOLS_DEFAULT</string>
- <list id="34">
- <org.drools.workflow.core.impl.ConnectionImpl reference="25"/>
- </list>
- </entry>
- </outgoingConnections>
- <nodeContainer class="org.drools.ruleflow.core.RuleFlowProcess" reference="19"/>
- </element>
- <incomingConnections id="35">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="36" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <bendpoints id="37"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" id="38" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <default>
- <constraint id="39">
- <x>130</x>
- <y>99</y>
- <width>80</width>
- <height>40</height>
- </constraint>
- <element class="org.drools.workflow.core.node.ActionNode" reference="10"/>
- <incomingConnections id="40">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="41" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <bendpoints id="42"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.StartNodeWrapper" id="43" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <default>
- <constraint id="44">
- <x>24</x>
- <y>99</y>
- <width>80</width>
- <height>40</height>
- </constraint>
- <element class="org.drools.workflow.core.node.StartNode" reference="15"/>
- <incomingConnections id="45"/>
- <outgoingConnections id="46">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="41"/>
- </outgoingConnections>
- </default>
- </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- </source>
- <target class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" reference="38"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection reference="14"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </incomingConnections>
- <outgoingConnections id="47">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="36"/>
- </outgoingConnections>
- <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- <default>
- <descriptors id="48">
- <org.eclipse.ui.views.properties.TextPropertyDescriptor id="49">
- <id class="string">Name</id>
- <display>Name</display>
- <incompatible>false</incompatible>
- </org.eclipse.ui.views.properties.TextPropertyDescriptor>
- <org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor id="50">
- <process class="org.drools.ruleflow.core.RuleFlowProcess" reference="19"/>
- <actionNode reference="10"/>
- <id class="string">Action</id>
- <display>Action</display>
- <incompatible>false</incompatible>
- </org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor>
- </descriptors>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- </source>
- <target class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" reference="3"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection reference="9"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </incomingConnections>
- <outgoingConnections id="51">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="52" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <bendpoints id="53"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" reference="3"/>
- <target class="org.drools.eclipse.flow.ruleflow.core.EndNodeWrapper" id="54" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <default>
- <constraint id="55">
- <x>345</x>
- <y>100</y>
- <width>80</width>
- <height>40</height>
- </constraint>
- <element class="org.drools.workflow.core.node.EndNode" reference="22"/>
- <incomingConnections id="56">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="52"/>
- </incomingConnections>
- <outgoingConnections id="57"/>
- <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- </target>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection reference="25"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </outgoingConnections>
- <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- <default>
- <descriptors id="58">
- <org.eclipse.ui.views.properties.TextPropertyDescriptor reference="49"/>
- <org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor id="59">
- <process class="org.drools.ruleflow.core.RuleFlowProcess" reference="19"/>
- <actionNode reference="5"/>
- <id class="string">Action</id>
- <display>Action</display>
- <incompatible>false</incompatible>
- </org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor>
- </descriptors>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- </entry>
- <entry>
- <string>4-Wrapper</string>
- <org.drools.eclipse.flow.ruleflow.core.EndNodeWrapper reference="54"/>
- </entry>
- <entry>
- <string>2-Wrapper</string>
- <org.drools.eclipse.flow.ruleflow.core.ActionWrapper reference="38"/>
- </entry>
- <entry>
- <string>1-Wrapper</string>
- <org.drools.eclipse.flow.ruleflow.core.StartNodeWrapper reference="43"/>
- </entry>
- </elements>
- <process class="org.drools.ruleflow.core.RuleFlowProcess" reference="19"/>
- <routerLayout>2</routerLayout>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ProcessWrapper>
-</org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper>
\ No newline at end of file
Modified: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ActionDialects.rfm
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ActionDialects.rfm 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ActionDialects.rfm 2008-06-26 15:06:41 UTC (rev 20810)
@@ -15,8 +15,12 @@
<nodes>
<start id="1" name="Start" />
- <action id="2" name="mvel" dialect="mvel" >list.add("mvel was here")</action>
- <action id="3" name="java" dialect="java" >list.add("java was here");</action>
+ <actionNode id="2" name="mvel" >
+ <action type="expression" dialect="mvel" >list.add("mvel was here")</action>
+ </actionNode>
+ <actionNode id="3" name="java" >
+ <action type="expression" dialect="java" >list.add("java was here");</action>
+ </actionNode>
<end id="4" name="End" />
</nodes>
Deleted: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ActionDialects_old.rf
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ActionDialects_old.rf 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ActionDialects_old.rf 2008-06-26 15:06:41 UTC (rev 20810)
@@ -1,257 +0,0 @@
-<org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper id="1" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ProcessWrapper>
- <default>
- <elements id="2">
- <entry>
- <string>2-Wrapper</string>
- <org.drools.eclipse.flow.ruleflow.core.ActionWrapper id="3" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <default>
- <constraint id="4">
- <x>105</x>
- <y>78</y>
- <width>80</width>
- <height>40</height>
- </constraint>
- <element class="org.drools.ruleflow.core.impl.ActionNodeImpl" id="5">
- <action class="org.drools.ruleflow.core.impl.DroolsConsequenceAction" id="6">
- <dialect>mvel</dialect>
- <consequence>list.add( "mvel was here" )</consequence>
- </action>
- <id>2</id>
- <name>MVELAction</name>
- <incomingConnections id="7">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="8">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.StartNodeImpl" id="9">
- <id>1</id>
- <name>Start</name>
- <incomingConnections id="10"/>
- <outgoingConnections id="11">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="8"/>
- </outgoingConnections>
- </from>
- <to class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="5"/>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- </incomingConnections>
- <outgoingConnections id="12">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="13">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="5"/>
- <to class="org.drools.ruleflow.core.impl.ActionNodeImpl" id="14">
- <action class="org.drools.ruleflow.core.impl.DroolsConsequenceAction" id="15">
- <dialect>java</dialect>
- <consequence>list.add( "java was here" );</consequence>
- </action>
- <id>3</id>
- <name>JavaAction</name>
- <incomingConnections id="16">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="13"/>
- </incomingConnections>
- <outgoingConnections id="17">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="18">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="14"/>
- <to class="org.drools.ruleflow.core.impl.EndNodeImpl" id="19">
- <id>4</id>
- <name>End</name>
- <incomingConnections id="20">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="18"/>
- </incomingConnections>
- <outgoingConnections id="21"/>
- </to>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- </outgoingConnections>
- </to>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- </outgoingConnections>
- </element>
- <incomingConnections id="22">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="23" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <type>1</type>
- <bendpoints id="24"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.StartNodeWrapper" id="25" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <default>
- <constraint id="26">
- <x>105</x>
- <y>17</y>
- <width>80</width>
- <height>40</height>
- </constraint>
- <element class="org.drools.ruleflow.core.impl.StartNodeImpl" reference="9"/>
- <incomingConnections id="27"/>
- <outgoingConnections id="28">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="23"/>
- </outgoingConnections>
- </default>
- </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- </source>
- <target class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" reference="3"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection class="org.drools.ruleflow.core.impl.ConnectionImpl" reference="8"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </incomingConnections>
- <outgoingConnections id="29">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="30" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <type>1</type>
- <bendpoints id="31"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" reference="3"/>
- <target class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" id="32" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <default>
- <constraint id="33">
- <x>105</x>
- <y>149</y>
- <width>80</width>
- <height>40</height>
- </constraint>
- <element class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="14"/>
- <incomingConnections id="34">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="30"/>
- </incomingConnections>
- <outgoingConnections id="35">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="36" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <type>1</type>
- <bendpoints id="37"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" reference="32"/>
- <target class="org.drools.eclipse.flow.ruleflow.core.EndNodeWrapper" id="38" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <default>
- <constraint id="39">
- <x>104</x>
- <y>217</y>
- <width>80</width>
- <height>40</height>
- </constraint>
- <element class="org.drools.ruleflow.core.impl.EndNodeImpl" reference="19"/>
- <incomingConnections id="40">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="36"/>
- </incomingConnections>
- <outgoingConnections id="41"/>
- <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- </target>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection class="org.drools.ruleflow.core.impl.ConnectionImpl" reference="18"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </outgoingConnections>
- <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- <default>
- <descriptors id="42">
- <org.eclipse.ui.views.properties.TextPropertyDescriptor id="43">
- <id class="string">Name</id>
- <display>Name</display>
- <incompatible>false</incompatible>
- </org.eclipse.ui.views.properties.TextPropertyDescriptor>
- <org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor id="44">
- <process class="org.drools.ruleflow.core.impl.RuleFlowProcessImpl" id="45">
- <nodes id="46">
- <entry>
- <long>2</long>
- <org.drools.ruleflow.core.impl.ActionNodeImpl reference="5"/>
- </entry>
- <entry>
- <long>4</long>
- <org.drools.ruleflow.core.impl.EndNodeImpl reference="19"/>
- </entry>
- <entry>
- <long>1</long>
- <org.drools.ruleflow.core.impl.StartNodeImpl reference="9"/>
- </entry>
- <entry>
- <long>3</long>
- <org.drools.ruleflow.core.impl.ActionNodeImpl reference="14"/>
- </entry>
- </nodes>
- <variables id="47"/>
- <lastNodeId>4</lastNodeId>
- <imports id="48">
- <string>java.util.List</string>
- </imports>
- <globals id="49">
- <entry>
- <string>list</string>
- <string>List</string>
- </entry>
- </globals>
- <id>ActionDialects</id>
- <name>ActionDialects</name>
- <type>RuleFlow</type>
- <packageName>org.drools.test</packageName>
- </process>
- <actionNode class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="14"/>
- <id class="string">Action</id>
- <display>Action</display>
- <incompatible>false</incompatible>
- </org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor>
- </descriptors>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- </target>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection class="org.drools.ruleflow.core.impl.ConnectionImpl" reference="13"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </outgoingConnections>
- <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- <default>
- <descriptors id="50">
- <org.eclipse.ui.views.properties.TextPropertyDescriptor reference="43"/>
- <org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor id="51">
- <process class="org.drools.ruleflow.core.impl.RuleFlowProcessImpl" reference="45"/>
- <actionNode class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="5"/>
- <id class="string">Action</id>
- <display>Action</display>
- <incompatible>false</incompatible>
- </org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor>
- </descriptors>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- </entry>
- <entry>
- <string>4-Wrapper</string>
- <org.drools.eclipse.flow.ruleflow.core.EndNodeWrapper reference="38"/>
- </entry>
- <entry>
- <string>3-Wrapper</string>
- <org.drools.eclipse.flow.ruleflow.core.ActionWrapper reference="32"/>
- </entry>
- <entry>
- <string>1-Wrapper</string>
- <org.drools.eclipse.flow.ruleflow.core.StartNodeWrapper reference="25"/>
- </entry>
- </elements>
- <process class="org.drools.ruleflow.core.impl.RuleFlowProcessImpl" reference="45"/>
- <routerLayout>2</routerLayout>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ProcessWrapper>
-</org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper>
\ No newline at end of file
Deleted: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ActionDialects_old.rfm
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ActionDialects_old.rfm 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ActionDialects_old.rfm 2008-06-26 15:06:41 UTC (rev 20810)
@@ -1,87 +0,0 @@
-<org.drools.ruleflow.core.impl.RuleFlowProcessImpl id="1">
- <nodes id="2">
- <entry>
- <long>2</long>
- <org.drools.ruleflow.core.impl.ActionNodeImpl id="3">
- <action class="org.drools.ruleflow.core.impl.DroolsConsequenceAction" id="4">
- <dialect>mvel</dialect>
- <consequence>list.add( "mvel was here" )</consequence>
- </action>
- <id>2</id>
- <name>MVELAction</name>
- <incomingConnections id="5">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="6">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.StartNodeImpl" id="7">
- <id>1</id>
- <name>Start</name>
- <incomingConnections id="8"/>
- <outgoingConnections id="9">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="6"/>
- </outgoingConnections>
- </from>
- <to class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="3"/>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- </incomingConnections>
- <outgoingConnections id="10">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="11">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="3"/>
- <to class="org.drools.ruleflow.core.impl.ActionNodeImpl" id="12">
- <action class="org.drools.ruleflow.core.impl.DroolsConsequenceAction" id="13">
- <dialect>java</dialect>
- <consequence>list.add( "java was here" );</consequence>
- </action>
- <id>3</id>
- <name>JavaAction</name>
- <incomingConnections id="14">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="11"/>
- </incomingConnections>
- <outgoingConnections id="15">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="16">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="12"/>
- <to class="org.drools.ruleflow.core.impl.EndNodeImpl" id="17">
- <id>4</id>
- <name>End</name>
- <incomingConnections id="18">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="16"/>
- </incomingConnections>
- <outgoingConnections id="19"/>
- </to>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- </outgoingConnections>
- </to>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- </outgoingConnections>
- </org.drools.ruleflow.core.impl.ActionNodeImpl>
- </entry>
- <entry>
- <long>4</long>
- <org.drools.ruleflow.core.impl.EndNodeImpl reference="17"/>
- </entry>
- <entry>
- <long>1</long>
- <org.drools.ruleflow.core.impl.StartNodeImpl reference="7"/>
- </entry>
- <entry>
- <long>3</long>
- <org.drools.ruleflow.core.impl.ActionNodeImpl reference="12"/>
- </entry>
- </nodes>
- <variables id="20"/>
- <lastNodeId>4</lastNodeId>
- <imports id="21">
- <string>java.util.List</string>
- </imports>
- <globals id="22">
- <entry>
- <string>list</string>
- <string>List</string>
- </entry>
- </globals>
- <id>ActionDialects</id>
- <name>ActionDialects</name>
- <type>RuleFlow</type>
- <packageName>org.drools.test</packageName>
-</org.drools.ruleflow.core.impl.RuleFlowProcessImpl>
\ No newline at end of file
Deleted: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ConstraintDialects.rf
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ConstraintDialects.rf 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ConstraintDialects.rf 2008-06-26 15:06:41 UTC (rev 20810)
@@ -1,711 +0,0 @@
-<org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper id="1" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ProcessWrapper>
- <default>
- <elements id="2">
- <entry>
- <string>3-Wrapper</string>
- <org.drools.eclipse.flow.ruleflow.core.ActionWrapper id="3" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <default>
- <constraint id="4">
- <x>194</x>
- <y>40</y>
- <width>163</width>
- <height>40</height>
- </constraint>
- <element class="org.drools.workflow.core.node.ActionNode" id="5">
- <action class="org.drools.workflow.core.impl.DroolsConsequenceAction" id="6">
- <dialect>mvel</dialect>
- <consequence>outList.add("MVELCodeConstraint was here");</consequence>
- </action>
- <id>3</id>
- <name>MVELCodeConstraintAction</name>
- <incomingConnections id="7">
- <entry>
- <string>DROOLS_DEFAULT</string>
- <list id="8">
- <org.drools.workflow.core.impl.ConnectionImpl id="9">
- <from class="org.drools.workflow.core.node.Split" id="10">
- <type>3</type>
- <constraints id="11">
- <entry>
- <org.drools.workflow.core.impl.ConnectionImpl id="12">
- <from class="org.drools.workflow.core.node.Split" reference="10"/>
- <to class="org.drools.workflow.core.node.ActionNode" id="13">
- <action class="org.drools.workflow.core.impl.DroolsConsequenceAction" id="14">
- <dialect>mvel</dialect>
- <consequence>outList.add("MVELRuleConstraint was here");</consequence>
- </action>
- <id>6</id>
- <name>MVELRuleConstraintAction</name>
- <incomingConnections id="15">
- <entry>
- <string>DROOLS_DEFAULT</string>
- <list id="16">
- <org.drools.workflow.core.impl.ConnectionImpl reference="12"/>
- </list>
- </entry>
- </incomingConnections>
- <outgoingConnections id="17">
- <entry>
- <string>DROOLS_DEFAULT</string>
- <list id="18">
- <org.drools.workflow.core.impl.ConnectionImpl id="19">
- <from class="org.drools.workflow.core.node.ActionNode" reference="13"/>
- <to class="org.drools.workflow.core.node.Join" id="20">
- <type>1</type>
- <id>7</id>
- <name>Join</name>
- <incomingConnections id="21">
- <entry>
- <string>DROOLS_DEFAULT</string>
- <list id="22">
- <org.drools.workflow.core.impl.ConnectionImpl reference="19"/>
- <org.drools.workflow.core.impl.ConnectionImpl id="23">
- <from class="org.drools.workflow.core.node.ActionNode" id="24">
- <action class="org.drools.workflow.core.impl.DroolsConsequenceAction" id="25">
- <dialect>java</dialect>
- <consequence>outList.add("JavaRuleConstraint was here");</consequence>
- </action>
- <id>5</id>
- <name>JavaRuleConstraintAction</name>
- <incomingConnections id="26">
- <entry>
- <string>DROOLS_DEFAULT</string>
- <list id="27">
- <org.drools.workflow.core.impl.ConnectionImpl id="28">
- <from class="org.drools.workflow.core.node.Split" reference="10"/>
- <to class="org.drools.workflow.core.node.ActionNode" reference="24"/>
- <fromType>DROOLS_DEFAULT</fromType>
- <toType>DROOLS_DEFAULT</toType>
- </org.drools.workflow.core.impl.ConnectionImpl>
- </list>
- </entry>
- </incomingConnections>
- <outgoingConnections id="29">
- <entry>
- <string>DROOLS_DEFAULT</string>
- <list id="30">
- <org.drools.workflow.core.impl.ConnectionImpl reference="23"/>
- </list>
- </entry>
- </outgoingConnections>
- <nodeContainer class="org.drools.ruleflow.core.RuleFlowProcess" id="31">
- <nodeContainer class="org.drools.ruleflow.core.RuleFlowProcess$WorkflowProcessNodeContainer" id="32">
- <outer-class class="org.drools.ruleflow.core.RuleFlowProcess" reference="31"/>
- <nodes id="33">
- <entry>
- <long>1</long>
- <org.drools.workflow.core.node.StartNode id="34">
- <id>1</id>
- <name>Start</name>
- <incomingConnections id="35"/>
- <outgoingConnections id="36">
- <entry>
- <string>DROOLS_DEFAULT</string>
- <list id="37">
- <org.drools.workflow.core.impl.ConnectionImpl id="38">
- <from class="org.drools.workflow.core.node.StartNode" reference="34"/>
- <to class="org.drools.workflow.core.node.Split" reference="10"/>
- <fromType>DROOLS_DEFAULT</fromType>
- <toType>DROOLS_DEFAULT</toType>
- </org.drools.workflow.core.impl.ConnectionImpl>
- </list>
- </entry>
- </outgoingConnections>
- <nodeContainer class="org.drools.ruleflow.core.RuleFlowProcess" reference="31"/>
- </org.drools.workflow.core.node.StartNode>
- </entry>
- <entry>
- <long>2</long>
- <org.drools.workflow.core.node.Split reference="10"/>
- </entry>
- <entry>
- <long>3</long>
- <org.drools.workflow.core.node.ActionNode reference="5"/>
- </entry>
- <entry>
- <long>4</long>
- <org.drools.workflow.core.node.ActionNode id="39">
- <action class="org.drools.workflow.core.impl.DroolsConsequenceAction" id="40">
- <dialect>mvel</dialect>
- <consequence>outList.add("JavaCodeConstraint was here");</consequence>
- </action>
- <id>4</id>
- <name>JavaCodeConstraintAction</name>
- <incomingConnections id="41">
- <entry>
- <string>DROOLS_DEFAULT</string>
- <list id="42">
- <org.drools.workflow.core.impl.ConnectionImpl id="43">
- <from class="org.drools.workflow.core.node.Split" reference="10"/>
- <to class="org.drools.workflow.core.node.ActionNode" reference="39"/>
- <fromType>DROOLS_DEFAULT</fromType>
- <toType>DROOLS_DEFAULT</toType>
- </org.drools.workflow.core.impl.ConnectionImpl>
- </list>
- </entry>
- </incomingConnections>
- <outgoingConnections id="44">
- <entry>
- <string>DROOLS_DEFAULT</string>
- <list id="45">
- <org.drools.workflow.core.impl.ConnectionImpl id="46">
- <from class="org.drools.workflow.core.node.ActionNode" reference="39"/>
- <to class="org.drools.workflow.core.node.Join" reference="20"/>
- <fromType>DROOLS_DEFAULT</fromType>
- <toType>DROOLS_DEFAULT</toType>
- </org.drools.workflow.core.impl.ConnectionImpl>
- </list>
- </entry>
- </outgoingConnections>
- <nodeContainer class="org.drools.ruleflow.core.RuleFlowProcess" reference="31"/>
- </org.drools.workflow.core.node.ActionNode>
- </entry>
- <entry>
- <long>5</long>
- <org.drools.workflow.core.node.ActionNode reference="24"/>
- </entry>
- <entry>
- <long>6</long>
- <org.drools.workflow.core.node.ActionNode reference="13"/>
- </entry>
- <entry>
- <long>7</long>
- <org.drools.workflow.core.node.Join reference="20"/>
- </entry>
- <entry>
- <long>8</long>
- <org.drools.workflow.core.node.EndNode id="47">
- <id>8</id>
- <name>End</name>
- <incomingConnections id="48">
- <entry>
- <string>DROOLS_DEFAULT</string>
- <list id="49">
- <org.drools.workflow.core.impl.ConnectionImpl id="50">
- <from class="org.drools.workflow.core.node.Join" reference="20"/>
- <to class="org.drools.workflow.core.node.EndNode" reference="47"/>
- <fromType>DROOLS_DEFAULT</fromType>
- <toType>DROOLS_DEFAULT</toType>
- </org.drools.workflow.core.impl.ConnectionImpl>
- </list>
- </entry>
- </incomingConnections>
- <outgoingConnections id="51"/>
- <nodeContainer class="org.drools.ruleflow.core.RuleFlowProcess" reference="31"/>
- </org.drools.workflow.core.node.EndNode>
- </entry>
- </nodes>
- <lastNodeId>8</lastNodeId>
- </nodeContainer>
- <imports id="52">
- <string>java.util.List</string>
- </imports>
- <globals id="53">
- <entry>
- <string>inList</string>
- <string>List</string>
- </entry>
- <entry>
- <string>outList</string>
- <string>List</string>
- </entry>
- </globals>
- <id>ConstraintDialects</id>
- <name>ConstraintDialects</name>
- <type>RuleFlow</type>
- <packageName>org.drools.test</packageName>
- <variableScope class="org.drools.process.core.impl.VariableScopeImpl" id="54">
- <variables id="55"/>
- </variableScope>
- </nodeContainer>
- </from>
- <to class="org.drools.workflow.core.node.Join" reference="20"/>
- <fromType>DROOLS_DEFAULT</fromType>
- <toType>DROOLS_DEFAULT</toType>
- </org.drools.workflow.core.impl.ConnectionImpl>
- <org.drools.workflow.core.impl.ConnectionImpl reference="46"/>
- <org.drools.workflow.core.impl.ConnectionImpl id="56">
- <from class="org.drools.workflow.core.node.ActionNode" reference="5"/>
- <to class="org.drools.workflow.core.node.Join" reference="20"/>
- <fromType>DROOLS_DEFAULT</fromType>
- <toType>DROOLS_DEFAULT</toType>
- </org.drools.workflow.core.impl.ConnectionImpl>
- </list>
- </entry>
- </incomingConnections>
- <outgoingConnections id="57">
- <entry>
- <string>DROOLS_DEFAULT</string>
- <list id="58">
- <org.drools.workflow.core.impl.ConnectionImpl reference="50"/>
- </list>
- </entry>
- </outgoingConnections>
- <nodeContainer class="org.drools.ruleflow.core.RuleFlowProcess" reference="31"/>
- </to>
- <fromType>DROOLS_DEFAULT</fromType>
- <toType>DROOLS_DEFAULT</toType>
- </org.drools.workflow.core.impl.ConnectionImpl>
- </list>
- </entry>
- </outgoingConnections>
- <nodeContainer class="org.drools.ruleflow.core.RuleFlowProcess" reference="31"/>
- </to>
- <fromType>DROOLS_DEFAULT</fromType>
- <toType>DROOLS_DEFAULT</toType>
- </org.drools.workflow.core.impl.ConnectionImpl>
- <org.drools.workflow.core.impl.ConstraintImpl id="59">
- <name>MVELRuleConstraint</name>
- <constraint>list : List()
-eval( list.contains( 6 ) )</constraint>
- <priority>6</priority>
- <dialect>mvel</dialect>
- <type>rule</type>
- </org.drools.workflow.core.impl.ConstraintImpl>
- </entry>
- <entry>
- <org.drools.workflow.core.impl.ConnectionImpl reference="9"/>
- <org.drools.workflow.core.impl.ConstraintImpl id="60">
- <name>MVELCodeConstraint</name>
- <constraint>return inList.contains( 1 );</constraint>
- <priority>1</priority>
- <dialect>mvel</dialect>
- <type>code</type>
- </org.drools.workflow.core.impl.ConstraintImpl>
- </entry>
- <entry>
- <org.drools.workflow.core.impl.ConnectionImpl reference="28"/>
- <org.drools.workflow.core.impl.ConstraintImpl id="61">
- <name>JavaRuleConstraint</name>
- <constraint>list : List()
-eval( list.contains( 25 ) )</constraint>
- <priority>25</priority>
- <dialect>java</dialect>
- <type>rule</type>
- </org.drools.workflow.core.impl.ConstraintImpl>
- </entry>
- <entry>
- <org.drools.workflow.core.impl.ConnectionImpl reference="43"/>
- <org.drools.workflow.core.impl.ConstraintImpl id="62">
- <name>JavaCodeConstraint</name>
- <constraint>return inList.contains( 3 );</constraint>
- <priority>3</priority>
- <dialect>java</dialect>
- <type>code</type>
- </org.drools.workflow.core.impl.ConstraintImpl>
- </entry>
- </constraints>
- <id>2</id>
- <name>Split</name>
- <incomingConnections id="63">
- <entry>
- <string>DROOLS_DEFAULT</string>
- <list id="64">
- <org.drools.workflow.core.impl.ConnectionImpl reference="38"/>
- </list>
- </entry>
- </incomingConnections>
- <outgoingConnections id="65">
- <entry>
- <string>DROOLS_DEFAULT</string>
- <list id="66">
- <org.drools.workflow.core.impl.ConnectionImpl reference="9"/>
- <org.drools.workflow.core.impl.ConnectionImpl reference="43"/>
- <org.drools.workflow.core.impl.ConnectionImpl reference="28"/>
- <org.drools.workflow.core.impl.ConnectionImpl reference="12"/>
- </list>
- </entry>
- </outgoingConnections>
- <nodeContainer class="org.drools.ruleflow.core.RuleFlowProcess" reference="31"/>
- </from>
- <to class="org.drools.workflow.core.node.ActionNode" reference="5"/>
- <fromType>DROOLS_DEFAULT</fromType>
- <toType>DROOLS_DEFAULT</toType>
- </org.drools.workflow.core.impl.ConnectionImpl>
- </list>
- </entry>
- </incomingConnections>
- <outgoingConnections id="67">
- <entry>
- <string>DROOLS_DEFAULT</string>
- <list id="68">
- <org.drools.workflow.core.impl.ConnectionImpl reference="56"/>
- </list>
- </entry>
- </outgoingConnections>
- <nodeContainer class="org.drools.ruleflow.core.RuleFlowProcess" reference="31"/>
- </element>
- <incomingConnections id="69">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="70" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <bendpoints id="71"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.SplitWrapper" id="72" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <default>
- <constraint id="73">
- <x>121</x>
- <y>101</y>
- <width>48</width>
- <height>40</height>
- </constraint>
- <element class="org.drools.workflow.core.node.Split" reference="10"/>
- <incomingConnections id="74">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="75" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <bendpoints id="76"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.StartNodeWrapper" id="77" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <default>
- <constraint id="78">
- <x>19</x>
- <y>100</y>
- <width>80</width>
- <height>40</height>
- </constraint>
- <element class="org.drools.workflow.core.node.StartNode" reference="34"/>
- <incomingConnections id="79"/>
- <outgoingConnections id="80">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="75"/>
- </outgoingConnections>
- </default>
- </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- </source>
- <target class="org.drools.eclipse.flow.ruleflow.core.SplitWrapper" reference="72"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection reference="38"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </incomingConnections>
- <outgoingConnections id="81">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="70"/>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="82" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <bendpoints id="83"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.SplitWrapper" reference="72"/>
- <target class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" id="84" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <default>
- <constraint id="85">
- <x>194</x>
- <y>104</y>
- <width>165</width>
- <height>40</height>
- </constraint>
- <element class="org.drools.workflow.core.node.ActionNode" reference="39"/>
- <incomingConnections id="86">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="82"/>
- </incomingConnections>
- <outgoingConnections id="87">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="88" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <bendpoints id="89"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" reference="84"/>
- <target class="org.drools.eclipse.flow.ruleflow.core.JoinWrapper" id="90" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <default>
- <constraint id="91">
- <x>399</x>
- <y>101</y>
- <width>51</width>
- <height>40</height>
- </constraint>
- <element class="org.drools.workflow.core.node.Join" reference="20"/>
- <incomingConnections id="92">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="93" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <bendpoints id="94"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" id="95" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <default>
- <constraint id="96">
- <x>196</x>
- <y>228</y>
- <width>165</width>
- <height>40</height>
- </constraint>
- <element class="org.drools.workflow.core.node.ActionNode" reference="13"/>
- <incomingConnections id="97">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="98" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <bendpoints id="99"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.SplitWrapper" reference="72"/>
- <target class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" reference="95"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection reference="12"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </incomingConnections>
- <outgoingConnections id="100">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="93"/>
- </outgoingConnections>
- <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- <default>
- <descriptors id="101">
- <org.eclipse.ui.views.properties.TextPropertyDescriptor id="102">
- <id class="string">Name</id>
- <display>Name</display>
- <incompatible>false</incompatible>
- </org.eclipse.ui.views.properties.TextPropertyDescriptor>
- <org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor id="103">
- <process class="org.drools.ruleflow.core.RuleFlowProcess" reference="31"/>
- <actionNode reference="13"/>
- <id class="string">Action</id>
- <display>Action</display>
- <incompatible>false</incompatible>
- </org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor>
- </descriptors>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- </source>
- <target class="org.drools.eclipse.flow.ruleflow.core.JoinWrapper" reference="90"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection reference="19"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="104" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <bendpoints id="105"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" id="106" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <default>
- <constraint id="107">
- <x>196</x>
- <y>167</y>
- <width>165</width>
- <height>40</height>
- </constraint>
- <element class="org.drools.workflow.core.node.ActionNode" reference="24"/>
- <incomingConnections id="108">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="109" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <bendpoints id="110"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.SplitWrapper" reference="72"/>
- <target class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" reference="106"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection reference="28"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </incomingConnections>
- <outgoingConnections id="111">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="104"/>
- </outgoingConnections>
- <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- <default>
- <descriptors id="112">
- <org.eclipse.ui.views.properties.TextPropertyDescriptor reference="102"/>
- <org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor id="113">
- <process class="org.drools.ruleflow.core.RuleFlowProcess" reference="31"/>
- <actionNode reference="24"/>
- <id class="string">Action</id>
- <display>Action</display>
- <incompatible>false</incompatible>
- </org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor>
- </descriptors>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- </source>
- <target class="org.drools.eclipse.flow.ruleflow.core.JoinWrapper" reference="90"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection reference="23"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="88"/>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="114" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <bendpoints id="115"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" reference="3"/>
- <target class="org.drools.eclipse.flow.ruleflow.core.JoinWrapper" reference="90"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection reference="56"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </incomingConnections>
- <outgoingConnections id="116">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="117" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <bendpoints id="118"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.JoinWrapper" reference="90"/>
- <target class="org.drools.eclipse.flow.ruleflow.core.EndNodeWrapper" id="119" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <default>
- <constraint id="120">
- <x>480</x>
- <y>100</y>
- <width>80</width>
- <height>40</height>
- </constraint>
- <element class="org.drools.workflow.core.node.EndNode" reference="47"/>
- <incomingConnections id="121">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="117"/>
- </incomingConnections>
- <outgoingConnections id="122"/>
- <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- </target>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection reference="50"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </outgoingConnections>
- <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- </target>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection reference="46"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </outgoingConnections>
- <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- <default>
- <descriptors id="123">
- <org.eclipse.ui.views.properties.TextPropertyDescriptor reference="102"/>
- <org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor id="124">
- <process class="org.drools.ruleflow.core.RuleFlowProcess" reference="31"/>
- <actionNode reference="39"/>
- <id class="string">Action</id>
- <display>Action</display>
- <incompatible>false</incompatible>
- </org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor>
- </descriptors>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- </target>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection reference="43"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="109"/>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="98"/>
- </outgoingConnections>
- <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <org.drools.eclipse.flow.ruleflow.core.SplitWrapper>
- <default/>
- </org.drools.eclipse.flow.ruleflow.core.SplitWrapper>
- </source>
- <target class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" reference="3"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection reference="9"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </incomingConnections>
- <outgoingConnections id="125">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="114"/>
- </outgoingConnections>
- <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- <default>
- <descriptors id="126">
- <org.eclipse.ui.views.properties.TextPropertyDescriptor reference="102"/>
- <org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor id="127">
- <process class="org.drools.ruleflow.core.RuleFlowProcess" reference="31"/>
- <actionNode reference="5"/>
- <id class="string">Action</id>
- <display>Action</display>
- <incompatible>false</incompatible>
- </org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor>
- </descriptors>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- </entry>
- <entry>
- <string>4-Wrapper</string>
- <org.drools.eclipse.flow.ruleflow.core.ActionWrapper reference="84"/>
- </entry>
- <entry>
- <string>7-Wrapper</string>
- <org.drools.eclipse.flow.ruleflow.core.JoinWrapper reference="90"/>
- </entry>
- <entry>
- <string>2-Wrapper</string>
- <org.drools.eclipse.flow.ruleflow.core.SplitWrapper reference="72"/>
- </entry>
- <entry>
- <string>8-Wrapper</string>
- <org.drools.eclipse.flow.ruleflow.core.EndNodeWrapper reference="119"/>
- </entry>
- <entry>
- <string>1-Wrapper</string>
- <org.drools.eclipse.flow.ruleflow.core.StartNodeWrapper reference="77"/>
- </entry>
- <entry>
- <string>6-Wrapper</string>
- <org.drools.eclipse.flow.ruleflow.core.ActionWrapper reference="95"/>
- </entry>
- <entry>
- <string>5-Wrapper</string>
- <org.drools.eclipse.flow.ruleflow.core.ActionWrapper reference="106"/>
- </entry>
- </elements>
- <process class="org.drools.ruleflow.core.RuleFlowProcess" reference="31"/>
- <routerLayout>2</routerLayout>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ProcessWrapper>
-</org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper>
\ No newline at end of file
Modified: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ConstraintDialects.rfm
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ConstraintDialects.rfm 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ConstraintDialects.rfm 2008-06-26 15:06:41 UTC (rev 20810)
@@ -26,10 +26,18 @@
<constraint toNodeId="6" toType="DROOLS_DEFAULT" name="JavaCodeConstraint" priority="3" type="code" dialect="java" >return inList.contains( 3 );</constraint>
</constraints>
</split>
- <action id="3" name="MVELRuleConstraintAction" dialect="mvel" >outList.add("MVELRuleConstraint was here");</action>
- <action id="4" name="JavaRuleConstraintAction" dialect="java" >outList.add("JavaRuleConstraint was here");</action>
- <action id="5" name="MVELCodeConstraintAction" dialect="mvel" >outList.add("MVELCodeConstraint was here");</action>
- <action id="6" name="JavaCodeConstraintAction" dialect="java" >outList.add("JavaCodeConstraint was here");</action>
+ <actionNode id="3" name="MVELRuleConstraintAction" >
+ <action type="expression" dialect="mvel" >outList.add("MVELRuleConstraint was here");</action>
+ </actionNode>
+ <actionNode id="4" name="JavaRuleConstraintAction" >
+ <action type="expression" dialect="java" >outList.add("JavaRuleConstraint was here");</action>
+ </actionNode>
+ <actionNode id="5" name="MVELCodeConstraintAction" >
+ <action type="expression" dialect="mvel" >outList.add("MVELCodeConstraint was here");</action>
+ </actionNode>
+ <actionNode id="6" name="JavaCodeConstraintAction" >
+ <action type="expression" dialect="java" >outList.add("JavaCodeConstraint was here");</action>
+ </actionNode>
<join id="7" name="Join" type="1" />
<end id="8" name="End" />
</nodes>
Deleted: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ConstraintDialects_old.rf
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ConstraintDialects_old.rf 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ConstraintDialects_old.rf 2008-06-26 15:06:41 UTC (rev 20810)
@@ -1,628 +0,0 @@
-<org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper id="1" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ProcessWrapper>
- <default>
- <elements id="2">
- <entry>
- <string>5-Wrapper</string>
- <org.drools.eclipse.flow.ruleflow.core.SplitWrapper id="3" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <default>
- <constraint id="4">
- <x>259</x>
- <y>112</y>
- <width>80</width>
- <height>40</height>
- </constraint>
- <element class="org.drools.ruleflow.core.impl.SplitImpl" id="5">
- <type>3</type>
- <constraints id="6">
- <entry>
- <org.drools.ruleflow.core.impl.ConnectionImpl id="7">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.SplitImpl" reference="5"/>
- <to class="org.drools.ruleflow.core.impl.ActionNodeImpl" id="8">
- <action class="org.drools.ruleflow.core.impl.DroolsConsequenceAction" id="9">
- <dialect>java</dialect>
- <consequence>outList.add("JavaCodeConstraint was here");</consequence>
- </action>
- <id>7</id>
- <name>JavaCodeConstraintAction</name>
- <incomingConnections id="10">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="7"/>
- </incomingConnections>
- <outgoingConnections id="11">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="12">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="8"/>
- <to class="org.drools.ruleflow.core.impl.JoinImpl" id="13">
- <type>1</type>
- <id>10</id>
- <name>Join</name>
- <incomingConnections id="14">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="15">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.ActionNodeImpl" id="16">
- <action class="org.drools.ruleflow.core.impl.DroolsConsequenceAction" id="17">
- <dialect>mvel</dialect>
- <consequence>outList.add("MVELCodeConstraint was here");</consequence>
- </action>
- <id>6</id>
- <name>MVELCodeConstraintAction</name>
- <incomingConnections id="18">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="19">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.SplitImpl" reference="5"/>
- <to class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="16"/>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- </incomingConnections>
- <outgoingConnections id="20">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="15"/>
- </outgoingConnections>
- </from>
- <to class="org.drools.ruleflow.core.impl.JoinImpl" reference="13"/>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="12"/>
- <org.drools.ruleflow.core.impl.ConnectionImpl id="21">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.ActionNodeImpl" id="22">
- <action class="org.drools.ruleflow.core.impl.DroolsConsequenceAction" id="23">
- <dialect>mvel</dialect>
- <consequence>outList.add("MVELRuleConstraint was here");</consequence>
- </action>
- <id>8</id>
- <name>MVELRuleConstraintAction</name>
- <incomingConnections id="24">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="25">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.SplitImpl" reference="5"/>
- <to class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="22"/>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- </incomingConnections>
- <outgoingConnections id="26">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="21"/>
- </outgoingConnections>
- </from>
- <to class="org.drools.ruleflow.core.impl.JoinImpl" reference="13"/>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- <org.drools.ruleflow.core.impl.ConnectionImpl id="27">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.ActionNodeImpl" id="28">
- <action class="org.drools.ruleflow.core.impl.DroolsConsequenceAction" id="29">
- <dialect>java</dialect>
- <consequence>outList.add("JavaRuleConstraint was here");</consequence>
- </action>
- <id>9</id>
- <name>JavaRuleConstraintAction</name>
- <incomingConnections id="30">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="31">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.SplitImpl" reference="5"/>
- <to class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="28"/>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- </incomingConnections>
- <outgoingConnections id="32">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="27"/>
- </outgoingConnections>
- </from>
- <to class="org.drools.ruleflow.core.impl.JoinImpl" reference="13"/>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- </incomingConnections>
- <outgoingConnections id="33">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="34">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.JoinImpl" reference="13"/>
- <to class="org.drools.ruleflow.core.impl.EndNodeImpl" id="35">
- <id>4</id>
- <name>End</name>
- <incomingConnections id="36">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="34"/>
- </incomingConnections>
- <outgoingConnections id="37"/>
- </to>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- </outgoingConnections>
- </to>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- </outgoingConnections>
- </to>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- <org.drools.ruleflow.core.impl.ConstraintImpl id="38">
- <name>JavaCodeConstraint</name>
- <constraint>return inList.contains( 3 );</constraint>
- <priority>3</priority>
- <dialect>java</dialect>
- <type>eval</type>
- </org.drools.ruleflow.core.impl.ConstraintImpl>
- </entry>
- <entry>
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="31"/>
- <org.drools.ruleflow.core.impl.ConstraintImpl id="39">
- <name>JavaRuleConstraint</name>
- <constraint>list : List()
-eval( list.contains( 25 ) )</constraint>
- <priority>25</priority>
- <dialect>java</dialect>
- <type>rule</type>
- </org.drools.ruleflow.core.impl.ConstraintImpl>
- </entry>
- <entry>
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="25"/>
- <org.drools.ruleflow.core.impl.ConstraintImpl id="40">
- <name>MVELRuleConstraint</name>
- <constraint>list : List()
-eval( list.contains( 6 ) )</constraint>
- <priority>6</priority>
- <dialect>mvel</dialect>
- <type>rule</type>
- </org.drools.ruleflow.core.impl.ConstraintImpl>
- </entry>
- <entry>
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="19"/>
- <org.drools.ruleflow.core.impl.ConstraintImpl id="41">
- <name>MVELCodeConstraint</name>
- <constraint>return inList.contains( 1 );</constraint>
- <priority>1</priority>
- <dialect>mvel</dialect>
- <type>eval</type>
- </org.drools.ruleflow.core.impl.ConstraintImpl>
- </entry>
- </constraints>
- <id>5</id>
- <name>Split</name>
- <incomingConnections id="42">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="43">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.StartNodeImpl" id="44">
- <id>1</id>
- <name>Start</name>
- <incomingConnections id="45"/>
- <outgoingConnections id="46">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="43"/>
- </outgoingConnections>
- </from>
- <to class="org.drools.ruleflow.core.impl.SplitImpl" reference="5"/>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- </incomingConnections>
- <outgoingConnections id="47">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="19"/>
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="7"/>
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="25"/>
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="31"/>
- </outgoingConnections>
- </element>
- <incomingConnections id="48">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="49" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <type>1</type>
- <bendpoints id="50"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.StartNodeWrapper" id="51" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <default>
- <constraint id="52">
- <x>259</x>
- <y>12</y>
- <width>80</width>
- <height>40</height>
- </constraint>
- <element class="org.drools.ruleflow.core.impl.StartNodeImpl" reference="44"/>
- <incomingConnections id="53"/>
- <outgoingConnections id="54">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="49"/>
- </outgoingConnections>
- </default>
- </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- </source>
- <target class="org.drools.eclipse.flow.ruleflow.core.SplitWrapper" reference="3"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection class="org.drools.ruleflow.core.impl.ConnectionImpl" reference="43"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </incomingConnections>
- <outgoingConnections id="55">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="56" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <type>1</type>
- <bendpoints id="57"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.SplitWrapper" reference="3"/>
- <target class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" id="58" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <default>
- <constraint id="59">
- <x>11</x>
- <y>279</y>
- <width>80</width>
- <height>40</height>
- </constraint>
- <element class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="16"/>
- <incomingConnections id="60">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="56"/>
- </incomingConnections>
- <outgoingConnections id="61">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="62" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <type>1</type>
- <bendpoints id="63"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" reference="58"/>
- <target class="org.drools.eclipse.flow.ruleflow.core.JoinWrapper" id="64" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <default>
- <constraint id="65">
- <x>259</x>
- <y>451</y>
- <width>80</width>
- <height>40</height>
- </constraint>
- <element class="org.drools.ruleflow.core.impl.JoinImpl" reference="13"/>
- <incomingConnections id="66">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="62"/>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="67" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <type>1</type>
- <bendpoints id="68"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" id="69" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <default>
- <constraint id="70">
- <x>193</x>
- <y>279</y>
- <width>80</width>
- <height>40</height>
- </constraint>
- <element class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="8"/>
- <incomingConnections id="71">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="72" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <type>1</type>
- <bendpoints id="73"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.SplitWrapper" reference="3"/>
- <target class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" reference="69"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection class="org.drools.ruleflow.core.impl.ConnectionImpl" reference="7"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </incomingConnections>
- <outgoingConnections id="74">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="67"/>
- </outgoingConnections>
- <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- <default>
- <descriptors id="75">
- <org.eclipse.ui.views.properties.TextPropertyDescriptor id="76">
- <id class="string">Name</id>
- <display>Name</display>
- <incompatible>false</incompatible>
- </org.eclipse.ui.views.properties.TextPropertyDescriptor>
- <org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor id="77">
- <process class="org.drools.ruleflow.core.impl.RuleFlowProcessImpl" id="78">
- <nodes id="79">
- <entry>
- <long>4</long>
- <org.drools.ruleflow.core.impl.EndNodeImpl reference="35"/>
- </entry>
- <entry>
- <long>8</long>
- <org.drools.ruleflow.core.impl.ActionNodeImpl reference="22"/>
- </entry>
- <entry>
- <long>9</long>
- <org.drools.ruleflow.core.impl.ActionNodeImpl reference="28"/>
- </entry>
- <entry>
- <long>6</long>
- <org.drools.ruleflow.core.impl.ActionNodeImpl reference="16"/>
- </entry>
- <entry>
- <long>1</long>
- <org.drools.ruleflow.core.impl.StartNodeImpl reference="44"/>
- </entry>
- <entry>
- <long>7</long>
- <org.drools.ruleflow.core.impl.ActionNodeImpl reference="8"/>
- </entry>
- <entry>
- <long>10</long>
- <org.drools.ruleflow.core.impl.JoinImpl reference="13"/>
- </entry>
- <entry>
- <long>5</long>
- <org.drools.ruleflow.core.impl.SplitImpl reference="5"/>
- </entry>
- </nodes>
- <variables id="80"/>
- <lastNodeId>10</lastNodeId>
- <imports id="81">
- <string>java.util.List</string>
- </imports>
- <globals id="82">
- <entry>
- <string>inList</string>
- <string>List</string>
- </entry>
- <entry>
- <string>outList</string>
- <string>List</string>
- </entry>
- </globals>
- <id>ConstraintDialects</id>
- <name>ConstraintDialects</name>
- <type>RuleFlow</type>
- <packageName>org.drools.test</packageName>
- </process>
- <actionNode class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="8"/>
- <id class="string">Action</id>
- <display>Action</display>
- <incompatible>false</incompatible>
- </org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor>
- </descriptors>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- </source>
- <target class="org.drools.eclipse.flow.ruleflow.core.JoinWrapper" reference="64"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection class="org.drools.ruleflow.core.impl.ConnectionImpl" reference="12"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="83" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <type>1</type>
- <bendpoints id="84"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" id="85" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <default>
- <constraint id="86">
- <x>327</x>
- <y>279</y>
- <width>80</width>
- <height>40</height>
- </constraint>
- <element class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="22"/>
- <incomingConnections id="87">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="88" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <type>1</type>
- <bendpoints id="89"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.SplitWrapper" reference="3"/>
- <target class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" reference="85"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection class="org.drools.ruleflow.core.impl.ConnectionImpl" reference="25"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </incomingConnections>
- <outgoingConnections id="90">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="83"/>
- </outgoingConnections>
- <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- <default>
- <descriptors id="91">
- <org.eclipse.ui.views.properties.TextPropertyDescriptor reference="76"/>
- <org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor id="92">
- <process class="org.drools.ruleflow.core.impl.RuleFlowProcessImpl" reference="78"/>
- <actionNode class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="22"/>
- <id class="string">Action</id>
- <display>Action</display>
- <incompatible>false</incompatible>
- </org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor>
- </descriptors>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- </source>
- <target class="org.drools.eclipse.flow.ruleflow.core.JoinWrapper" reference="64"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection class="org.drools.ruleflow.core.impl.ConnectionImpl" reference="21"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="93" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <type>1</type>
- <bendpoints id="94"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" id="95" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <default>
- <constraint id="96">
- <x>505</x>
- <y>279</y>
- <width>80</width>
- <height>40</height>
- </constraint>
- <element class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="28"/>
- <incomingConnections id="97">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="98" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <type>1</type>
- <bendpoints id="99"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.SplitWrapper" reference="3"/>
- <target class="org.drools.eclipse.flow.ruleflow.core.ActionWrapper" reference="95"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection class="org.drools.ruleflow.core.impl.ConnectionImpl" reference="31"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </incomingConnections>
- <outgoingConnections id="100">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="93"/>
- </outgoingConnections>
- <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- <default>
- <descriptors id="101">
- <org.eclipse.ui.views.properties.TextPropertyDescriptor reference="76"/>
- <org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor id="102">
- <process class="org.drools.ruleflow.core.impl.RuleFlowProcessImpl" reference="78"/>
- <actionNode class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="28"/>
- <id class="string">Action</id>
- <display>Action</display>
- <incompatible>false</incompatible>
- </org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor>
- </descriptors>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- </source>
- <target class="org.drools.eclipse.flow.ruleflow.core.JoinWrapper" reference="64"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection class="org.drools.ruleflow.core.impl.ConnectionImpl" reference="27"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </incomingConnections>
- <outgoingConnections id="103">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="104" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <default>
- <type>1</type>
- <bendpoints id="105"/>
- <source class="org.drools.eclipse.flow.ruleflow.core.JoinWrapper" reference="64"/>
- <target class="org.drools.eclipse.flow.ruleflow.core.EndNodeWrapper" id="106" serialization="custom">
- <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <default>
- <constraint id="107">
- <x>259</x>
- <y>556</y>
- <width>80</width>
- <height>40</height>
- </constraint>
- <element class="org.drools.ruleflow.core.impl.EndNodeImpl" reference="35"/>
- <incomingConnections id="108">
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="104"/>
- </incomingConnections>
- <outgoingConnections id="109"/>
- <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- </target>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection class="org.drools.ruleflow.core.impl.ConnectionImpl" reference="34"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </outgoingConnections>
- <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- </target>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection class="org.drools.ruleflow.core.impl.ConnectionImpl" reference="15"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </outgoingConnections>
- <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- <default>
- <descriptors id="110">
- <org.eclipse.ui.views.properties.TextPropertyDescriptor reference="76"/>
- <org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor id="111">
- <process class="org.drools.ruleflow.core.impl.RuleFlowProcessImpl" reference="78"/>
- <actionNode class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="16"/>
- <id class="string">Action</id>
- <display>Action</display>
- <incompatible>false</incompatible>
- </org.drools.eclipse.flow.ruleflow.view.property.action.ActionPropertyDescriptor>
- </descriptors>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ActionWrapper>
- </target>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ElementConnection>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <default>
- <connection class="org.drools.ruleflow.core.impl.ConnectionImpl" reference="19"/>
- </default>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="72"/>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="88"/>
- <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="98"/>
- </outgoingConnections>
- <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
- </default>
- </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
- <org.drools.eclipse.flow.ruleflow.core.SplitWrapper>
- <default/>
- </org.drools.eclipse.flow.ruleflow.core.SplitWrapper>
- </org.drools.eclipse.flow.ruleflow.core.SplitWrapper>
- </entry>
- <entry>
- <string>9-Wrapper</string>
- <org.drools.eclipse.flow.ruleflow.core.ActionWrapper reference="95"/>
- </entry>
- <entry>
- <string>7-Wrapper</string>
- <org.drools.eclipse.flow.ruleflow.core.ActionWrapper reference="69"/>
- </entry>
- <entry>
- <string>4-Wrapper</string>
- <org.drools.eclipse.flow.ruleflow.core.EndNodeWrapper reference="106"/>
- </entry>
- <entry>
- <string>6-Wrapper</string>
- <org.drools.eclipse.flow.ruleflow.core.ActionWrapper reference="58"/>
- </entry>
- <entry>
- <string>10-Wrapper</string>
- <org.drools.eclipse.flow.ruleflow.core.JoinWrapper reference="64"/>
- </entry>
- <entry>
- <string>1-Wrapper</string>
- <org.drools.eclipse.flow.ruleflow.core.StartNodeWrapper reference="51"/>
- </entry>
- <entry>
- <string>8-Wrapper</string>
- <org.drools.eclipse.flow.ruleflow.core.ActionWrapper reference="85"/>
- </entry>
- </elements>
- <process class="org.drools.ruleflow.core.impl.RuleFlowProcessImpl" reference="78"/>
- <routerLayout>2</routerLayout>
- </default>
- </org.drools.eclipse.flow.common.editor.core.ProcessWrapper>
-</org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper>
\ No newline at end of file
Deleted: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ConstraintDialects_old.rfm
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ConstraintDialects_old.rfm 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ConstraintDialects_old.rfm 2008-06-26 15:06:41 UTC (rev 20810)
@@ -1,231 +0,0 @@
-<org.drools.ruleflow.core.impl.RuleFlowProcessImpl id="1">
- <nodes id="2">
- <entry>
- <long>4</long>
- <org.drools.ruleflow.core.impl.EndNodeImpl id="3">
- <id>4</id>
- <name>End</name>
- <incomingConnections id="4">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="5">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.JoinImpl" id="6">
- <type>1</type>
- <id>10</id>
- <name>Join</name>
- <incomingConnections id="7">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="8">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.ActionNodeImpl" id="9">
- <action class="org.drools.ruleflow.core.impl.DroolsConsequenceAction" id="10">
- <dialect>mvel</dialect>
- <consequence>outList.add("MVELCodeConstraint was here");</consequence>
- </action>
- <id>6</id>
- <name>MVELCodeConstraintAction</name>
- <incomingConnections id="11">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="12">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.SplitImpl" id="13">
- <type>3</type>
- <constraints id="14">
- <entry>
- <org.drools.ruleflow.core.impl.ConnectionImpl id="15">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.SplitImpl" reference="13"/>
- <to class="org.drools.ruleflow.core.impl.ActionNodeImpl" id="16">
- <action class="org.drools.ruleflow.core.impl.DroolsConsequenceAction" id="17">
- <dialect>java</dialect>
- <consequence>outList.add("JavaCodeConstraint was here");</consequence>
- </action>
- <id>7</id>
- <name>JavaCodeConstraintAction</name>
- <incomingConnections id="18">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="15"/>
- </incomingConnections>
- <outgoingConnections id="19">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="20">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="16"/>
- <to class="org.drools.ruleflow.core.impl.JoinImpl" reference="6"/>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- </outgoingConnections>
- </to>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- <org.drools.ruleflow.core.impl.ConstraintImpl id="21">
- <name>JavaCodeConstraint</name>
- <constraint>return inList.contains( 3 );</constraint>
- <priority>3</priority>
- <dialect>java</dialect>
- <type>code</type>
- </org.drools.ruleflow.core.impl.ConstraintImpl>
- </entry>
- <entry>
- <org.drools.ruleflow.core.impl.ConnectionImpl id="22">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.SplitImpl" reference="13"/>
- <to class="org.drools.ruleflow.core.impl.ActionNodeImpl" id="23">
- <action class="org.drools.ruleflow.core.impl.DroolsConsequenceAction" id="24">
- <dialect>java</dialect>
- <consequence>outList.add("JavaRuleConstraint was here");</consequence>
- </action>
- <id>9</id>
- <name>JavaRuleConstraintAction</name>
- <incomingConnections id="25">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="22"/>
- </incomingConnections>
- <outgoingConnections id="26">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="27">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="23"/>
- <to class="org.drools.ruleflow.core.impl.JoinImpl" reference="6"/>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- </outgoingConnections>
- </to>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- <org.drools.ruleflow.core.impl.ConstraintImpl id="28">
- <name>JavaRuleConstraint</name>
- <constraint>list : List()
-eval( list.contains( 25 ) )</constraint>
- <priority>25</priority>
- <dialect>java</dialect>
- <type>rule</type>
- </org.drools.ruleflow.core.impl.ConstraintImpl>
- </entry>
- <entry>
- <org.drools.ruleflow.core.impl.ConnectionImpl id="29">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.SplitImpl" reference="13"/>
- <to class="org.drools.ruleflow.core.impl.ActionNodeImpl" id="30">
- <action class="org.drools.ruleflow.core.impl.DroolsConsequenceAction" id="31">
- <dialect>mvel</dialect>
- <consequence>outList.add("MVELRuleConstraint was here");</consequence>
- </action>
- <id>8</id>
- <name>MVELRuleConstraintAction</name>
- <incomingConnections id="32">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="29"/>
- </incomingConnections>
- <outgoingConnections id="33">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="34">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="30"/>
- <to class="org.drools.ruleflow.core.impl.JoinImpl" reference="6"/>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- </outgoingConnections>
- </to>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- <org.drools.ruleflow.core.impl.ConstraintImpl id="35">
- <name>MVELRuleConstraint</name>
- <constraint>list : List()
-eval( list.contains( 6 ) )</constraint>
- <priority>6</priority>
- <dialect>mvel</dialect>
- <type>rule</type>
- </org.drools.ruleflow.core.impl.ConstraintImpl>
- </entry>
- <entry>
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="12"/>
- <org.drools.ruleflow.core.impl.ConstraintImpl id="36">
- <name>MVELCodeConstraint</name>
- <constraint>return inList.contains( 1 );</constraint>
- <priority>1</priority>
- <dialect>mvel</dialect>
- <type>code</type>
- </org.drools.ruleflow.core.impl.ConstraintImpl>
- </entry>
- </constraints>
- <id>5</id>
- <name>Split</name>
- <incomingConnections id="37">
- <org.drools.ruleflow.core.impl.ConnectionImpl id="38">
- <type>1</type>
- <from class="org.drools.ruleflow.core.impl.StartNodeImpl" id="39">
- <id>1</id>
- <name>Start</name>
- <incomingConnections id="40"/>
- <outgoingConnections id="41">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="38"/>
- </outgoingConnections>
- </from>
- <to class="org.drools.ruleflow.core.impl.SplitImpl" reference="13"/>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- </incomingConnections>
- <outgoingConnections id="42">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="12"/>
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="15"/>
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="29"/>
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="22"/>
- </outgoingConnections>
- </from>
- <to class="org.drools.ruleflow.core.impl.ActionNodeImpl" reference="9"/>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- </incomingConnections>
- <outgoingConnections id="43">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="8"/>
- </outgoingConnections>
- </from>
- <to class="org.drools.ruleflow.core.impl.JoinImpl" reference="6"/>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="20"/>
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="34"/>
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="27"/>
- </incomingConnections>
- <outgoingConnections id="44">
- <org.drools.ruleflow.core.impl.ConnectionImpl reference="5"/>
- </outgoingConnections>
- </from>
- <to class="org.drools.ruleflow.core.impl.EndNodeImpl" reference="3"/>
- </org.drools.ruleflow.core.impl.ConnectionImpl>
- </incomingConnections>
- <outgoingConnections id="45"/>
- </org.drools.ruleflow.core.impl.EndNodeImpl>
- </entry>
- <entry>
- <long>8</long>
- <org.drools.ruleflow.core.impl.ActionNodeImpl reference="30"/>
- </entry>
- <entry>
- <long>9</long>
- <org.drools.ruleflow.core.impl.ActionNodeImpl reference="23"/>
- </entry>
- <entry>
- <long>6</long>
- <org.drools.ruleflow.core.impl.ActionNodeImpl reference="9"/>
- </entry>
- <entry>
- <long>1</long>
- <org.drools.ruleflow.core.impl.StartNodeImpl reference="39"/>
- </entry>
- <entry>
- <long>7</long>
- <org.drools.ruleflow.core.impl.ActionNodeImpl reference="16"/>
- </entry>
- <entry>
- <long>10</long>
- <org.drools.ruleflow.core.impl.JoinImpl reference="6"/>
- </entry>
- <entry>
- <long>5</long>
- <org.drools.ruleflow.core.impl.SplitImpl reference="13"/>
- </entry>
- </nodes>
- <variables id="46"/>
- <lastNodeId>10</lastNodeId>
- <imports id="47">
- <string>java.util.List</string>
- </imports>
- <globals id="48">
- <entry>
- <string>inList</string>
- <string>List</string>
- </entry>
- <entry>
- <string>outList</string>
- <string>List</string>
- </entry>
- </globals>
- <id>ConstraintDialects</id>
- <name>ConstraintDialects</name>
- <type>RuleFlow</type>
- <packageName>org.drools.test</packageName>
-</org.drools.ruleflow.core.impl.RuleFlowProcessImpl>
\ No newline at end of file
Modified: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/xml/XmlDslTest.xml
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/xml/XmlDslTest.xml 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/xml/XmlDslTest.xml 2008-06-26 15:06:41 UTC (rev 20810)
@@ -17,7 +17,9 @@
<nodes>
<start id="1" name="start node" />
- <action id="2" name="action node" dialect="java">list.add( "action node was here" );</action>
+ <actionNode id="2" name="action node" >
+ <action type="expression" dialect="java">list.add( "action node was here" );</action>
+ </actionNode>
<mydsl:store id="3" name="store node">dsl was here</mydsl:store>
Modified: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/xml/XmlTest.xml
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/xml/XmlTest.xml 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/xml/XmlTest.xml 2008-06-26 15:06:41 UTC (rev 20810)
@@ -16,7 +16,9 @@
<nodes>
<start id="1" name="start node" />
- <action id="2" name="action node" dialect="java">list.add( "action node was here" );</action>
+ <actionNode id="2" name="action node" >
+ <action type="expression" dialect="java">list.add( "action node was here" );</action>
+ </actionNode>
<end id="3" name="end node" />
</nodes>
Modified: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/xml/processes/ActionNodeTest.xml
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/xml/processes/ActionNodeTest.xml 2008-06-26 15:06:23 UTC (rev 20809)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/xml/processes/ActionNodeTest.xml 2008-06-26 15:06:41 UTC (rev 20810)
@@ -14,7 +14,9 @@
<nodes>
<start id="1" name="start node" />
- <action id="2" name="action node" dialect="java">list.add( "action node was here" );</action>
+ <actionNode id="2" name="action node" >
+ <action type="expression" dialect="java">list.add( "action node was here" );</action>
+ </actionNode>
<end id="3" name="end node" />
</nodes>
More information about the jboss-svn-commits
mailing list