[jboss-svn-commits] JBL Code SVN: r13632 - in labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main: java/org/drools/examples/conway/patterns and 2 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Jul 19 07:56:12 EDT 2007


Author: mark.proctor at jboss.com
Date: 2007-07-19 07:56:11 -0400 (Thu, 19 Jul 2007)
New Revision: 13632

Added:
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/AbstractRunConway.java
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/AgendaGroupDelegate.java
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/CellGridImpl.java
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/ConwayAgendaGroupRun.java
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/ConwayRuleDelegate.java
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/ConwayRuleFlowGroupRun.java
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/RuleFlowDelegate.java
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/calculate.rf
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/calculate.rfm
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/conway-agendagroup.drl
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/conway-ruleflow.drl
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/generation.rf
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/generation.rfm
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/killAll.rf
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/killAll.rfm
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/registerNeighbor.rf
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/registerNeighbor.rfm
Removed:
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/CellGrid.java
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/ConwayRuleBaseFactory.java
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/conway.drl
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/conway.dsl
Modified:
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/Cell.java
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/CellState.java
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/patterns/Border.java
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/patterns/Hi.java
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/patterns/Pentadecathalon.java
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/patterns/Pulsar.java
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/patterns/SimpleGlider.java
   labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/ui/ConwayGUI.java
Log:
JBRULES-1019 Create a RuleFlow version of Conways Game of Life example

Added: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/AbstractRunConway.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/AbstractRunConway.java	                        (rev 0)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/AbstractRunConway.java	2007-07-19 11:56:11 UTC (rev 13632)
@@ -0,0 +1,32 @@
+package org.drools.examples.conway;
+
+import java.awt.BorderLayout;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+import javax.swing.JFrame;
+
+import org.drools.examples.conway.ui.ConwayGUI;
+
+public class AbstractRunConway {
+    public static final int AGENDAGROUP = 0;
+    public static final int RULEFLOWGROUP = 1;
+    
+    public static void start(final int executionControl) {
+        final ConwayGUI gui = new ConwayGUI(executionControl);
+        final String appTitle = ConwayApplicationProperties.getProperty( "app.title" );
+        final JFrame f = new JFrame( appTitle );
+        f.setResizable( false );
+        f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
+        f.getContentPane().add( BorderLayout.CENTER,
+                                gui );
+
+        f.addWindowListener( new WindowAdapter() {
+            public void windowClosing(WindowEvent we) {
+                gui.dispose();
+            }
+        } );
+        f.pack();
+        f.setVisible( true );
+    }
+}

