[jboss-svn-commits] JBL Code SVN: r12841 - in labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main: resources/org/drools/eclipse/wizard/project and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Jun 25 19:44:03 EDT 2007


Author: KrisVerlaenen
Date: 2007-06-25 19:44:03 -0400 (Mon, 25 Jun 2007)
New Revision: 12841

Added:
   labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/resources/org/drools/eclipse/wizard/project/RuleFlowLauncherSample.java.template
   labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/resources/org/drools/eclipse/wizard/project/ruleflow.drl.template
   labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/resources/org/drools/eclipse/wizard/project/ruleflow.rf.template
   labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/resources/org/drools/eclipse/wizard/project/ruleflow.rfm.template
Modified:
   labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/wizard/project/NewDroolsProjectWizard.java
   labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/wizard/project/NewDroolsProjectWizardPage.java
Log:
JBRULES-618: RuleFlow IDE integration
 - when creating a new project, you can now add a sample ruleflow + launcher as well

Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/wizard/project/NewDroolsProjectWizard.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/wizard/project/NewDroolsProjectWizard.java	2007-06-25 23:27:43 UTC (rev 12840)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/wizard/project/NewDroolsProjectWizard.java	2007-06-25 23:44:03 UTC (rev 12841)
@@ -267,6 +267,12 @@
 	    	if (extraPage.createJavaDecisionTableFile()) {
 	    		createDecisionTableSampleLauncher(project);
 	    	}
+	    	if (extraPage.createRuleFlowFile()) {
+	    		createRuleFlow(project, monitor);
+	    	}
+	    	if (extraPage.createJavaRuleFlowFile()) {
+	    		createRuleFlowSampleLauncher(project);
+	    	}
     	} catch (Throwable t) {
     		t.printStackTrace();
     	}
@@ -340,6 +346,58 @@
         }
     }
 
+    /**
+     * Create the sample RuleFlow file.
+     */
+    private void createRuleFlow(IJavaProject project, IProgressMonitor monitor)
+            throws CoreException {
+        String fileName = "org/drools/eclipse/wizard/project/ruleflow.rf.template";
+        IFolder folder = project.getProject().getFolder("src/rules");
+        IFile file = folder.getFile("ruleflow.rf");
+        InputStream inputstream = getClass().getClassLoader().getResourceAsStream(fileName);
+        if (!file.exists()) {
+        	file.create(inputstream, true, monitor);
+        } else {
+        	file.setContents(inputstream, true, false, monitor);
+        }
+        fileName = "org/drools/eclipse/wizard/project/ruleflow.rfm.template";
+        folder = project.getProject().getFolder("src/rules");
+        file = folder.getFile("ruleflow.rfm");
+        inputstream = getClass().getClassLoader().getResourceAsStream(fileName);
+        if (!file.exists()) {
+        	file.create(inputstream, true, monitor);
+        } else {
+        	file.setContents(inputstream, true, false, monitor);
+        }
+        fileName = "org/drools/eclipse/wizard/project/ruleflow.drl.template";
+        folder = project.getProject().getFolder("src/rules");
+        file = folder.getFile("ruleflow.drl");
+        inputstream = getClass().getClassLoader().getResourceAsStream(fileName);
+        if (!file.exists()) {
+        	file.create(inputstream, true, monitor);
+        } else {
+        	file.setContents(inputstream, true, false, monitor);
+        }
+    }
+
+    /**
+     * Create the sample RuleFlow launcher file.
+     */
+    private void createRuleFlowSampleLauncher(IJavaProject project)
+            throws JavaModelException, IOException {
+        
+        String s = "org/drools/eclipse/wizard/project/RuleFlowLauncherSample.java.template";
+        IFolder folder = project.getProject().getFolder("src/java");
+        IPackageFragmentRoot packageFragmentRoot = project
+                .getPackageFragmentRoot(folder);
+        IPackageFragment packageFragment = packageFragmentRoot
+                .createPackageFragment("com.sample", true, null);
+        InputStream inputstream = getClass().getClassLoader()
+                .getResourceAsStream(s);
+        packageFragment.createCompilationUnit("RuleFlowTest.java", new String(
+                readStream(inputstream)), true, null);
+    }
+
     protected void initializeDefaultPageImageDescriptor() {
     	ImageDescriptor desc = DroolsEclipsePlugin.getImageDescriptor("icons/drools-large.PNG");
         setDefaultPageImageDescriptor(desc);

Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/wizard/project/NewDroolsProjectWizardPage.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/wizard/project/NewDroolsProjectWizardPage.java	2007-06-25 23:27:43 UTC (rev 12840)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/wizard/project/NewDroolsProjectWizardPage.java	2007-06-25 23:44:03 UTC (rev 12841)
@@ -15,10 +15,14 @@
 	private Button addSampleRuleButton;
 	private Button addSampleJavaDecisionTableCodeButton;
 	private Button addSampleDecisionTableCodeButton;
+	private Button addSampleRuleFlowButton;
+	private Button addSampleJavaRuleFlowCodeButton;
 	private boolean addSampleJavaRuleCode = true;
 	private boolean addSampleRule = true;
 	private boolean addSampleJavaDecisionTableCode = false;
 	private boolean addSampleDecisionTableCode = false;
+	private boolean addSampleJavaRuleFlowCode = false;
+	private boolean addSampleRuleFlow = false;
 	
 	public NewDroolsProjectWizardPage() {
 		super("extendedNewProjectPage");
@@ -75,7 +79,7 @@
 		});
 		addSampleJavaDecisionTableCodeButton = createCheckBox(parent,
 			"Add a sample Java class for loading and executing the HelloWorld decision table.");
