[jboss-svn-commits] JBL Code SVN: r16855 - in labs/jbossrules/trunk/drools-compiler/src: main/java/org/drools/rule/builder/dialect/java and 4 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Nov 27 06:35:05 EST 2007


Author: mark.proctor at jboss.com
Date: 2007-11-27 06:35:05 -0500 (Tue, 27 Nov 2007)
New Revision: 16855

Added:
   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.rfm
Modified:
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/Dialect.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/PackageBuilder.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/rule/builder/dialect/java/JavaDialect.java
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/rule/builder/dialect/mvel/MVELDialect.java
   labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/compiler/PackageBuilderConfigurationTest.java
   labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ExecutionFlowControlTest.java
Log:
JBRULES-1197 Extends actions support to include other dialects and callback
-added first end to end test for dialectable actions

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/Dialect.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/Dialect.java	2007-11-27 11:34:23 UTC (rev 16854)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/Dialect.java	2007-11-27 11:35:05 UTC (rev 16855)
@@ -17,6 +17,7 @@
 import org.drools.rule.builder.PackageBuildContext;
 import org.drools.rule.builder.PatternBuilder;
 import org.drools.rule.builder.PredicateBuilder;
+import org.drools.rule.builder.ProcessBuildContext;
 import org.drools.rule.builder.ProcessClassBuilder;
 import org.drools.rule.builder.QueryBuilder;
 import org.drools.rule.builder.ReturnValueBuilder;
@@ -86,6 +87,8 @@
     void compileAll();
 
     void addRule(final RuleBuildContext context);
+    
+    void addAction(final ProcessBuildContext context);
 
     void addFunction(final FunctionDescr functionDescr,
                      TypeResolver typeResolver);

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/PackageBuilder.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/PackageBuilder.java	2007-11-27 11:34:23 UTC (rev 16854)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/PackageBuilder.java	2007-11-27 11:35:05 UTC (rev 16855)
@@ -226,6 +226,7 @@
             processBuilder.addProcessFromFile( processSource );
             Process[] processes = processBuilder.getProcesses();
             for ( int i = 0; i < processes.length; i++ ) {
+                buildActions( processes[i] );
                 pkg.addRuleFlow( processes[i] );
             }
             this.results.addAll( processBuilder.getErrors() );
@@ -236,6 +237,14 @@
             this.results.add( new RuleFlowLoadError( "Unable to load the rule flow.",
                                                      e ) );
         }
+        
+        this.dialectRegistry.compileAll();
+
+        // some of the rules and functions may have been redefined
+        if ( this.pkg.getPackageCompilationData().isDirty() ) {
+            this.pkg.getPackageCompilationData().reload();
+        }
+        this.results = this.dialectRegistry.addResults( this.results );        
     }
 
     // @FIXME this is a hack to wire in Actions for now
@@ -245,14 +254,7 @@
         ProcessDescr processDescr = new ProcessDescr();
         processDescr.setClassName( rfp.getName() );
         processDescr.setName( rfp.getPackageName() );
-
-        ProcessBuildContext context = new ProcessBuildContext( this.configuration,
-                                                               pkg,
-                                                               process,
-                                                               processDescr,
-                                                               this.dialectRegistry,
-                                                               this.dialect );        
-
+       
         for ( Node node : rfp.getNodes() ) {
             if ( node instanceof ActionNode ) {
                 ActionNodeImpl actionNode = ( ActionNodeImpl ) node;
@@ -260,10 +262,20 @@
                 ActionDescr actionDescr = new ActionDescr();
                 actionDescr.setText( action.getConsequence() );
                 
-                context.getDialect().getActionBuilder().build( context, actionNode, actionDescr );
+                Dialect dialect = this.dialectRegistry.getDialect( action.getDialect() );
+                
+                ProcessBuildContext context = new ProcessBuildContext( this.configuration,
+                                                                       pkg,
+                                                                       process,
+                                                                       processDescr,
+                                                                       this.dialectRegistry,
+                                                                       dialect ); 
+                
+                dialect.getActionBuilder().build( context, actionNode, actionDescr );
+                dialect.addAction( context );
             }
         }