Added: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/AgendaGroupDelegate.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/AgendaGroupDelegate.java	                        (rev 0)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/AgendaGroupDelegate.java	2007-07-19 11:56:11 UTC (rev 13632)
@@ -0,0 +1,84 @@
+package org.drools.examples.conway;
+
+import java.io.InputStreamReader;
+import java.io.Reader;
+
+import org.drools.RuleBase;
+import org.drools.RuleBaseFactory;
+import org.drools.StatefulSession;
+import org.drools.compiler.PackageBuilder;
+
+public class AgendaGroupDelegate implements ConwayRuleDelegate {
+    private StatefulSession session;
+    
+    public AgendaGroupDelegate() {
+        final Reader drl = new InputStreamReader( AgendaGroupDelegate.class.getResourceAsStream( "/org/drools/examples/conway/conway-agendagroup.drl" ) );
+
+        try {
+            PackageBuilder builder = new PackageBuilder();
+            builder.addPackageFromDrl( drl );
+
+            RuleBase ruleBase = RuleBaseFactory.newRuleBase();
+            ruleBase.addPackage( builder.getPackage() );
+
+            this.session = ruleBase.newStatefulSession();
+
+        } catch ( Exception e ) {
+            throw new RuntimeException( e );
+        }
+    }
+    
+    /* (non-Javadoc)
+     * @see org.drools.examples.conway.ConwayRuleDelegate#getSession()
+     */
+    public StatefulSession getSession() {
+        return this.session;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.drools.examples.conway.ConwayRuleDelegate#init()
+     */
+    public void init() {
+        this.session.setFocus( "register neighbor" );
+        this.session.fireAllRules();     
+    }
+    
+    /* (non-Javadoc)
+     * @see org.drools.examples.conway.CellGrid#nextGeneration()
+     */
+    /* (non-Javadoc)
+     * @see org.drools.examples.conway.ConwayRuleDelegate#nextGeneration()
+     */
+    public boolean nextGeneration() {
+        // System.out.println( "next generation" );
+        session.setFocus( "calculate" );
+        session.setFocus( "kill" );
+        session.setFocus( "birth" );
+        session.setFocus( "reset calculate" );
+        session.setFocus( "rest" );
+        session.setFocus( "evaluate" );
+        session.fireAllRules();
+        return session.getAgenda().getAgendaGroup( "evaluate" ).size() != 0;
+    }
+
+    /* (non-Javadoc)
+     * @see org.drools.examples.conway.CellGrid#killAll()
+     */
+    /* (non-Javadoc)
+     * @see org.drools.examples.conway.ConwayRuleDelegate#killAll()
+     */
+    public void killAll() {
+        this.session.setFocus( "calculate" );
+        this.session.setFocus( "kill all" );
+        this.session.setFocus( "reset calculate" );
+        this.session.fireAllRules();
+    }
+    
+    /* (non-Javadoc)
+     * @see org.drools.examples.conway.ConwayRuleDelegate#setPattern()
+     */
+    public void setPattern() {
+        session.setFocus( "calculate" );
+        session.fireAllRules();     
+    }
+}

Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/Cell.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/Cell.java	2007-07-19 11:50:57 UTC (rev 13631)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/Cell.java	2007-07-19 11:56:11 UTC (rev 13632)
@@ -6,7 +6,7 @@
  *
  * @author <a href="mailto:brown_j at ociweb.com">Jeff Brown</a>
  * @see CellState
- * @see CellGrid
+ * @see CellGridImpl
  */
 public class Cell {
 

Deleted: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/CellGrid.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/CellGrid.java	2007-07-19 11:50:57 UTC (rev 13631)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/CellGrid.java	2007-07-19 11:56:11 UTC (rev 13632)
@@ -1,185 +0,0 @@
-package org.drools.examples.conway;
-
-import org.drools.RuleBase;
-import org.drools.StatefulSession;
-import org.drools.WorkingMemory;
-import org.drools.event.AgendaGroupPoppedEvent;
-import org.drools.event.DefaultAgendaEventListener;
-import org.drools.examples.conway.patterns.ConwayPattern;
-
-/**
- * A <code>CellGrid</code> represents a grid of <code>Cell</code> objects.
- * <p/>
- * 
- * @author <a href="mailto:brown_j at ociweb.com">Jeff Brown</a>
- * @see Cell
- */
-public class CellGrid {
-
-    private final Cell[][]  cells;
-
-    private StatefulSession session;
-
-    /**
-     * Constructs a CellGrid
-     * 
-     * @param rows
-     *            number of rows in the grid
-     * @param columns
-     *            number of columns in the grid
-     */
-    public CellGrid(final int rows,
-                    final int columns) {
-        this.cells = new Cell[rows][columns];
-
-        final RuleBase ruleBase = ConwayRuleBaseFactory.getRuleBase();
-        this.session = ruleBase.newStatefulSession();
-
-        DefaultAgendaEventListener listener = new DefaultAgendaEventListener() {
-            public void agendaGroupPopped(AgendaGroupPoppedEvent event,
-                                          WorkingMemory workingMemory) {
-//                System.out.println( "popped AgendaGroup = '" + event.getAgendaGroup().getName() + "'" );
-//                System.out.println( CellGrid.this.toString() );
-//                System.out.println( "" );
-            }
-        };
-
-        this.session.addEventListener( listener );
-
-        this.session.insert( this );
-
-        // populate the array of Cells and hook each
-        // cell up with its neighbors...
-        for ( int row = 0; row < rows; row++ ) {
-            for ( int column = 0; column < columns; column++ ) {
-                final Cell newCell = new Cell( column,
-                                               row );
-                this.cells[row][column] = newCell;
-                this.session.insert( newCell );
-            }
-        }
-        this.session.setFocus( "register neighbor" );
-        this.session.fireAllRules();
-    }
-
-    /**
-     * @param row
-     *            row of the requested cell
-     * @param column
-     *            column of the requested cell
-     * @return the cell at the specified coordinates
-     * @see Cell
-     */
-    public Cell getCellAt(final int row,
-                          final int column) {
-        return this.cells[row][column];
-    }
-
-    /**
-     * @return the number of rows in this grid
-     * @see #getNumberOfColumns()
-     */
-    public int getNumberOfRows() {
-        return this.cells.length;
-    }
-
-    /**
-     * @return the number of columns in this grid
-     * @see #getNumberOfRows()
-     */
-    public int getNumberOfColumns() {
-        return this.cells[0].length;
-    }
-
-    /**
-     * Moves this grid to its next generation
-     * 
-     * @return <code>true</code> if the state changed, otherwise false
-     * @see #transitionState()
-     */
-    public boolean nextGeneration() {
-        //System.out.println( "next generation" );
-        session.setFocus( "calculate" );
-        session.setFocus( "kill" );
-        session.setFocus( "birth" );
-        session.setFocus( "reset calculate" );
-        session.setFocus( "rest" );
-        session.setFocus( "evaluate" );
-        session.fireAllRules();
-        return session.getAgenda().getAgendaGroup( "evaluate" ).size() != 0;
-    }
-
-    /**
-     * kills all cells in the grid
-     */
-    public void killAll() {
-        this.session.setFocus( "calculate" );
-        this.session.setFocus( "kill all" );
-        this.session.setFocus( "reset calculate" );
-        this.session.fireAllRules();
-    }
-
-    /**
-     * Populates the grid with a <code>ConwayPattern</code>
-     * 
-     * @param pattern
-     *            pattern to populate the grid with
-     * @see ConwayPattern
-     */
-    public void setPattern(final ConwayPattern pattern) {
-        final boolean[][] gridData = pattern.getPattern();
-        int gridWidth = gridData[0].length;
-        int gridHeight = gridData.length;
-
-        int columnOffset = 0;
-        int rowOffset = 0;
-
-        if ( gridWidth > getNumberOfColumns() ) {
-            gridWidth = getNumberOfColumns();
-        } else {
-            columnOffset = (getNumberOfColumns() - gridWidth) / 2;
-        }
-
-        if ( gridHeight > getNumberOfRows() ) {
-            gridHeight = getNumberOfRows();
-        } else {
-            rowOffset = (getNumberOfRows() - gridHeight) / 2;
-        }
-
-        killAll();
-
-        for ( int column = 0; column < gridWidth; column++ ) {
-            for ( int row = 0; row < gridHeight; row++ ) {
-                if ( gridData[row][column] ) {
-                    final Cell cell = getCellAt( row + rowOffset,
-                                                 column + columnOffset );
-                    cell.setCellState( CellState.LIVE );
-                    this.session.update( this.session.getFactHandle( cell ),
-                                         cell );
-                }
-            }
-        }
-        session.setFocus( "calculate" );
-        session.fireAllRules();
-    }
-
-    public void dispose() {
-        if ( this.session != null ) {
-            this.session.dispose();
-        }
-    }
-
-    public String toString() {
-        StringBuffer buf = new StringBuffer();
-
-        for ( int i = 0; i < this.cells.length; i++ ) {
-            for ( int j = 0; j < this.cells[i].length; j++ ) {
-                Cell cell = this.cells[i][j];
-                System.out.print( cell.getLiveNeighbors() + ((cell.getCellState() == CellState.DEAD) ? "D" : "L") + " " );
-            }
-            System.out.println( "" );
-        }
-
-        return buf.toString();
-    }
-}

Copied: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/CellGridImpl.java (from rev 13578, labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/CellGrid.java)
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/CellGridImpl.java	                        (rev 0)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/CellGridImpl.java	2007-07-19 11:56:11 UTC (rev 13632)
@@ -0,0 +1,181 @@
+package org.drools.examples.conway;
+
+import java.io.InputStreamReader;
+import java.io.Reader;
+
+import org.drools.RuleBase;
+import org.drools.RuleBaseFactory;
+import org.drools.StatefulSession;
+import org.drools.WorkingMemory;
+import org.drools.agent.RuleAgent;
+import org.drools.compiler.PackageBuilder;
+import org.drools.event.AgendaGroupPoppedEvent;
+import org.drools.event.DefaultAgendaEventListener;
+import org.drools.examples.conway.patterns.ConwayPattern;
+
+/**
+ * A <code>CellGrid</code> represents a grid of <code>Cell</code> objects.
+ * <p/>
+ * 
+ * @author <a href="mailto:brown_j at ociweb.com">Jeff Brown</a>
+ * @see Cell
+ */
+public class CellGridImpl
+    implements
+    CellGrid {
+
+    private final Cell[][]     cells;
+
+    private final StatefulSession    session;
+
+    private final ConwayRuleDelegate delegate;
+
+    /**
+     * Constructs a CellGrid
+     * 
+     * @param rows
+     *            number of rows in the grid
+     * @param columns
+     *            number of columns in the grid
+     */
+    public CellGridImpl(final int rows,
+                        final int columns,
+                        final int executionControl) {
+
+        this.cells = new Cell[rows][columns];
+
+        if ( executionControl == AbstractRunConway.RULEFLOWGROUP ) {
+            delegate = new RuleFlowDelegate();
+        } else {
+            delegate = new AgendaGroupDelegate();
+        }
+        
+        this.session = delegate.getSession();
+
+        DefaultAgendaEventListener listener = new DefaultAgendaEventListener() {
+            public void agendaGroupPopped(AgendaGroupPoppedEvent event,
+                                          WorkingMemory workingMemory) {
+                // System.out.println( "popped AgendaGroup = '" +
+                // event.getAgendaGroup().getName() + "'" );
+                // System.out.println( CellGrid.this.toString() );
+                // System.out.println( "" );
+            }
+        };
+
+        this.session.addEventListener( listener );
+
+        this.session.insert( this );
+
+        // populate the array of Cells and hook each
+        // cell up with its neighbors...
+        for ( int row = 0; row < rows; row++ ) {
+            for ( int column = 0; column < columns; column++ ) {
+                final Cell newCell = new Cell( column,
+                                               row );
+                this.cells[row][column] = newCell;
+                this.session.insert( newCell );
+            }
+        }
+
+        delegate.init();
+    }
+
+    /* (non-Javadoc)
+     * @see org.drools.examples.conway.CellGrid#getCellAt(int, int)
+     */
+    public Cell getCellAt(final int row,
+                          final int column) {
+        return this.cells[row][column];
+    }
+
+    /* (non-Javadoc)
+     * @see org.drools.examples.conway.CellGrid#getNumberOfRows()
+     */
+    public int getNumberOfRows() {
+        return this.cells.length;
+    }
+
+    /* (non-Javadoc)
+     * @see org.drools.examples.conway.CellGrid#getNumberOfColumns()
+     */
+    public int getNumberOfColumns() {
+        return this.cells[0].length;
+    }
+
+    /* (non-Javadoc)
+     * @see org.drools.examples.conway.CellGrid#nextGeneration()
+     */
+    public boolean nextGeneration() {
+        return delegate.nextGeneration();
+    }
+
+    /* (non-Javadoc)
+     * @see org.drools.examples.conway.CellGrid#killAll()
+     */
+    public void killAll() {
+        this.delegate.killAll();
+    }
+
+    /* (non-Javadoc)
+     * @see org.drools.examples.conway.CellGrid#setPattern(org.drools.examples.conway.patterns.ConwayPattern)
+     */
+    public void setPattern(final ConwayPattern pattern) {
+        final boolean[][] gridData = pattern.getPattern();
+        int gridWidth = gridData[0].length;
+        int gridHeight = gridData.length;
+
+        int columnOffset = 0;
+        int rowOffset = 0;
+
+        if ( gridWidth > getNumberOfColumns() ) {
+            gridWidth = getNumberOfColumns();
+        } else {
+            columnOffset = (getNumberOfColumns() - gridWidth) / 2;
+        }
+
+        if ( gridHeight > getNumberOfRows() ) {
+            gridHeight = getNumberOfRows();
+        } else {
+            rowOffset = (getNumberOfRows() - gridHeight) / 2;
+        }
+
+        this.delegate.killAll();
+
+        for ( int column = 0; column < gridWidth; column++ ) {
+            for ( int row = 0; row < gridHeight; row++ ) {
+                if ( gridData[row][column] ) {
+                    final Cell cell = getCellAt( row + rowOffset,
+                                                 column + columnOffset );
+                    cell.setCellState( CellState.LIVE );
+                    this.session.update( this.session.getFactHandle( cell ),
+                                         cell );
+                }
+            }
+        }
+
+        this.delegate.setPattern();
+    }
+
+    /* (non-Javadoc)
+     * @see org.drools.examples.conway.CellGrid#dispose()
+     */
+    public void dispose() {
+        if ( this.session != null ) {
+            this.session.dispose();
+        }
+    }
+
+    public String toString() {
+        StringBuffer buf = new StringBuffer();
+
+        for ( int i = 0; i < this.cells.length; i++ ) {
+            for ( int j = 0; j < this.cells[i].length; j++ ) {
+                Cell cell = this.cells[i][j];
+                System.out.print( cell.getLiveNeighbors() + ((cell.getCellState() == CellState.DEAD) ? "D" : "L") + " " );
+            }
+            System.out.println( "" );
+        }
+
+        return buf.toString();
+    }
+}

Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/CellState.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/CellState.java	2007-07-19 11:50:57 UTC (rev 13631)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/CellState.java	2007-07-19 11:56:11 UTC (rev 13632)
@@ -6,7 +6,7 @@
  * 
  * @author <a href="mailto:brown_j at ociweb.com">Jeff Brown</a>
  * @see Cell
- * @see CellGrid
+ * @see CellGridImpl
  */
 public class CellState {
 

Added: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/ConwayAgendaGroupRun.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/ConwayAgendaGroupRun.java	                        (rev 0)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/ConwayAgendaGroupRun.java	2007-07-19 11:56:11 UTC (rev 13632)
@@ -0,0 +1,8 @@
+package org.drools.examples.conway;
+
+public class ConwayAgendaGroupRun extends AbstractRunConway {
+    public static void main(final String[] args) {
+        ConwayAgendaGroupRun app = new ConwayAgendaGroupRun( );
+        app.start( AbstractRunConway.AGENDAGROUP );
+    }
+}

Deleted: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/ConwayRuleBaseFactory.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/ConwayRuleBaseFactory.java	2007-07-19 11:50:57 UTC (rev 13631)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/ConwayRuleBaseFactory.java	2007-07-19 11:56:11 UTC (rev 13632)
@@ -1,69 +0,0 @@
-/**
- *
- */
-package org.drools.examples.conway;
-
-import java.io.InputStreamReader;
-import java.io.Reader;
-
-import org.drools.RuleBase;
-import org.drools.compiler.PackageBuilder;
-import org.drools.rule.Package;
-
-/**
- * @author <a href="mailto:brown_j at ociweb.com">Jeff Brown</a>
- */
-public class ConwayRuleBaseFactory {
-
-    private static final ConwayRuleBaseFactory ourInstance = new ConwayRuleBaseFactory();
-
-    private RuleBase                     ruleBase;
-
-    public static ConwayRuleBaseFactory getInstance() {
-        return ConwayRuleBaseFactory.ourInstance;
-    }
-
-    private ConwayRuleBaseFactory() {
-        try {
-            /**
-             * Please note that this is the "low level" rule assembly API.
-             */
-            // private static RuleBase readRule() throws Exception {
-            // read in the source
-            final Reader source = new InputStreamReader( ConwayRuleBaseFactory.class.getResourceAsStream( "/org/drools/examples/conway/conway.drl" ) );
-
-            // optionally read in the DSL (if you are using it).
-            //final Reader dsl = new InputStreamReader( ConwayRuleBaseFactory.class.getResourceAsStream( "/org/drools/examples/conway/conway.dsl" ) );
-
-            // Use package builder to build up a rule package.
-            // An alternative lower level class called "DrlParser" can also be
-            // used...
-
-            final 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 );
-
-            
-            
-            // get the compiled package (which is serializable)
-            final Package pkg = builder.getPackage();
-
-            // add the package to a rulebase (deploy the rule package).
-            this.ruleBase = org.drools.RuleBaseFactory.newRuleBase();
-            this.ruleBase.addPackage( pkg );
-        } catch ( final Exception e ) {
-            e.printStackTrace();
-        }
-    }
-
-    public static RuleBase getRuleBase() {
-        return ConwayRuleBaseFactory.ourInstance.ruleBase;
-    }
-}

Added: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/ConwayRuleDelegate.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/ConwayRuleDelegate.java	                        (rev 0)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/ConwayRuleDelegate.java	2007-07-19 11:56:11 UTC (rev 13632)
@@ -0,0 +1,23 @@
+package org.drools.examples.conway;
+
+import org.drools.StatefulSession;
+
+public interface ConwayRuleDelegate {
+
+    public abstract StatefulSession getSession();
+
+    public abstract void init();
+
+    /* (non-Javadoc)
+     * @see org.drools.examples.conway.CellGrid#nextGeneration()
+     */
+    public abstract boolean nextGeneration();
+
+    /* (non-Javadoc)
+     * @see org.drools.examples.conway.CellGrid#killAll()
+     */
+    public abstract void killAll();
+
+    public abstract void setPattern();
+
+}
\ No newline at end of file

Added: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/ConwayRuleFlowGroupRun.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/ConwayRuleFlowGroupRun.java	                        (rev 0)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/ConwayRuleFlowGroupRun.java	2007-07-19 11:56:11 UTC (rev 13632)
@@ -0,0 +1,8 @@
+package org.drools.examples.conway;
+
+public class ConwayRuleFlowGroupRun extends AbstractRunConway {
+    public static void main(final String[] args) {
+        ConwayRuleFlowGroupRun app = new ConwayRuleFlowGroupRun( );
+        app.start( AbstractRunConway.RULEFLOWGROUP );
+    }
+}

Added: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/RuleFlowDelegate.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/RuleFlowDelegate.java	                        (rev 0)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/RuleFlowDelegate.java	2007-07-19 11:56:11 UTC (rev 13632)
@@ -0,0 +1,85 @@
+package org.drools.examples.conway;
+
+import java.io.InputStreamReader;
+import java.io.Reader;
+
+import org.drools.RuleBase;
+import org.drools.RuleBaseFactory;
+import org.drools.StatefulSession;
+import org.drools.compiler.PackageBuilder;
+
+public class RuleFlowDelegate implements ConwayRuleDelegate {
+    private StatefulSession session;
+    
+    public RuleFlowDelegate() {
+        final Reader drl = new InputStreamReader( CellGridImpl.class.getResourceAsStream( "/org/drools/examples/conway/conway-ruleflow.drl" ) );
+        final Reader calculateRf = new InputStreamReader( CellGridImpl.class.getResourceAsStream( "/org/drools/examples/conway/calculate.rfm" ) );
+        final Reader generationRf = new InputStreamReader( CellGridImpl.class.getResourceAsStream( "/org/drools/examples/conway/generation.rfm" ) );
+        final Reader killAllRf = new InputStreamReader( CellGridImpl.class.getResourceAsStream( "/org/drools/examples/conway/killAll.rfm" ) );
+        final Reader registerNeighborRf = new InputStreamReader( CellGridImpl.class.getResourceAsStream( "/org/drools/examples/conway/registerNeighbor.rfm" ) );
+
+        try {
+            PackageBuilder builder = new PackageBuilder();
+            builder.addPackageFromDrl( drl );
+            builder.addRuleFlow( calculateRf );
+            builder.addRuleFlow( generationRf );
+            builder.addRuleFlow( killAllRf );
+            builder.addRuleFlow( registerNeighborRf );
+
+            RuleBase ruleBase = RuleBaseFactory.newRuleBase();
+            ruleBase.addPackage( builder.getPackage() );
+
+            this.session = ruleBase.newStatefulSession();
+
+        } catch ( Exception e ) {
+            throw new RuntimeException( e );
+        }
+    }
+    
+    /* (non-Javadoc)
+     * @see org.drools.examples.conway.ConwayRuleDelegate#getSession()
+     */
+    public StatefulSession getSession() {
+        return this.session;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.drools.examples.conway.ConwayRuleDelegate#init()
+     */
+    public void init() {
+        this.session.startProcess( "register neighbor" );
+        this.session.fireAllRules();        
+    }
+    
+    /* (non-Javadoc)
+     * @see org.drools.examples.conway.CellGrid#nextGeneration()
+     */
+    /* (non-Javadoc)
+     * @see org.drools.examples.conway.ConwayRuleDelegate#nextGeneration()
+     */
+    public boolean nextGeneration() {
+        // System.out.println( "next generation" );
+        session.startProcess( "generation" );
+        session.fireAllRules();
+        return session.getAgenda().getRuleFlowGroup( "evaluate" ).size() != 0;
+    }
+
+    /* (non-Javadoc)
+     * @see org.drools.examples.conway.CellGrid#killAll()
+     */
+    /* (non-Javadoc)
+     * @see org.drools.examples.conway.ConwayRuleDelegate#killAll()
+     */
+    public void killAll() {
+        this.session.startProcess( "kill all" );
+        this.session.fireAllRules();
+    }
+    
+    /* (non-Javadoc)
+     * @see org.drools.examples.conway.ConwayRuleDelegate#setPattern()
+     */
+    public void setPattern() {
+        session.startProcess( "calculate" );
+        session.fireAllRules();        
+    }
+}

Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/patterns/Border.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/patterns/Border.java	2007-07-19 11:50:57 UTC (rev 13631)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/patterns/Border.java	2007-07-19 11:56:11 UTC (rev 13632)
@@ -4,7 +4,7 @@
  * The Border <p/>
  * 
  * @see ConwayPattern
- * @see org.drools.examples.conway.CellGrid
+ * @see org.drools.examples.conway.CellGridImpl
  * @author <a href="mailto:brown_j at ociweb.com">Jeff Brown</a>
  */
 public class Border

Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/patterns/Hi.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/patterns/Hi.java	2007-07-19 11:50:57 UTC (rev 13631)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/patterns/Hi.java	2007-07-19 11:56:11 UTC (rev 13632)
@@ -4,7 +4,7 @@
  * The Hi pattern <p/>
  * 
  * @see ConwayPattern
- * @see org.drools.examples.conway.CellGrid
+ * @see org.drools.examples.conway.CellGridImpl
  * 
  * @author <a href="mailto:brown_j at ociweb.com">Jeff Brown</a>
  */

Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/patterns/Pentadecathalon.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/patterns/Pentadecathalon.java	2007-07-19 11:50:57 UTC (rev 13631)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/patterns/Pentadecathalon.java	2007-07-19 11:56:11 UTC (rev 13632)
@@ -4,7 +4,7 @@
  * The Pentadecathalon <p/>
  * 
  * @see ConwayPattern
- * @see org.drools.examples.conway.CellGrid
+ * @see org.drools.examples.conway.CellGridImpl
  * 
  * @author <a href="mailto:brown_j at ociweb.com">Jeff Brown</a>
  */

Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/patterns/Pulsar.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/patterns/Pulsar.java	2007-07-19 11:50:57 UTC (rev 13631)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/patterns/Pulsar.java	2007-07-19 11:56:11 UTC (rev 13632)
@@ -4,7 +4,7 @@
  * The Pulsar <p/>
  * 
  * @see ConwayPattern
- * @see org.drools.examples.conway.CellGrid
+ * @see org.drools.examples.conway.CellGridImpl
  * @author <a href="mailto:brown_j at ociweb.com">Jeff Brown</a>
  */
 public class Pulsar

Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/patterns/SimpleGlider.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/patterns/SimpleGlider.java	2007-07-19 11:50:57 UTC (rev 13631)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/patterns/SimpleGlider.java	2007-07-19 11:56:11 UTC (rev 13632)
@@ -5,7 +5,7 @@
  * 
  * @author <a href="mailto:brown_j at ociweb.com">Jeff Brown</a>
  * @see ConwayPattern
- * @see org.drools.examples.conway.CellGrid
+ * @see org.drools.examples.conway.CellGridImpl
  */
 public class SimpleGlider
     implements

Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/ui/ConwayGUI.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/ui/ConwayGUI.java	2007-07-19 11:50:57 UTC (rev 13631)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/examples/conway/ui/ConwayGUI.java	2007-07-19 11:56:11 UTC (rev 13632)
@@ -16,7 +16,9 @@
 import javax.swing.border.Border;
 import javax.swing.border.EtchedBorder;
 
+import org.drools.examples.conway.AbstractRunConway;
 import org.drools.examples.conway.CellGrid;
+import org.drools.examples.conway.CellGridImpl;
 import org.drools.examples.conway.ConwayApplicationProperties;
 import org.drools.examples.conway.patterns.ConwayPattern;
 
@@ -39,7 +41,7 @@
     private final Timer     timer;
     private final CellGrid  grid;
 
-    public ConwayGUI() {
+    public ConwayGUI(final int executionControl) {
         super( new BorderLayout() );
         final String nextGenerationLabel = ConwayApplicationProperties.getProperty( "next.generation.label" );
         this.nextGenerationButton = new JButton( nextGenerationLabel );
@@ -47,8 +49,10 @@
         this.startStopButton = new JButton( startLabel );
         final String clearLabel = ConwayApplicationProperties.getProperty( "clear.label" );
         this.clearButton = new JButton( clearLabel );
-        this.grid = new CellGrid( 30,
-                                  30 );
+        
+        //this.grid = new CellGridAgendaGroup( 30, 30 );
+        this.grid = new CellGridImpl( 30, 30, executionControl );
+        
         final CellGridCanvas canvas = new CellGridCanvas( grid );
         final JPanel panel = new JPanel( new BorderLayout() );
         panel.add( BorderLayout.CENTER,
@@ -229,17 +233,7 @@
     }
 
     public static void main(final String[] args) {
-        //        if ( args.length != 1 )
-        //        {
-        //            System.out.println( "Usage: " + ConwayGUI.class.getName( ) + " [drl file]" );
-        //            return;
-        //        }
-        //        System.out.println( "Using drl: " + args[0] );
-        //
-        //        System.setProperty( "conway.drl.file",
-        //                            args[0] );
-
-        final ConwayGUI gui = new ConwayGUI();
+        final ConwayGUI gui = new ConwayGUI( AbstractRunConway.RULEFLOWGROUP );
         final String appTitle = ConwayApplicationProperties.getProperty( "app.title" );
         final JFrame f = new JFrame( appTitle );
         f.setResizable( false );

Added: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/calculate.rf
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/calculate.rf	                        (rev 0)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/calculate.rf	2007-07-19 11:56:11 UTC (rev 13632)
@@ -0,0 +1,155 @@
+<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>7-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>368</x>
+                  <y>156</y>
+                  <width>80</width>
+                  <height>40</height>
+                </constraint>
+                <element class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" id="5">
+                  <ruleFlowGroup>calculate</ruleFlowGroup>
+                  <id>7</id>
+                  <name>calculate</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.EndNodeImpl" id="13">
+                        <id>11</id>
+                        <name>End</name>
+                        <incomingConnections id="14">
+                          <org.drools.ruleflow.core.impl.ConnectionImpl reference="12"/>
+                        </incomingConnections>
+                        <outgoingConnections id="15"/>
+                      </to>
+                    </org.drools.ruleflow.core.impl.ConnectionImpl>
+                  </outgoingConnections>
+                </element>
+                <incomingConnections id="16">
+                  <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="17" serialization="custom">
+                    <org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                      <default>
+                        <type>1</type>
+                        <bendpoints id="18"/>
+                        <source class="org.drools.eclipse.flow.ruleflow.core.StartNodeWrapper" id="19" serialization="custom">
+                          <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                            <default>
+                              <constraint id="20">
+                                <x>368</x>
+                                <y>73</y>
+                                <width>80</width>
+                                <height>40</height>
+                              </constraint>
+                              <element class="org.drools.ruleflow.core.impl.StartNodeImpl" reference="8"/>
+                              <incomingConnections id="21"/>
+                              <outgoingConnections id="22">
+                                <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="17"/>
+                              </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="23">
+                  <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="24" serialization="custom">
+                    <org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                      <default>
+                        <type>1</type>
+                        <bendpoints id="25"/>
+                        <source class="org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper" reference="3"/>
+                        <target class="org.drools.eclipse.flow.ruleflow.core.EndNodeWrapper" id="26" serialization="custom">
+                          <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                            <default>
+                              <constraint id="27">
+                                <x>368</x>
+                                <y>238</y>
+                                <width>80</width>
+                                <height>40</height>
+                              </constraint>
+                              <element class="org.drools.ruleflow.core.impl.EndNodeImpl" reference="13"/>
+                              <incomingConnections id="28">
+                                <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="24"/>
+                              </incomingConnections>
+                              <outgoingConnections id="29"/>
+                              <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>11-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.EndNodeWrapper reference="26"/>
+        </entry>
+        <entry>
+          <string>1-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.StartNodeWrapper reference="19"/>
+        </entry>
+      </elements>
+      <process class="org.drools.ruleflow.core.impl.RuleFlowProcessImpl" id="30">
+        <nodes id="31">
+          <entry>
+            <long>11</long>
+            <org.drools.ruleflow.core.impl.EndNodeImpl reference="13"/>
+          </entry>
+          <entry>
+            <long>1</long>
+            <org.drools.ruleflow.core.impl.StartNodeImpl reference="8"/>
+          </entry>
+          <entry>
+            <long>7</long>
+            <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="5"/>
+          </entry>
+        </nodes>
+        <variables id="32"/>
+        <lastNodeId>11</lastNodeId>
+        <id>calculate</id>
+        <name>calculate</name>
+        <version>1</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-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/calculate.rfm
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/calculate.rfm	                        (rev 0)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/calculate.rfm	2007-07-19 11:56:11 UTC (rev 13632)
@@ -0,0 +1,54 @@
+<org.drools.ruleflow.core.impl.RuleFlowProcessImpl id="1">
+  <nodes id="2">
+    <entry>
+      <long>11</long>
+      <org.drools.ruleflow.core.impl.EndNodeImpl id="3">
+        <id>11</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.RuleSetNodeImpl" id="6">
+              <ruleFlowGroup>calculate</ruleFlowGroup>
+              <id>7</id>
+              <name>calculate</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.RuleSetNodeImpl" reference="6"/>
+                </org.drools.ruleflow.core.impl.ConnectionImpl>
+              </incomingConnections>
+              <outgoingConnections id="12">
+                <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="13"/>
+      </org.drools.ruleflow.core.impl.EndNodeImpl>
+    </entry>
+    <entry>
+      <long>1</long>
+      <org.drools.ruleflow.core.impl.StartNodeImpl reference="9"/>
+    </entry>
+    <entry>
+      <long>7</long>
+      <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="6"/>
+    </entry>
+  </nodes>
+  <variables id="14"/>
+  <lastNodeId>11</lastNodeId>
+  <id>calculate</id>
+  <name>calculate</name>
+  <version>1</version>
+  <type>RuleFlow</type>
+</org.drools.ruleflow.core.impl.RuleFlowProcessImpl>
\ No newline at end of file

Added: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/conway-agendagroup.drl
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/conway-agendagroup.drl	                        (rev 0)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/conway-agendagroup.drl	2007-07-19 11:56:11 UTC (rev 13632)
@@ -0,0 +1,150 @@
+package org.drools.examples
+ 
+import org.drools.examples.conway.Cell;
+import org.drools.examples.conway.CellGrid;
+import org.drools.examples.conway.Neighbor;
+import org.drools.examples.conway.Phase;
+import org.drools.examples.conway.CellState;
+
+import org.drools.WorkingMemory;
+import org.drools.common.InternalWorkingMemoryActions;
+import org.drools.RuleBase;
+
+
+rule "register north east"
+	agenda-group "register neighbor"
+when
+    CellGrid( $numberOfColumns : numberOfColumns )
+	$cell: Cell( $row : row > 0, $col : col < ( $numberOfColumns - 1 ) )			
+	$northEast : Cell( row  == ($row - 1), col == ( $col + 1 ) )	
+then					
+	insert( new Neighbor( $cell, $northEast ) );
+	insert( new Neighbor( $northEast, $cell ) );		
+end
+
+rule "register north"
+	agenda-group "register neighbor"	
+when
+	$cell: Cell( $row : row > 0, $col : col )	
+	$north : Cell( row  == ($row - 1), col == $col )	
+then		
+	insert( new Neighbor( $cell, $north ) );
+	insert( new Neighbor( $north, $cell ) );		
+end
+
+rule "register north west"
+	agenda-group "register neighbor"
+when
+	$cell: Cell( $row : row > 0, $col : col > 0 )			
+	$northWest : Cell( row  == ($row - 1), col == ( $col - 1 ) )						
+then		
+	insert( new Neighbor( $cell, $northWest ) );
+	insert( new Neighbor( $northWest, $cell ) );		
+end
+
+rule "register west"
+	agenda-group "register neighbor"
+when
+	$cell: Cell( $row : row >= 0, $col : col > 0 )			
+	$west : Cell( row  == $row, col == ( $col - 1 ) )						
+then		
+	insert( new Neighbor( $cell, $west ) );
+	insert( new Neighbor( $west, $cell ) );			
+end
+
+rule "Kill The Lonely"
+	agenda-group "evaluate"
+	no-loop
+when
+#	A live cell has fewer than 2 live neighbors
+	theCell: Cell(liveNeighbors < 2, cellState == CellState.LIVE, phase == Phase.EVALUATE)
+then
+	theCell.setPhase(Phase.KILL);
+	update( theCell );
+end
+
+rule "Kill The Overcrowded"
+	agenda-group "evaluate"
+	no-loop
+when
+#	A live cell has more than 3 live neighbors
+	theCell: Cell(liveNeighbors > 3, cellState == CellState.LIVE, phase == Phase.EVALUATE)
+then
+	theCell.setPhase(Phase.KILL);
+	update( theCell );
+end
+
+rule "Give Birth"
+	agenda-group "evaluate"
+	no-loop
+when
+#	A dead cell has 3 live neighbors
+	theCell: Cell(liveNeighbors == 3, cellState == CellState.DEAD, phase == Phase.EVALUATE)
+then
+	theCell.setPhase(Phase.BIRTH);
+	update( theCell );
+end
+
+rule "reset calculate"
+	agenda-group "reset calculate"
+when
+then
+	WorkingMemory wm = drools.getWorkingMemory();
+	wm.clearAgendaGroup( "calculate" );
+end
+
+rule "kill"
+	agenda-group "kill"
+	no-loop
+when
+	theCell: Cell(phase == Phase.KILL)
+then
+	theCell.setCellState(CellState.DEAD);
+	theCell.setPhase(Phase.DONE);	
+	update( theCell );
+end	
+ 
+rule "birth"
+	agenda-group "birth"
+	no-loop
+when
+	theCell: Cell(phase == Phase.BIRTH)
+then
+	theCell.setCellState(CellState.LIVE);
+	theCell.setPhase(Phase.DONE);
+	update( theCell );	
+end	
+
+rule "Calculate Live"
+	agenda-group "calculate"
+	lock-on-active	
+when
+	theCell: Cell(cellState == CellState.LIVE)
+	Neighbor(cell == theCell, $neighbor : neighbor)	
+then
+	$neighbor.setLiveNeighbors( $neighbor.getLiveNeighbors() + 1 );
+	$neighbor.setPhase( Phase.EVALUATE );	
+	update( $neighbor );
+end	
+
+rule "Calculate Dead"
+	agenda-group "calculate"
+	lock-on-active	
+when
+	theCell: Cell(cellState == CellState.DEAD)
+    Neighbor(cell == theCell, $neighbor : neighbor )
+then
+	$neighbor.setLiveNeighbors( $neighbor.getLiveNeighbors() - 1 );
+	$neighbor.setPhase( Phase.EVALUATE );
+	update( $neighbor );	
+end	
+
+rule "Kill All"
+	agenda-group "kill all"	
+	no-loop
+when
+	theCell: Cell(cellState == CellState.LIVE)
+then
+	theCell.setCellState(CellState.DEAD);
+	update( theCell );
+end
\ No newline at end of file

Copied: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/conway-ruleflow.drl (from rev 13578, labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/conway.drl)
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/conway-ruleflow.drl	                        (rev 0)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/conway-ruleflow.drl	2007-07-19 11:56:11 UTC (rev 13632)
@@ -0,0 +1,150 @@
+package org.drools.examples
+ 
+import org.drools.examples.conway.Cell;
+import org.drools.examples.conway.CellGrid;
+import org.drools.examples.conway.Neighbor;
+import org.drools.examples.conway.Phase;
+import org.drools.examples.conway.CellState;
+
+import org.drools.WorkingMemory;
+import org.drools.common.InternalWorkingMemoryActions;
+import org.drools.RuleBase;
+
+
+rule "register north east"
+	ruleflow-group "register neighbor"
+when
+    CellGrid( $numberOfColumns : numberOfColumns )
+	$cell: Cell( $row : row > 0, $col : col < ( $numberOfColumns - 1 ) )			
+	$northEast : Cell( row  == ($row - 1), col == ( $col + 1 ) )	
+then					
+	insert( new Neighbor( $cell, $northEast ) );
+	insert( new Neighbor( $northEast, $cell ) );		
+end
+
+rule "register north"
+	ruleflow-group "register neighbor"	
+when
+	$cell: Cell( $row : row > 0, $col : col )	
+	$north : Cell( row  == ($row - 1), col == $col )	
+then		
+	insert( new Neighbor( $cell, $north ) );
+	insert( new Neighbor( $north, $cell ) );		
+end
+
+rule "register north west"
+	ruleflow-group "register neighbor"
+when
+	$cell: Cell( $row : row > 0, $col : col > 0 )			
+	$northWest : Cell( row  == ($row - 1), col == ( $col - 1 ) )						
+then		
+	insert( new Neighbor( $cell, $northWest ) );
+	insert( new Neighbor( $northWest, $cell ) );		
+end
+
+rule "register west"
+	ruleflow-group "register neighbor"
+when
+	$cell: Cell( $row : row >= 0, $col : col > 0 )			
+	$west : Cell( row  == $row, col == ( $col - 1 ) )						
+then		
+	insert( new Neighbor( $cell, $west ) );
+	insert( new Neighbor( $west, $cell ) );			
+end
+
+rule "Kill The Lonely"
+	ruleflow-group "evaluate"
+	no-loop
+when
+#	A live cell has fewer than 2 live neighbors
+	theCell: Cell(liveNeighbors < 2, cellState == CellState.LIVE, phase == Phase.EVALUATE)
+then
+	theCell.setPhase(Phase.KILL);
+	update( theCell );
+end
+
+rule "Kill The Overcrowded"
+	ruleflow-group "evaluate"
+	no-loop
+when
+#	A live cell has more than 3 live neighbors
+	theCell: Cell(liveNeighbors > 3, cellState == CellState.LIVE, phase == Phase.EVALUATE)
+then
+	theCell.setPhase(Phase.KILL);
+	update( theCell );
+end
+
+rule "Give Birth"
+	ruleflow-group "evaluate"
+	no-loop
+when
+#	A dead cell has 3 live neighbors
+	theCell: Cell(liveNeighbors == 3, cellState == CellState.DEAD, phase == Phase.EVALUATE)
+then
+	theCell.setPhase(Phase.BIRTH);
+	update( theCell );
+end
+
+rule "reset calculate"
+	ruleflow-group "reset calculate"
+when
+then
+	WorkingMemory wm = drools.getWorkingMemory();
+	wm.clearRuleFlowGroup( "calculate" );
+end
+
+rule "kill"
+	ruleflow-group "kill"
+	no-loop
+when
+	theCell: Cell(phase == Phase.KILL)
+then
+	theCell.setCellState(CellState.DEAD);
+	theCell.setPhase(Phase.DONE);	
+	update( theCell );
+end	
+ 
+rule "birth"
+	ruleflow-group "birth"
+	no-loop
+when
+	theCell: Cell(phase == Phase.BIRTH)
+then
+	theCell.setCellState(CellState.LIVE);
+	theCell.setPhase(Phase.DONE);
+	update( theCell );	
+end	
+
+rule "Calculate Live"
+	ruleflow-group "calculate"
+	lock-on-active	
+when
+	theCell: Cell(cellState == CellState.LIVE)
+	Neighbor(cell == theCell, $neighbor : neighbor)	
+then
+	$neighbor.setLiveNeighbors( $neighbor.getLiveNeighbors() + 1 );
+	$neighbor.setPhase( Phase.EVALUATE );	
+	update( $neighbor );
+end	
+
+rule "Calculate Dead"
+	ruleflow-group "calculate"
+	lock-on-active	
+when
+	theCell: Cell(cellState == CellState.DEAD)
+    Neighbor(cell == theCell, $neighbor : neighbor )
+then
+	$neighbor.setLiveNeighbors( $neighbor.getLiveNeighbors() - 1 );
+	$neighbor.setPhase( Phase.EVALUATE );
+	update( $neighbor );	
+end	
+
+rule "Kill All"
+	ruleflow-group "kill all"	
+	no-loop
+when
+	theCell: Cell(cellState == CellState.LIVE)
+then
+	theCell.setCellState(CellState.DEAD);
+	update( theCell );
+end
\ No newline at end of file

Deleted: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/conway.drl
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/conway.drl	2007-07-19 11:50:57 UTC (rev 13631)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/conway.drl	2007-07-19 11:56:11 UTC (rev 13632)
@@ -1,150 +0,0 @@
-package org.drools.examples
- 
-import org.drools.examples.conway.Cell;
-import org.drools.examples.conway.CellGrid;
-import org.drools.examples.conway.Neighbor;
-import org.drools.examples.conway.Phase;
-import org.drools.examples.conway.CellState;
-
-import org.drools.WorkingMemory;
-import org.drools.common.InternalWorkingMemoryActions;
-import org.drools.RuleBase;
-
-
-rule "register north east"
-	agenda-group "register neighbor"
-when
-    CellGrid( $numberOfColumns : numberOfColumns )
-	$cell: Cell( $row : row > 0, $col : col < ( $numberOfColumns - 1 ) )			
-	$northEast : Cell( row  == ($row - 1), col == ( $col + 1 ) )	
-then					
-	insert( new Neighbor( $cell, $northEast ) );
-	insert( new Neighbor( $northEast, $cell ) );		
-end
-
-rule "register north"
-	agenda-group "register neighbor"	
-when
-	$cell: Cell( $row : row > 0, $col : col )	
-	$north : Cell( row  == ($row - 1), col == $col )	
-then		
-	insert( new Neighbor( $cell, $north ) );
-	insert( new Neighbor( $north, $cell ) );		
-end
-
-rule "register north west"
-	agenda-group "register neighbor"
-when
-	$cell: Cell( $row : row > 0, $col : col > 0 )			
-	$northWest : Cell( row  == ($row - 1), col == ( $col - 1 ) )						
-then		
-	insert( new Neighbor( $cell, $northWest ) );
-	insert( new Neighbor( $northWest, $cell ) );		
-end
-
-rule "register west"
-	agenda-group "register neighbor"
-when
-	$cell: Cell( $row : row >= 0, $col : col > 0 )			
-	$west : Cell( row  == $row, col == ( $col - 1 ) )						
-then		
-	insert( new Neighbor( $cell, $west ) );
-	insert( new Neighbor( $west, $cell ) );			
-end
-
-rule "Kill The Lonely"
-	agenda-group "evaluate"
-	no-loop
-when
-#	A live cell has fewer than 2 live neighbors
-	theCell: Cell(liveNeighbors < 2, cellState == CellState.LIVE, phase == Phase.EVALUATE)
-then
-	theCell.setPhase(Phase.KILL);
-	update( theCell );
-end
-
-rule "Kill The Overcrowded"
-	agenda-group "evaluate"
-	no-loop
-when
-#	A live cell has more than 3 live neighbors
-	theCell: Cell(liveNeighbors > 3, cellState == CellState.LIVE, phase == Phase.EVALUATE)
-then
-	theCell.setPhase(Phase.KILL);
-	update( theCell );
-end
-
-rule "Give Birth"
-	agenda-group "evaluate"
-	no-loop
-when
-#	A dead cell has 3 live neighbors
-	theCell: Cell(liveNeighbors == 3, cellState == CellState.DEAD, phase == Phase.EVALUATE)
-then
-	theCell.setPhase(Phase.BIRTH);
-	update( theCell );
-end
-
-rule "reset calculate"
-	agenda-group "reset calculate"
-when
-then
-	WorkingMemory wm = drools.getWorkingMemory();
-	wm.getAgenda().clearAgendaGroup( "calculate" );
-end
-
-rule "kill"
-	agenda-group "kill"
-	no-loop
-when
-	theCell: Cell(phase == Phase.KILL)
-then
-	theCell.setCellState(CellState.DEAD);
-	theCell.setPhase(Phase.DONE);	
-	update( theCell );
-end	
- 
-rule "birth"
-	agenda-group "birth"
-	no-loop
-when
-	theCell: Cell(phase == Phase.BIRTH)
-then
-	theCell.setCellState(CellState.LIVE);
-	theCell.setPhase(Phase.DONE);
-	update( theCell );	
-end	
-
-rule "Calculate Live"
-	agenda-group "calculate"
-	lock-on-active	
-when
-	theCell: Cell(cellState == CellState.LIVE)
-	Neighbor(cell == theCell, $neighbor : neighbor)	
-then
-	$neighbor.setLiveNeighbors( $neighbor.getLiveNeighbors() + 1 );
-	$neighbor.setPhase( Phase.EVALUATE );	
-	update( $neighbor );
-end	
-
-rule "Calculate Dead"
-	agenda-group "calculate"
-	lock-on-active	
-when
-	theCell: Cell(cellState == CellState.DEAD)
-    Neighbor(cell == theCell, $neighbor : neighbor )
-then
-	$neighbor.setLiveNeighbors( $neighbor.getLiveNeighbors() - 1 );
-	$neighbor.setPhase( Phase.EVALUATE );
-	update( $neighbor );	
-end	
-
-rule "Kill All"
-	agenda-group "kill all"	
-	no-loop
-when
-	theCell: Cell(cellState == CellState.LIVE)
-then
-	theCell.setCellState(CellState.DEAD);
-	update( theCell );
-end
\ No newline at end of file

Deleted: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/conway.dsl
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/conway.dsl	2007-07-19 11:50:57 UTC (rev 13631)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/conway.dsl	2007-07-19 11:56:11 UTC (rev 13632)
@@ -1,6 +0,0 @@
-#These are the DSL elements for Conways Game of Life.
-[then]Kill the cell=theCell.queueNextCellState(CellState.DEAD);
-[when]A live cell has fewer than {number} live neighbors=theCell: Cell(numberOfLiveNeighbors < {number}, cellState == CellState.LIVE)
-[when]A live cell has more than {number} live neighbors=theCell: Cell(numberOfLiveNeighbors > {number}, cellState == CellState.LIVE)
-[when]A dead cell has {number} live neighbors=theCell: Cell(numberOfLiveNeighbors == {number}, cellState == CellState.DEAD)
-[then]Bring the cell to life=theCell.queueNextCellState(CellState.LIVE);

Added: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/generation.rf
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/generation.rf	                        (rev 0)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/generation.rf	2007-07-19 11:56:11 UTC (rev 13632)
@@ -0,0 +1,566 @@
+<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.RuleSetNodeWrapper id="3" serialization="custom">
+            <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+              <default>
+                <constraint id="4">
+                  <x>216</x>
+                  <y>480</y>
+                  <width>80</width>
+                  <height>40</height>
+                </constraint>
+                <element class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" id="5">
+                  <ruleFlowGroup>birth</ruleFlowGroup>
+                  <id>5</id>
+                  <name>birth</name>
+                  <incomingConnections id="6">
+                    <org.drools.ruleflow.core.impl.ConnectionImpl id="7">
+                      <type>1</type>
+                      <from class="org.drools.ruleflow.core.impl.SplitImpl" id="8">
+                        <type>1</type>
+                        <constraints id="9"/>
+                        <id>9</id>
+                        <name>Split</name>
+                        <incomingConnections id="10">
+                          <org.drools.ruleflow.core.impl.ConnectionImpl id="11">
+                            <type>1</type>
+                            <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" id="12">
+                              <ruleFlowGroup>reset calculate</ruleFlowGroup>
+                              <id>4</id>
+                              <name>reset calculate</name>
+                              <incomingConnections id="13">
+                                <org.drools.ruleflow.core.impl.ConnectionImpl id="14">
+                                  <type>1</type>
+                                  <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" id="15">
+                                    <ruleFlowGroup>rest</ruleFlowGroup>
+                                    <id>3</id>
+                                    <name>rest</name>
+                                    <incomingConnections id="16">
+                                      <org.drools.ruleflow.core.impl.ConnectionImpl id="17">
+                                        <type>1</type>
+                                        <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" id="18">
+                                          <ruleFlowGroup>evaluate</ruleFlowGroup>
+                                          <id>2</id>
+                                          <name>evaluate</name>
+                                          <incomingConnections id="19">
+                                            <org.drools.ruleflow.core.impl.ConnectionImpl id="20">
+                                              <type>1</type>
+                                              <from class="org.drools.ruleflow.core.impl.StartNodeImpl" id="21">
+                                                <id>1</id>
+                                                <name>Start</name>
+                                                <incomingConnections id="22"/>
+                                                <outgoingConnections id="23">
+                                                  <org.drools.ruleflow.core.impl.ConnectionImpl reference="20"/>
+                                                </outgoingConnections>
+                                              </from>
+                                              <to class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="18"/>
+                                            </org.drools.ruleflow.core.impl.ConnectionImpl>
+                                          </incomingConnections>
+                                          <outgoingConnections id="24">
+                                            <org.drools.ruleflow.core.impl.ConnectionImpl reference="17"/>
+                                          </outgoingConnections>
+                                        </from>
+                                        <to class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="15"/>
+                                      </org.drools.ruleflow.core.impl.ConnectionImpl>
+                                    </incomingConnections>
+                                    <outgoingConnections id="25">
+                                      <org.drools.ruleflow.core.impl.ConnectionImpl reference="14"/>
+                                    </outgoingConnections>
+                                  </from>
+                                  <to class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="12"/>
+                                </org.drools.ruleflow.core.impl.ConnectionImpl>
+                              </incomingConnections>
+                              <outgoingConnections id="26">
+                                <org.drools.ruleflow.core.impl.ConnectionImpl reference="11"/>
+                              </outgoingConnections>
+                            </from>
+                            <to class="org.drools.ruleflow.core.impl.SplitImpl" reference="8"/>
+                          </org.drools.ruleflow.core.impl.ConnectionImpl>
+                        </incomingConnections>
+                        <outgoingConnections id="27">
+                          <org.drools.ruleflow.core.impl.ConnectionImpl reference="7"/>
+                          <org.drools.ruleflow.core.impl.ConnectionImpl id="28">
+                            <type>1</type>
+                            <from class="org.drools.ruleflow.core.impl.SplitImpl" reference="8"/>
+                            <to class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" id="29">
+                              <ruleFlowGroup>kill</ruleFlowGroup>
+                              <id>6</id>
+                              <name>kill</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.JoinImpl" id="33">
+                                    <type>1</type>
+                                    <id>10</id>
+                                    <name>Join</name>
+                                    <incomingConnections id="34">
+                                      <org.drools.ruleflow.core.impl.ConnectionImpl id="35">
+                                        <type>1</type>
+                                        <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="5"/>
+                                        <to class="org.drools.ruleflow.core.impl.JoinImpl" reference="33"/>
+                                      </org.drools.ruleflow.core.impl.ConnectionImpl>
+                                      <org.drools.ruleflow.core.impl.ConnectionImpl reference="32"/>
+                                    </incomingConnections>
+                                    <outgoingConnections id="36">
+                                      <org.drools.ruleflow.core.impl.ConnectionImpl id="37">
+                                        <type>1</type>
+                                        <from class="org.drools.ruleflow.core.impl.JoinImpl" reference="33"/>
+                                        <to class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" id="38">
+                                          <ruleFlowGroup>calculate</ruleFlowGroup>
+                                          <id>7</id>
+                                          <name>calculate</name>
+                                          <incomingConnections id="39">
+                                            <org.drools.ruleflow.core.impl.ConnectionImpl reference="37"/>
+                                          </incomingConnections>
+                                          <outgoingConnections id="40">
+                                            <org.drools.ruleflow.core.impl.ConnectionImpl id="41">
+                                              <type>1</type>
+                                              <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="38"/>
+                                              <to class="org.drools.ruleflow.core.impl.EndNodeImpl" id="42">
+                                                <id>11</id>
+                                                <name>End</name>
+                                                <incomingConnections id="43">
+                                                  <org.drools.ruleflow.core.impl.ConnectionImpl reference="41"/>
+                                                </incomingConnections>
+                                                <outgoingConnections id="44"/>
+                                              </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>
+                        </outgoingConnections>
+                      </from>
+                      <to class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="5"/>
+                    </org.drools.ruleflow.core.impl.ConnectionImpl>
+                  </incomingConnections>
+                  <outgoingConnections id="45">
+                    <org.drools.ruleflow.core.impl.ConnectionImpl reference="35"/>
+                  </outgoingConnections>
+                </element>
+                <incomingConnections id="46">
+                  <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="47" serialization="custom">
+                    <org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                      <default>
+                        <type>1</type>
+                        <bendpoints id="48"/>
+                        <source class="org.drools.eclipse.flow.ruleflow.core.SplitWrapper" id="49" serialization="custom">
+                          <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                            <default>
+                              <constraint id="50">
+                                <x>348</x>
+                                <y>384</y>
+                                <width>80</width>
+                                <height>40</height>
+                              </constraint>
+                              <element class="org.drools.ruleflow.core.impl.SplitImpl" reference="8"/>
+                              <incomingConnections id="51">
+                                <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="52" serialization="custom">
+                                  <org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                                    <default>
+                                      <type>1</type>
+                                      <bendpoints id="53"/>
+                                      <source class="org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper" id="54" serialization="custom">
+                                        <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                          <default>
+                                            <constraint id="55">
+                                              <x>348</x>
+                                              <y>296</y>
+                                              <width>80</width>
+                                              <height>40</height>
+                                            </constraint>
+                                            <element class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="12"/>
+                                            <incomingConnections id="56">
+                                              <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="57" serialization="custom">
+                                                <org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                                                  <default>
+                                                    <type>1</type>
+                                                    <bendpoints id="58"/>
+                                                    <source class="org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper" id="59" serialization="custom">
+                                                      <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                                        <default>
+                                                          <constraint id="60">
+                                                            <x>348</x>
+                                                            <y>199</y>
+                                                            <width>80</width>
+                                                            <height>40</height>
+                                                          </constraint>
+                                                          <element class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="15"/>
+                                                          <incomingConnections 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.RuleSetNodeWrapper" id="64" serialization="custom">
+                                                                    <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                                                      <default>
+                                                                        <constraint id="65">
+                                                                          <x>348</x>
+                                                                          <y>104</y>
+                                                                          <width>80</width>
+                                                                          <height>40</height>
+                                                                        </constraint>
+                                                                        <element class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="18"/>
+                                                                        <incomingConnections id="66">
+                                                                          <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.StartNodeWrapper" id="69" serialization="custom">
+                                                                                  <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                                                                    <default>
+                                                                                      <constraint id="70">
+                                                                                        <x>348</x>
+                                                                                        <y>12</y>
+                                                                                        <width>80</width>
+                                                                                        <height>40</height>
+                                                                                      </constraint>
+                                                                                      <element class="org.drools.ruleflow.core.impl.StartNodeImpl" reference="21"/>
+                                                                                      <incomingConnections id="71"/>
+                                                                                      <outgoingConnections id="72">
+                                                                                        <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="67"/>
+                                                                                      </outgoingConnections>
+                                                                                    </default>
+                                                                                  </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                                                                </source>
+                                                                                <target class="org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper" 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="20"/>
+                                                                              </default>
+                                                                            </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                                                          </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                                                        </incomingConnections>
+                                                                        <outgoingConnections id="73">
+                                                                          <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="62"/>
+                                                                        </outgoingConnections>
+                                                                        <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
+                                                                      </default>
+                                                                    </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                                                  </source>
+                                                                  <target class="org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper" reference="59"/>
+                                                                </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="17"/>
+                                                                </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="57"/>
+                                                          </outgoingConnections>
+                                                          <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
+                                                        </default>
+                                                      </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                                    </source>
+                                                    <target class="org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper" reference="54"/>
+                                                  </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="14"/>
+                                                  </default>
+                                                </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                              </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                            </incomingConnections>
+                                            <outgoingConnections id="75">
+                                              <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="52"/>
+                                            </outgoingConnections>
+                                            <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
+                                          </default>
+                                        </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                      </source>
+                                      <target class="org.drools.eclipse.flow.ruleflow.core.SplitWrapper" reference="49"/>
+                                    </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="11"/>
+                                    </default>
+                                  </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                              </incomingConnections>
+                              <outgoingConnections id="76">
+                                <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="47"/>
+                                <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="77" serialization="custom">
+                                  <org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                                    <default>
+                                      <type>1</type>
+                                      <bendpoints id="78"/>
+                                      <source class="org.drools.eclipse.flow.ruleflow.core.SplitWrapper" reference="49"/>
+                                      <target class="org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper" id="79" serialization="custom">
+                                        <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                          <default>
+                                            <constraint id="80">
+                                              <x>480</x>
+                                              <y>480</y>
+                                              <width>80</width>
+                                              <height>40</height>
+                                            </constraint>
+                                            <element class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="29"/>
+                                            <incomingConnections id="81">
+                                              <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="77"/>
+                                            </incomingConnections>
+                                            <outgoingConnections id="82">
+                                              <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.RuleSetNodeWrapper" reference="79"/>
+                                                    <target class="org.drools.eclipse.flow.ruleflow.core.JoinWrapper" id="85" serialization="custom">
+                                                      <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                                        <default>
+                                                          <constraint id="86">
+                                                            <x>348</x>
+                                                            <y>562</y>
+                                                            <width>80</width>
+                                                            <height>40</height>
+                                                          </constraint>
+                                                          <element class="org.drools.ruleflow.core.impl.JoinImpl" reference="33"/>
+                                                          <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.RuleSetNodeWrapper" reference="3"/>
+                                                                  <target class="org.drools.eclipse.flow.ruleflow.core.JoinWrapper" 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="35"/>
+                                                                </default>
+                                                              </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                                            </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                                            <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="83"/>
+                                                          </incomingConnections>
+                                                          <outgoingConnections id="90">
+                                                            <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="91" serialization="custom">
+                                                              <org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                                                                <default>
+                                                                  <type>1</type>
+                                                                  <bendpoints id="92"/>
+                                                                  <source class="org.drools.eclipse.flow.ruleflow.core.JoinWrapper" reference="85"/>
+                                                                  <target class="org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper" id="93" serialization="custom">
+                                                                    <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                                                      <default>
+                                                                        <constraint id="94">
+                                                                          <x>348</x>
+                                                                          <y>660</y>
+                                                                          <width>80</width>
+                                                                          <height>40</height>
+                                                                        </constraint>
+                                                                        <element class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="38"/>
+                                                                        <incomingConnections id="95">
+                                                                          <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="91"/>
+                                                                        </incomingConnections>
+                                                                        <outgoingConnections id="96">
+                                                                          <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="97" serialization="custom">
+                                                                            <org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                                                                              <default>
+                                                                                <type>1</type>
+                                                                                <bendpoints id="98"/>
+                                                                                <source class="org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper" reference="93"/>
+                                                                                <target class="org.drools.eclipse.flow.ruleflow.core.EndNodeWrapper" id="99" serialization="custom">
+                                                                                  <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                                                                    <default>
+                                                                                      <constraint id="100">
+                                                                                        <x>348</x>
+                                                                                        <y>756</y>
+                                                                                        <width>80</width>
+                                                                                        <height>40</height>
+                                                                                      </constraint>
+                                                                                      <element class="org.drools.ruleflow.core.impl.EndNodeImpl" reference="42"/>
+                                                                                      <incomingConnections id="101">
+                                                                                        <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="97"/>
+                                                                                      </incomingConnections>
+                                                                                      <outgoingConnections id="102"/>
+                                                                                      <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="41"/>
+                                                                              </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="37"/>
+                                                                </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="32"/>
+                                                  </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="28"/>
+                                    </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.SplitWrapper>
+                            <default/>
+                          </org.drools.eclipse.flow.ruleflow.core.SplitWrapper>
+                        </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="103">
+                  <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="88"/>
+                </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>9-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.SplitWrapper reference="49"/>
+        </entry>
+        <entry>
+          <string>2-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper reference="64"/>
+        </entry>
+        <entry>
+          <string>7-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper reference="93"/>
+        </entry>
+        <entry>
+          <string>4-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper reference="54"/>
+        </entry>
+        <entry>
+          <string>11-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.EndNodeWrapper reference="99"/>
+        </entry>
+        <entry>
+          <string>3-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper reference="59"/>
+        </entry>
+        <entry>
+          <string>6-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper reference="79"/>
+        </entry>
+        <entry>
+          <string>10-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.JoinWrapper reference="85"/>
+        </entry>
+        <entry>
+          <string>1-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.StartNodeWrapper reference="69"/>
+        </entry>
+      </elements>
+      <process class="org.drools.ruleflow.core.impl.RuleFlowProcessImpl" id="104">
+        <nodes id="105">
+          <entry>
+            <long>2</long>
+            <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="18"/>
+          </entry>
+          <entry>
+            <long>4</long>
+            <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="12"/>
+          </entry>
+          <entry>
+            <long>9</long>
+            <org.drools.ruleflow.core.impl.SplitImpl reference="8"/>
+          </entry>
+          <entry>
+            <long>6</long>
+            <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="29"/>
+          </entry>
+          <entry>
+            <long>11</long>
+            <org.drools.ruleflow.core.impl.EndNodeImpl reference="42"/>
+          </entry>
+          <entry>
+            <long>1</long>
+            <org.drools.ruleflow.core.impl.StartNodeImpl reference="21"/>
+          </entry>
+          <entry>
+            <long>3</long>
+            <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="15"/>
+          </entry>
+          <entry>
+            <long>7</long>
+            <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="38"/>
+          </entry>
+          <entry>
+            <long>10</long>
+            <org.drools.ruleflow.core.impl.JoinImpl reference="33"/>
+          </entry>
+          <entry>
+            <long>5</long>
+            <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="5"/>
+          </entry>
+        </nodes>
+        <variables id="106"/>
+        <lastNodeId>11</lastNodeId>
+        <id>generation</id>
+        <name>generation</name>
+        <version>1</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-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/generation.rfm
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/generation.rfm	                        (rev 0)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/generation.rfm	2007-07-19 11:56:11 UTC (rev 13632)
@@ -0,0 +1,187 @@
+<org.drools.ruleflow.core.impl.RuleFlowProcessImpl id="1">
+  <nodes id="2">
+    <entry>
+      <long>2</long>
+      <org.drools.ruleflow.core.impl.RuleSetNodeImpl id="3">
+        <ruleFlowGroup>evaluate</ruleFlowGroup>
+        <id>2</id>
+        <name>evaluate</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>rest</ruleFlowGroup>
+              <id>3</id>
+              <name>rest</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.RuleSetNodeImpl" id="15">
+                    <ruleFlowGroup>reset calculate</ruleFlowGroup>
+                    <id>4</id>
+                    <name>reset calculate</name>
+                    <incomingConnections id="16">
+                      <org.drools.ruleflow.core.impl.ConnectionImpl reference="14"/>
+                    </incomingConnections>
+                    <outgoingConnections id="17">
+                      <org.drools.ruleflow.core.impl.ConnectionImpl id="18">
+                        <type>1</type>
+                        <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="15"/>
+                        <to class="org.drools.ruleflow.core.impl.SplitImpl" id="19">
+                          <type>1</type>
+                          <constraints id="20"/>
+                          <id>9</id>
+                          <name>Split</name>
+                          <incomingConnections id="21">
+                            <org.drools.ruleflow.core.impl.ConnectionImpl reference="18"/>
+                          </incomingConnections>
+                          <outgoingConnections id="22">
+                            <org.drools.ruleflow.core.impl.ConnectionImpl id="23">
+                              <type>1</type>
+                              <from class="org.drools.ruleflow.core.impl.SplitImpl" reference="19"/>
+                              <to class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" id="24">
+                                <ruleFlowGroup>birth</ruleFlowGroup>
+                                <id>5</id>
+                                <name>birth</name>
+                                <incomingConnections id="25">
+                                  <org.drools.ruleflow.core.impl.ConnectionImpl reference="23"/>
+                                </incomingConnections>
+                                <outgoingConnections id="26">
+                                  <org.drools.ruleflow.core.impl.ConnectionImpl id="27">
+                                    <type>1</type>
+                                    <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="24"/>
+                                    <to class="org.drools.ruleflow.core.impl.JoinImpl" id="28">
+                                      <type>1</type>
+                                      <id>10</id>
+                                      <name>Join</name>
+                                      <incomingConnections id="29">
+                                        <org.drools.ruleflow.core.impl.ConnectionImpl reference="27"/>
+                                        <org.drools.ruleflow.core.impl.ConnectionImpl id="30">
+                                          <type>1</type>
+                                          <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" id="31">
+                                            <ruleFlowGroup>kill</ruleFlowGroup>
+                                            <id>6</id>
+                                            <name>kill</name>
+                                            <incomingConnections id="32">
+                                              <org.drools.ruleflow.core.impl.ConnectionImpl id="33">
+                                                <type>1</type>
+                                                <from class="org.drools.ruleflow.core.impl.SplitImpl" reference="19"/>
+                                                <to class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="31"/>
+                                              </org.drools.ruleflow.core.impl.ConnectionImpl>
+                                            </incomingConnections>
+                                            <outgoingConnections id="34">
+                                              <org.drools.ruleflow.core.impl.ConnectionImpl reference="30"/>
+                                            </outgoingConnections>
+                                          </from>
+                                          <to class="org.drools.ruleflow.core.impl.JoinImpl" reference="28"/>
+                                        </org.drools.ruleflow.core.impl.ConnectionImpl>
+                                      </incomingConnections>
+                                      <outgoingConnections id="35">
+                                        <org.drools.ruleflow.core.impl.ConnectionImpl id="36">
+                                          <type>1</type>
+                                          <from class="org.drools.ruleflow.core.impl.JoinImpl" reference="28"/>
+                                          <to class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" id="37">
+                                            <ruleFlowGroup>calculate</ruleFlowGroup>
+                                            <id>7</id>
+                                            <name>calculate</name>
+                                            <incomingConnections id="38">
+                                              <org.drools.ruleflow.core.impl.ConnectionImpl reference="36"/>
+                                            </incomingConnections>
+                                            <outgoingConnections id="39">
+                                              <org.drools.ruleflow.core.impl.ConnectionImpl id="40">
+                                                <type>1</type>
+                                                <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="37"/>
+                                                <to class="org.drools.ruleflow.core.impl.EndNodeImpl" id="41">
+                                                  <id>11</id>
+                                                  <name>End</name>
+                                                  <incomingConnections id="42">
+                                                    <org.drools.ruleflow.core.impl.ConnectionImpl reference="40"/>
+                                                  </incomingConnections>
+                                                  <outgoingConnections id="43"/>
+                                                </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="33"/>
+                          </outgoingConnections>
+                        </to>
+                      </org.drools.ruleflow.core.impl.ConnectionImpl>
+                    </outgoingConnections>
+                  </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.RuleSetNodeImpl reference="15"/>
+    </entry>
+    <entry>
+      <long>9</long>
+      <org.drools.ruleflow.core.impl.SplitImpl reference="19"/>
+    </entry>
+    <entry>
+      <long>6</long>
+      <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="31"/>
+    </entry>
+    <entry>
+      <long>11</long>
+      <org.drools.ruleflow.core.impl.EndNodeImpl reference="41"/>
+    </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>
+    <entry>
+      <long>7</long>
+      <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="37"/>
+    </entry>
+    <entry>
+      <long>10</long>
+      <org.drools.ruleflow.core.impl.JoinImpl reference="28"/>
+    </entry>
+    <entry>
+      <long>5</long>
+      <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="24"/>
+    </entry>
+  </nodes>
+  <variables id="44"/>
+  <lastNodeId>11</lastNodeId>
+  <id>generation</id>
+  <name>generation</name>
+  <version>1</version>
+  <type>RuleFlow</type>
+</org.drools.ruleflow.core.impl.RuleFlowProcessImpl>
\ No newline at end of file

Added: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/killAll.rf
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/killAll.rf	                        (rev 0)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/killAll.rf	2007-07-19 11:56:11 UTC (rev 13632)
@@ -0,0 +1,265 @@
+<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>7-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>368</x>
+                  <y>298</y>
+                  <width>80</width>
+                  <height>40</height>
+                </constraint>
+                <element class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" id="5">
+                  <ruleFlowGroup>calculate</ruleFlowGroup>
+                  <id>7</id>
+                  <name>calculate</name>
+                  <incomingConnections id="6">
+                    <org.drools.ruleflow.core.impl.ConnectionImpl id="7">
+                      <type>1</type>
+                      <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" id="8">
+                        <ruleFlowGroup>kill all</ruleFlowGroup>
+                        <id>6</id>
+                        <name>kill all</name>
+                        <incomingConnections id="9">
+                          <org.drools.ruleflow.core.impl.ConnectionImpl id="10">
+                            <type>1</type>
+                            <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" id="11">
+                              <ruleFlowGroup>reset calculate</ruleFlowGroup>
+                              <id>4</id>
+                              <name>reset calculate</name>
+                              <incomingConnections id="12">
+                                <org.drools.ruleflow.core.impl.ConnectionImpl id="13">
+                                  <type>1</type>
+                                  <from class="org.drools.ruleflow.core.impl.StartNodeImpl" id="14">
+                                    <id>1</id>
+                                    <name>Start</name>
+                                    <incomingConnections id="15"/>
+                                    <outgoingConnections id="16">
+                                      <org.drools.ruleflow.core.impl.ConnectionImpl reference="13"/>
+                                    </outgoingConnections>
+                                  </from>
+                                  <to class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="11"/>
+                                </org.drools.ruleflow.core.impl.ConnectionImpl>
+                              </incomingConnections>
+                              <outgoingConnections id="17">
+                                <org.drools.ruleflow.core.impl.ConnectionImpl reference="10"/>
+                              </outgoingConnections>
+                            </from>
+                            <to class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="8"/>
+                          </org.drools.ruleflow.core.impl.ConnectionImpl>
+                        </incomingConnections>
+                        <outgoingConnections id="18">
+                          <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="19">
+                    <org.drools.ruleflow.core.impl.ConnectionImpl id="20">
+                      <type>1</type>
+                      <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="5"/>
+                      <to class="org.drools.ruleflow.core.impl.EndNodeImpl" id="21">
+                        <id>11</id>
+                        <name>End</name>
+                        <incomingConnections id="22">
+                          <org.drools.ruleflow.core.impl.ConnectionImpl reference="20"/>
+                        </incomingConnections>
+                        <outgoingConnections id="23"/>
+                      </to>
+                    </org.drools.ruleflow.core.impl.ConnectionImpl>
+                  </outgoingConnections>
+                </element>
+                <incomingConnections id="24">
+                  <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="25" serialization="custom">
+                    <org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                      <default>
+                        <type>1</type>
+                        <bendpoints id="26"/>
+                        <source class="org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper" id="27" serialization="custom">
+                          <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                            <default>
+                              <constraint id="28">
+                                <x>368</x>
+                                <y>223</y>
+                                <width>80</width>
+                                <height>40</height>
+                              </constraint>
+                              <element class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="8"/>
+                              <incomingConnections 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.RuleSetNodeWrapper" id="32" serialization="custom">
+                                        <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                          <default>
+                                            <constraint id="33">
+                                              <x>368</x>
+                                              <y>154</y>
+                                              <width>80</width>
+                                              <height>40</height>
+                                            </constraint>
+                                            <element class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="11"/>
+                                            <incomingConnections id="34">
+                                              <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="35" serialization="custom">
+                                                <org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                                                  <default>
+                                                    <type>1</type>
+                                                    <bendpoints id="36"/>
+                                                    <source class="org.drools.eclipse.flow.ruleflow.core.StartNodeWrapper" id="37" serialization="custom">
+                                                      <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                                        <default>
+                                                          <constraint id="38">
+                                                            <x>368</x>
+                                                            <y>73</y>
+                                                            <width>80</width>
+                                                            <height>40</height>
+                                                          </constraint>
+                                                          <element class="org.drools.ruleflow.core.impl.StartNodeImpl" reference="14"/>
+                                                          <incomingConnections id="39"/>
+                                                          <outgoingConnections id="40">
+                                                            <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="35"/>
+                                                          </outgoingConnections>
+                                                        </default>
+                                                      </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                                    </source>
+                                                    <target class="org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper" reference="32"/>
+                                                  </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>
+                                            </incomingConnections>
+                                            <outgoingConnections id="41">
+                                              <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="30"/>
+                                            </outgoingConnections>
+                                            <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
+                                          </default>
+                                        </org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                                      </source>
+                                      <target class="org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper" reference="27"/>
+                                    </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="10"/>
+                                    </default>
+                                  </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                                </org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper>
+                              </incomingConnections>
+                              <outgoingConnections id="42">
+                                <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="25"/>
+                              </outgoingConnections>
+                              <parent class="org.drools.eclipse.flow.ruleflow.core.RuleFlowProcessWrapper" reference="1"/>
+                            </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="43">
+                  <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="44" serialization="custom">
+                    <org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                      <default>
+                        <type>1</type>
+                        <bendpoints id="45"/>
+                        <source class="org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper" reference="3"/>
+                        <target class="org.drools.eclipse.flow.ruleflow.core.EndNodeWrapper" id="46" serialization="custom">
+                          <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                            <default>
+                              <constraint id="47">
+                                <x>368</x>
+                                <y>383</y>
+                                <width>80</width>
+                                <height>40</height>
+                              </constraint>
+                              <element class="org.drools.ruleflow.core.impl.EndNodeImpl" reference="21"/>
+                              <incomingConnections id="48">
+                                <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="44"/>
+                              </incomingConnections>
+                              <outgoingConnections id="49"/>
+                              <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="20"/>
+                      </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.RuleSetNodeWrapper reference="32"/>
+        </entry>
+        <entry>
+          <string>11-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.EndNodeWrapper reference="46"/>
+        </entry>
+        <entry>
+          <string>6-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper reference="27"/>
+        </entry>
+        <entry>
+          <string>1-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.StartNodeWrapper reference="37"/>
+        </entry>
+      </elements>
+      <process class="org.drools.ruleflow.core.impl.RuleFlowProcessImpl" id="50">
+        <nodes id="51">
+          <entry>
+            <long>4</long>
+            <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="11"/>
+          </entry>
+          <entry>
+            <long>6</long>
+            <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="8"/>
+          </entry>
+          <entry>
+            <long>11</long>
+            <org.drools.ruleflow.core.impl.EndNodeImpl reference="21"/>
+          </entry>
+          <entry>
+            <long>1</long>
+            <org.drools.ruleflow.core.impl.StartNodeImpl reference="14"/>
+          </entry>
+          <entry>
+            <long>7</long>
+            <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="5"/>
+          </entry>
+        </nodes>
+        <variables id="52"/>
+        <lastNodeId>11</lastNodeId>
+        <id>kill all</id>
+        <name>kill all</name>
+        <version>1</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-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/killAll.rfm
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/killAll.rfm	                        (rev 0)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/killAll.rfm	2007-07-19 11:56:11 UTC (rev 13632)
@@ -0,0 +1,90 @@
+<org.drools.ruleflow.core.impl.RuleFlowProcessImpl id="1">
+  <nodes id="2">
+    <entry>
+      <long>4</long>
+      <org.drools.ruleflow.core.impl.RuleSetNodeImpl id="3">
+        <ruleFlowGroup>reset calculate</ruleFlowGroup>
+        <id>4</id>
+        <name>reset calculate</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>kill all</ruleFlowGroup>
+              <id>6</id>
+              <name>kill all</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.RuleSetNodeImpl" id="15">
+                    <ruleFlowGroup>calculate</ruleFlowGroup>
+                    <id>7</id>
+                    <name>calculate</name>
+                    <incomingConnections id="16">
+                      <org.drools.ruleflow.core.impl.ConnectionImpl reference="14"/>
+                    </incomingConnections>
+                    <outgoingConnections id="17">
+                      <org.drools.ruleflow.core.impl.ConnectionImpl id="18">
+                        <type>1</type>
+                        <from class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" reference="15"/>
+                        <to class="org.drools.ruleflow.core.impl.EndNodeImpl" id="19">
+                          <id>11</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>
+            </to>
+          </org.drools.ruleflow.core.impl.ConnectionImpl>
+        </outgoingConnections>
+      </org.drools.ruleflow.core.impl.RuleSetNodeImpl>
+    </entry>
+    <entry>
+      <long>6</long>
+      <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="11"/>
+    </entry>
+    <entry>
+      <long>11</long>
+      <org.drools.ruleflow.core.impl.EndNodeImpl reference="19"/>
+    </entry>
+    <entry>
+      <long>1</long>
+      <org.drools.ruleflow.core.impl.StartNodeImpl reference="6"/>
+    </entry>
+    <entry>
+      <long>7</long>
+      <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="15"/>
+    </entry>
+  </nodes>
+  <variables id="22"/>
+  <lastNodeId>11</lastNodeId>
+  <id>kill all</id>
+  <name>kill all</name>
+  <version>1</version>
+  <type>RuleFlow</type>
+</org.drools.ruleflow.core.impl.RuleFlowProcessImpl>
\ No newline at end of file

Added: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/registerNeighbor.rf
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/registerNeighbor.rf	                        (rev 0)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/registerNeighbor.rf	2007-07-19 11:56:11 UTC (rev 13632)
@@ -0,0 +1,154 @@
+<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>307</x>
+                  <y>128</y>
+                  <width>99</width>
+                  <height>40</height>
+                </constraint>
+                <element class="org.drools.ruleflow.core.impl.RuleSetNodeImpl" id="5">
+                  <ruleFlowGroup>register neighbor</ruleFlowGroup>
+                  <id>2</id>
+                  <name>register neighbor</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.EndNodeImpl" id="13">
+                        <id>3</id>
+                        <name>End</name>
+                        <incomingConnections id="14">
+                          <org.drools.ruleflow.core.impl.ConnectionImpl reference="12"/>
+                        </incomingConnections>
+                        <outgoingConnections id="15"/>
+                      </to>
+                    </org.drools.ruleflow.core.impl.ConnectionImpl>
+                  </outgoingConnections>
+                </element>
+                <incomingConnections id="16">
+                  <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="17" serialization="custom">
+                    <org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                      <default>
+                        <type>1</type>
+                        <bendpoints id="18"/>
+                        <source class="org.drools.eclipse.flow.ruleflow.core.StartNodeWrapper" id="19" serialization="custom">
+                          <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                            <default>
+                              <constraint id="20">
+                                <x>316</x>
+                                <y>33</y>
+                                <width>80</width>
+                                <height>40</height>
+                              </constraint>
+                              <element class="org.drools.ruleflow.core.impl.StartNodeImpl" reference="8"/>
+                              <incomingConnections id="21"/>
+                              <outgoingConnections id="22">
+                                <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="17"/>
+                              </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="23">
+                  <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper id="24" serialization="custom">
+                    <org.drools.eclipse.flow.common.editor.core.ElementConnection>
+                      <default>
+                        <type>1</type>
+                        <bendpoints id="25"/>
+                        <source class="org.drools.eclipse.flow.ruleflow.core.RuleSetNodeWrapper" reference="3"/>
+                        <target class="org.drools.eclipse.flow.ruleflow.core.EndNodeWrapper" id="26" serialization="custom">
+                          <org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper>
+                            <default>
+                              <constraint id="27">
+                                <x>316</x>
+                                <y>222</y>
+                                <width>80</width>
+                                <height>40</height>
+                              </constraint>
+                              <element class="org.drools.ruleflow.core.impl.EndNodeImpl" reference="13"/>
+                              <incomingConnections id="28">
+                                <org.drools.eclipse.flow.ruleflow.core.ConnectionWrapper reference="24"/>
+                              </incomingConnections>
+                              <outgoingConnections id="29"/>
+                              <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>3-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.EndNodeWrapper reference="26"/>
+        </entry>
+        <entry>
+          <string>1-Wrapper</string>
+          <org.drools.eclipse.flow.ruleflow.core.StartNodeWrapper reference="19"/>
+        </entry>
+      </elements>
+      <process class="org.drools.ruleflow.core.impl.RuleFlowProcessImpl" id="30">
+        <nodes id="31">
+          <entry>
+            <long>2</long>
+            <org.drools.ruleflow.core.impl.RuleSetNodeImpl reference="5"/>
+          </entry>
+          <entry>
+            <long>1</long>
+            <org.drools.ruleflow.core.impl.StartNodeImpl reference="8"/>
+          </entry>
+          <entry>
+            <long>3</long>
+            <org.drools.ruleflow.core.impl.EndNodeImpl reference="13"/>
+          </entry>
+        </nodes>
+        <variables id="32"/>
+        <lastNodeId>3</lastNodeId>
+        <id>register neighbor</id>
+        <name>register neighbor</name>
+        <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-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/registerNeighbor.rfm
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/registerNeighbor.rfm	                        (rev 0)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/rules/org/drools/examples/conway/registerNeighbor.rfm	2007-07-19 11:56:11 UTC (rev 13632)
@@ -0,0 +1,53 @@
+<org.drools.ruleflow.core.impl.RuleFlowProcessImpl id="1">
+  <nodes id="2">
+    <entry>
+      <long>2</long>
+      <org.drools.ruleflow.core.impl.RuleSetNodeImpl id="3">
+        <ruleFlowGroup>register neighbor</ruleFlowGroup>
+        <id>2</id>
+        <name>register neighbor</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.EndNodeImpl" id="11">
+              <id>3</id>
+              <name>End</name>
+              <incomingConnections id="12">
+                <org.drools.ruleflow.core.impl.ConnectionImpl reference="10"/>
+              </incomingConnections>
+              <outgoingConnections id="13"/>
+            </to>
+          </org.drools.ruleflow.core.impl.ConnectionImpl>
+        </outgoingConnections>
+      </org.drools.ruleflow.core.impl.RuleSetNodeImpl>
+    </entry>
+    <entry>
+      <long>1</long>
+      <org.drools.ruleflow.core.impl.StartNodeImpl reference="6"/>
+    </entry>
+    <entry>
+      <long>3</long>
+      <org.drools.ruleflow.core.impl.EndNodeImpl reference="11"/>
+    </entry>
+  </nodes>
+  <variables id="14"/>
+  <lastNodeId>3</lastNodeId>
+  <id>register neighbor</id>
+  <name>register neighbor</name>
+  <type>RuleFlow</type>
+</org.drools.ruleflow.core.impl.RuleFlowProcessImpl>
\ No newline at end of file




More information about the jboss-svn-commits mailing list