-		addSampleDecisionTableCodeButton.setSelection(addSampleDecisionTableCode);
+		addSampleJavaDecisionTableCodeButton.setSelection(addSampleDecisionTableCode);
 		addSampleJavaDecisionTableCodeButton.addSelectionListener(new SelectionListener() {
 			public void widgetDefaultSelected(SelectionEvent e) {
 				// do nothing
@@ -84,6 +88,29 @@
 				addSampleJavaDecisionTableCode = ((Button) e.widget).getSelection();
 			}
 		});
+		addSampleRuleFlowButton = createCheckBox(parent,
+			"Add a sample RuleFlow file to this project.");
+		addSampleRuleFlowButton.setSelection(addSampleRuleFlow);
+		addSampleRuleFlowButton.addSelectionListener(new SelectionListener() {
+			public void widgetDefaultSelected(SelectionEvent e) {
+				// do nothing
+			}
+			public void widgetSelected(SelectionEvent e) {
+				addSampleRuleFlow = ((Button) e.widget).getSelection();
+			}
+		});
+		addSampleJavaRuleFlowCodeButton = createCheckBox(parent,
+			"Add a sample Java class for loading and executing the RuleFlow.");
+		addSampleJavaRuleFlowCodeButton.setSelection(addSampleJavaRuleFlowCode);
+		addSampleJavaRuleFlowCodeButton.addSelectionListener(new SelectionListener() {
+			public void widgetDefaultSelected(SelectionEvent e) {
+				// do nothing
+			}
+			public void widgetSelected(SelectionEvent e) {
+				addSampleJavaRuleFlowCode = ((Button) e.widget).getSelection();
+			}
+		});
+
 	}
 
 	private Button createCheckBox(Composite group, String label) {
@@ -109,4 +136,12 @@
 	public boolean createJavaDecisionTableFile() {
 		return addSampleJavaDecisionTableCode;
 	}
+	
+	public boolean createRuleFlowFile() {
+		return addSampleRuleFlow;
+	}
+	
+	public boolean createJavaRuleFlowFile() {
+		return addSampleJavaRuleFlowCode;
+	}
 }