-        ((JavaDialect)context.getDialect()).addAction( context );
+        
     }
 
     /**

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/rule/builder/dialect/java/JavaDialect.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/rule/builder/dialect/java/JavaDialect.java	2007-11-27 11:34:23 UTC (rev 16854)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/rule/builder/dialect/java/JavaDialect.java	2007-11-27 11:35:05 UTC (rev 16855)
@@ -465,7 +465,7 @@
                              this.src,
                              new ProcessErrorHandler( processDescr,
                                                    process,
-                                                   "Rule Compilation error" ) );
+                                                   "Process Compilation error" ) );
 
         for ( final Iterator it = context.getInvokers().keySet().iterator(); it.hasNext(); ) {
             final String className = (String) it.next();

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/rule/builder/dialect/mvel/MVELDialect.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/rule/builder/dialect/mvel/MVELDialect.java	2007-11-27 11:34:23 UTC (rev 16854)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/rule/builder/dialect/mvel/MVELDialect.java	2007-11-27 11:35:05 UTC (rev 16855)
@@ -47,6 +47,7 @@
 import org.drools.rule.builder.PackageBuildContext;
 import org.drools.rule.builder.PatternBuilder;
 import org.drools.rule.builder.PredicateBuilder;
+import org.drools.rule.builder.ProcessBuildContext;
 import org.drools.rule.builder.ProcessClassBuilder;
 import org.drools.rule.builder.QueryBuilder;
 import org.drools.rule.builder.ReturnValueBuilder;
@@ -246,6 +247,10 @@
         context.getPkg().getPackageCompilationData().getLineMappings().put( name, mapping );
 
     }
+    
+    public void addAction(final ProcessBuildContext context) {
+        // @TODO setup line mappings
+    }
 
     public void addImport(String importEntry) {
         if ( importEntry.endsWith( ".*" ) ) {

Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/compiler/PackageBuilderConfigurationTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/compiler/PackageBuilderConfigurationTest.java	2007-11-27 11:34:23 UTC (rev 16854)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/compiler/PackageBuilderConfigurationTest.java	2007-11-27 11:35:05 UTC (rev 16855)
@@ -31,6 +31,7 @@
 import org.drools.rule.builder.PackageBuildContext;
 import org.drools.rule.builder.PatternBuilder;
 import org.drools.rule.builder.PredicateBuilder;
+import org.drools.rule.builder.ProcessBuildContext;
 import org.drools.rule.builder.ProcessClassBuilder;
 import org.drools.rule.builder.QueryBuilder;
 import org.drools.rule.builder.ReturnValueBuilder;
@@ -300,6 +301,10 @@
         public void addRule(RuleBuildContext context) {
             this.rule = context.getRule();
         }
+        
+        public void addAction(final ProcessBuildContext context) {
+            
+        }
 
         public Rule getRule() {
             return this.rule;

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	2007-11-27 11:34:23 UTC (rev 16854)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ExecutionFlowControlTest.java	2007-11-27 11:35:05 UTC (rev 16855)
@@ -16,6 +16,7 @@
 import org.drools.RuleBase;
 import org.drools.RuleBaseConfiguration;
 import org.drools.RuleBaseFactory;
+import org.drools.StatefulSession;
 import org.drools.WorkingMemory;
 import org.drools.common.DefaultAgenda;
 import org.drools.common.InternalWorkingMemoryActions;
@@ -731,6 +732,24 @@
         	// do nothing
         }
     }
+    
+    public void testActionDialects() throws Exception {
+        final PackageBuilder builder = new PackageBuilder();
+        builder.addRuleFlow( new InputStreamReader( getClass().getResourceAsStream( "test_ActionDialects.rfm" ) ) );      
+        
+        RuleBase ruleBase = RuleBaseFactory.newRuleBase();
+        ruleBase.addPackage( builder.getPackage() );
+        
+        StatefulSession session = ruleBase.newStatefulSession();
+        List list = new ArrayList();
+        session.setGlobal( "list", list );
+        
+        session.startProcess( "ActionDialects" );
+        
+        assertEquals( 2, list.size() );
+        assertEquals( "mvel was here", list.get( 0 ) );
+        assertEquals( "java was here", list.get( 1 ) );
+    }
 
     public void testLoadingRuleFlowInPackage7() throws Exception {
     	// loading a ruleflow with errors

Added: 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	                        (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ActionDialects.rf	2007-11-27 11:35:05 UTC (rev 16855)
@@ -0,0 +1,257 @@
+<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>67</x>
+                  <y>82</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( &quot;mvel was here&quot; )</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( &quot;java was here&quot; );</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>67</x>
+                                <y>21</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>67</x>
+                                <y>153</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>67</x>
+                                              <y>213</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

Added: 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	                        (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_ActionDialects.rfm	2007-11-27 11:35:05 UTC (rev 16855)
@@ -0,0 +1,87 @@
+<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( &quot;mvel was here&quot; )</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( &quot;java was here&quot; );</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




More information about the jboss-svn-commits mailing list