Added: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/resources/org/drools/eclipse/wizard/project/RuleFlowLauncherSample.java.template
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/resources/org/drools/eclipse/wizard/project/RuleFlowLauncherSample.java.template	                        (rev 0)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/resources/org/drools/eclipse/wizard/project/RuleFlowLauncherSample.java.template	2007-06-25 23:44:03 UTC (rev 12841)
@@ -0,0 +1,99 @@
+package com.sample;
+
+import java.io.InputStreamReader;
+import java.io.Reader;
+
+import org.drools.RuleBase;
+import org.drools.RuleBaseFactory;
+import org.drools.WorkingMemory;
+import org.drools.compiler.PackageBuilder;
+import org.drools.rule.Package;
+
+/**
+ * This is a sample file to launch a ruleflow.
+ */
+public class RuleFlowTest {
+
+    public static final void main(String[] args) {
+        try {
+        	
+        	//load up the rulebase
+            RuleBase ruleBase = readRule();
+            WorkingMemory workingMemory = ruleBase.newStatefulSession();
+            
+            //go !
+            Message message = new Message();
+            message.setMessage(  "Hello World" );
+            message.setStatus( Message.HELLO );
+            workingMemory.insert( message );
+            
+            workingMemory.startProcess("com.sample.ruleflow");
+            workingMemory.fireAllRules();   
+            
+        } catch (Throwable t) {
+            t.printStackTrace();
+        }
+    }
+
+    /**
+     * Please note that this is the "low level" rule assembly API.
+     */
+	private static RuleBase readRule() throws Exception {
+		//read in the source
+		Reader source = new InputStreamReader( RuleFlowTest.class.getResourceAsStream( "/ruleflow.drl" ) );
+		
+		//optionally read in the DSL (if you are using it).
+		//Reader dsl = new InputStreamReader( DroolsTest.class.getResourceAsStream( "/mylang.dsl" ) );
+
+		//Use package builder to build up a rule package.
+		//An alternative lower level class called "DrlParser" can also be used...
+		
+		PackageBuilder builder = new PackageBuilder();
+
+		//this wil parse and compile in one step
+		//NOTE: There are 2 methods here, the one argument one is for normal DRL.
+		builder.addPackageFromDrl( source );
+
+		//Use the following instead of above if you are using a DSL:
+		//builder.addPackageFromDrl( source, dsl );
+		
+		//add ruleflow
+		source = new InputStreamReader( RuleFlowTest.class.getResourceAsStream( "/ruleflow.rfm" ) );
+		builder.addRuleFlow(source);
+		
+		//get the compiled package (which is serializable)
+		Package pkg = builder.getPackage();
+		
+		//add the package to a rulebase (deploy the rule package).
+		RuleBase ruleBase = RuleBaseFactory.newRuleBase();
+		ruleBase.addPackage( pkg );
+		
+		return ruleBase;
+	}
+	
+	public static class Message {
+		public static final int HELLO = 0;
+		public static final int GOODBYE = 1;
+		
+		private String message;
+		
+		private int status;
+		
+		public String getMessage() {
+			return this.message;
+		}
+		
+		public void setMessage(String message) {
+			this.message = message;
+		}
+		
+		public int getStatus() {
+			return this.status;
+		}
+		
+		public void setStatus( int status ) {
+			this.status = status;
+		}
+	}
+    
+}

Added: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/resources/org/drools/eclipse/wizard/project/ruleflow.drl.template
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/resources/org/drools/eclipse/wizard/project/ruleflow.drl.template	                        (rev 0)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/resources/org/drools/eclipse/wizard/project/ruleflow.drl.template	2007-06-25 23:44:03 UTC (rev 12841)
@@ -0,0 +1,23 @@
+package com.sample
+ 
+import com.sample.RuleFlowTest.Message;
+ 
+rule "Hello World" ruleflow-group "hello"
+	when
+		m : Message( status == Message.HELLO, message : message )
+	then
+		System.out.println( message ); 
+		m.setMessage( "Goodbye cruel world" );
+		m.setStatus( Message.GOODBYE );
+		update( m );
+end
+
+rule "GoodBye" ruleflow-group "goodbye"
+	no-loop true
+	when
+		m : Message( status == Message.GOODBYE, message : message )
+	then
+		System.out.println( message ); 
+		m.setMessage( message );
+		
+end
\ No newline at end of file

Added: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/resources/org/drools/eclipse/wizard/project/ruleflow.rf.template
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/resources/org/drools/eclipse/wizard/project/ruleflow.rf.template	                        (rev 0)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/resources/org/drools/eclipse/wizard/project/ruleflow.rf.template	2007-06-25 23:44:03 UTC (rev 12841)
@@ -0,0 +1,210 @@
+<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.RuleSetNodeWrapper id="3" serialization="custom">
+            <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+              <default>
+                <constraint id="4">
+                  <x>190</x>
+                  <y>101</y>
+                  <width>80</width>
+                  <height>40</height>
+                </constraint>
+                <element class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" id="5">
+                  <ruleFlowGroup>hello</ruleFlowGroup>
+                  <id>2</id>
+                  <name>hello</name>
+                  <incomingConnections id="6">
+                    <org.drools.ruleflow.core.impl.ConnectionImpl id="7">
+                      <type>1</type>
+                      <from class="org.drools.ruleflow.core.impl.StartNodeImpl" id="8">
+                        <id>1</id>
+                        <name>Start</name>
+                        <incomingConnections id="9"/>
+                        <outgoingConnections id="10">
+                          <org.drools.ruleflow.core.impl.ConnectionImpl reference="7"/>
+                        </outgoingConnections>
+                      </from>
+                      <to class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="5"/>
+                    </org.drools.ruleflow.core.impl.ConnectionImpl>
+                  </incomingConnections>
+                  <outgoingConnections id="11">
+                    <org.drools.ruleflow.core.impl.ConnectionImpl id="12">
+                      <type>1</type>
+                      <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="5"/>
+                      <to class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" id="13">
+                        <ruleFlowGroup>goodbye</ruleFlowGroup>
+                        <id>3</id>
+                        <name>goodbye</name>
+                        <incomingConnections id="14">
+                          <org.drools.ruleflow.core.impl.ConnectionImpl reference="12"/>
+                        </incomingConnections>
+                        <outgoingConnections id="15">
+                          <org.drools.ruleflow.core.impl.ConnectionImpl id="16">
+                            <type>1</type>
+                            <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="13"/>
+                            <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>
+                </element>
+                <incomingConnections id="20">
+                  <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="21" serialization="custom">
+                    <org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                      <default>
+                        <type>1</type>
+                        <bendpoints id="22"/>
+                        <source class="org.drools.eclipse.flow.ruleflow.core.StartNodeWrapper" id="23" serialization="custom">
+                          <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                            <default>
+                              <constraint id="24">
+                                <x>57</x>
+                                <y>100</y>
+                                <width>80</width>
+                                <height>40</height>
+                              </constraint>
+                              <element class="org.drools.ruleflow.core.impl.StartNodeImpl" reference="8"/>
+                              <incomingConnections id="25"/>
+                              <outgoingConnections id="26">
+                                <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="21"/>
+                              </outgoingConnections>
+                            </default>
+                          </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                        </source>
+                        <target class="org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper" 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="7"/>
+                      </default>
+                    </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                  </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                </incomingConnections>
+                <outgoingConnections id="27">
+                  <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="28" serialization="custom">
+                    <org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                      <default>
+                        <type>1</type>
+                        <bendpoints id="29"/>
+                        <source class="org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper" reference="3"/>
+                        <target class="org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper" id="30" serialization="custom">
+                          <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                            <default>
+                              <constraint id="31">
+                                <x>336</x>
+                                <y>101</y>
+                                <width>80</width>
+                                <height>40</height>
+                              </constraint>
+                              <element class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="13"/>
+                              <incomingConnections id="32">
+                                <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="28"/>
+                              </incomingConnections>
+                              <outgoingConnections id="33">
+                                <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="34" serialization="custom">
+                                  <org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                                    <default>
+                                      <type>1</type>
+                                      <bendpoints id="35"/>
+                                      <source class="org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper" reference="30"/>
+                                      <target class="org.drools.eclipse.flow.ruleflow.core.EndNodeWrapper" id="36" serialization="custom">
+                                        <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                          <default>
+                                            <constraint id="37">
+                                              <x>473</x>
+                                              <y>102</y>
+                                              <width>80</width>
+                                              <height>40</height>
+                                            </constraint>
+                                            <element class="org.drools.ruleflow.core.impl.EndNodeImpl" reference="17"/>
+                                            <incomingConnections id="38">
+                                              <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="34"/>
+                                            </incomingConnections>
+                                            <outgoingConnections id="39"/>
+                                            <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="16"/>
+                                    </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="12"/>
+                      </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.RuleSetNodeWrapper>
+        </entry>
+        <entry>
+          <string>4-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.EndNodeWrapper reference="36"/>
+        </entry>
+        <entry>
+          <string>3-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper reference="30"/>
+        </entry>
+        <entry>
+          <string>1-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.StartNodeWrapper reference="23"/>
+        </entry>
+      </elements>
+      <process class="org.drools.ruleflow.core.impl.RuleFlowProcessImpl" id="40">
+        <nodes id="41">
+          <entry>
+            <long>2</long>
+            <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="5"/>
+          </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="8"/>
+          </entry>
+          <entry>
+            <long>3</long>
+            <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="13"/>
+          </entry>
+        </nodes>
+        <variables id="42"/>
+        <lastNodeId>4</lastNodeId>
+        <id>com.sample.ruleflow</id>
+        <name>Ruleflow</name>
+        <version>1.0</version>
+        <type>RuleFlow</type>
+      </process>
+      <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-eclipse/drools-eclipse-plugin/src/main/resources/org/drools/eclipse/wizard/project/ruleflow.rfm.template
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/resources/org/drools/eclipse/wizard/project/ruleflow.rfm.template	                        (rev 0)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/resources/org/drools/eclipse/wizard/project/ruleflow.rfm.template	2007-06-25 23:44:03 UTC (rev 12841)
@@ -0,0 +1,72 @@
+<org.drools.ruleflow.core.impl.RuleFlowProcessImpl id="1">
+  <nodes id="2">
+    <entry>
+      <long>2</long>
+      <org.drools.ruleflow.core.impl.RuleSetNodeImpl id="3">
+        <ruleFlowGroup>hello</ruleFlowGroup>
+        <id>2</id>
+        <name>hello</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.RuleSetNodeImpl" id="11">
+              <ruleFlowGroup>goodbye</ruleFlowGroup>
+              <id>3</id>
+              <name>goodbye</name>
+              <incomingConnections id="12">
+                <org.drools.ruleflow.core.impl.ConnectionImpl reference="10"/>
+              </incomingConnections>
+              <outgoingConnections id="13">
+                <org.drools.ruleflow.core.impl.ConnectionImpl id="14">
+                  <type>1</type>
+                  <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="11"/>
+                  <to class="org.drools.ruleflow.core.impl.EndNodeImpl" id="15">
+                    <id>4</id>
+                    <name>End</name>
+                    <incomingConnections id="16">
+                      <org.drools.ruleflow.core.impl.ConnectionImpl reference="14"/>
+                    </incomingConnections>
+                    <outgoingConnections id="17"/>
+                  </to>
+                </org.drools.ruleflow.core.impl.ConnectionImpl>
+              </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.EndNodeImpl reference="15"/>
+    </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="11"/>
+    </entry>
+  </nodes>
+  <variables id="18"/>
+  <lastNodeId>4</lastNodeId>
+  <id>com.sample.ruleflow</id>
+  <name>Ruleflow</name>
+  <version>1.0</version>
+  <type>RuleFlow</type>
+</org.drools.ruleflow.core.impl.RuleFlowProcessImpl>
\ No newline at end of file




More information about the jboss-svn-commits mailing list