Bob et al.

Here the werklow patch.  I noticed that two of the
libraries referenced in the project.xml are no longer
present in ibiblio, so I replaced them with more
recent versions.

- Morgan

=====
Morgan Delagrange
http://jakarta.apache.org/taglibs
http://jakarta.apache.org/commons
http://axion.tigris.org
http://jakarta.apache.org/watchdog

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
? src/java/main/com/werken/werkflow/jelly/workspace
Index: project.xml
===================================================================
RCS file: /cvsroot/werkflow/werkflow/project.xml,v
retrieving revision 1.14
diff -u -r1.14 project.xml
--- project.xml 22 Nov 2002 03:06:22 -0000      1.14
+++ project.xml 30 Jan 2003 04:41:52 -0000
@@ -132,7 +132,7 @@
 
     <dependency>
       <id>drools</id>
-      <version>2.0-beta-8</version>
+      <version>2.0-beta-10</version>
       <url>http://drools.org</url>
     </dependency>
 
@@ -144,7 +144,7 @@
 
     <dependency>
       <id>plexus</id>
-      <version>0.1</version>
+      <version>0.2</version>
     </dependency>
 
     <dependency>
Index: src/java/main/com/werken/werkflow/WorkflowException.java
===================================================================
RCS file: 
/cvsroot/werkflow/werkflow/src/java/main/com/werken/werkflow/WorkflowException.java,v
retrieving revision 1.3
diff -u -r1.3 WorkflowException.java
--- src/java/main/com/werken/werkflow/WorkflowException.java    19 Nov 2002 05:06:14 
-0000      1.3
+++ src/java/main/com/werken/werkflow/WorkflowException.java    30 Jan 2003 04:41:52 
+-0000
@@ -54,7 +54,7 @@
  *  @version $Id: WorkflowException.java,v 1.3 2002/11/19 05:06:14 bob Exp $
  */
 public class WorkflowException
-    extends Exception
+    extends Exception  
 {
     // ----------------------------------------------------------------------
     //     Instance members
Index: src/java/main/com/werken/werkflow/jelly/ActivityTag.java
===================================================================
RCS file: 
/cvsroot/werkflow/werkflow/src/java/main/com/werken/werkflow/jelly/ActivityTag.java,v
retrieving revision 1.3
diff -u -r1.3 ActivityTag.java
--- src/java/main/com/werken/werkflow/jelly/ActivityTag.java    21 Nov 2002 07:53:24 
-0000      1.3
+++ src/java/main/com/werken/werkflow/jelly/ActivityTag.java    30 Jan 2003 04:41:52 
+-0000
@@ -48,6 +48,7 @@
 
 import com.werken.petridish.Transition;
 
+import org.apache.commons.jelly.JellyTagException;
 import org.apache.commons.jelly.Script;
 import org.apache.commons.jelly.XMLOutput;
 
@@ -81,7 +82,7 @@
     /** @see org.apache.commons.jelly.Tag
      */
     public void doTag(XMLOutput output)
-        throws Exception
+        throws JellyTagException
     {
         verifyAncestor( "transition",
                         TransitionTag.class );
Index: src/java/main/com/werken/werkflow/jelly/InputTag.java
===================================================================
RCS file: 
/cvsroot/werkflow/werkflow/src/java/main/com/werken/werkflow/jelly/InputTag.java,v
retrieving revision 1.2
diff -u -r1.2 InputTag.java
--- src/java/main/com/werken/werkflow/jelly/InputTag.java       18 Nov 2002 18:35:07 
-0000      1.2
+++ src/java/main/com/werken/werkflow/jelly/InputTag.java       30 Jan 2003 04:41:52 
+-0000
@@ -46,10 +46,12 @@
  
  */
 
+import com.werken.petridish.NoSuchIdException;
 import com.werken.petridish.Place;
 import com.werken.petridish.Transition;
 import com.werken.petridish.InputArc;
 
+import org.apache.commons.jelly.JellyTagException;
 import org.apache.commons.jelly.XMLOutput;
 
 /** Define an <code>InputArc</code>.
@@ -133,19 +135,25 @@
      *
      *  @return The origin place of the arc.
      *
-     *  @throws Exception If an error occurs while attempting  to
+     *  @throws JellyTagException If an error occurs while attempting  to
      *          retrieve the origin place.
      */
     private Place getFromPlace()
-        throws Exception
+        throws JellyTagException
     {
-        return getCurrentNet().getPlace( getFrom() );
+        try {
+                       return getCurrentNet().getPlace( getFrom() );
+               } 
+        catch (NoSuchIdException e) 
+        {
+            throw new JellyTagException( e );
+               } 
     }
 
     /** @see org.apache.commons.jelly.Tag
      */
     public void doTag(XMLOutput output)
-        throws Exception
+        throws JellyTagException
     {
         verifyAncestor( "inputs",
                         InputsTag.class );
Index: src/java/main/com/werken/werkflow/jelly/InputsTag.java
===================================================================
RCS file: 
/cvsroot/werkflow/werkflow/src/java/main/com/werken/werkflow/jelly/InputsTag.java,v
retrieving revision 1.2
diff -u -r1.2 InputsTag.java
--- src/java/main/com/werken/werkflow/jelly/InputsTag.java      18 Nov 2002 22:54:40 
-0000      1.2
+++ src/java/main/com/werken/werkflow/jelly/InputsTag.java      30 Jan 2003 04:41:52 
+-0000
@@ -45,7 +45,7 @@
  OF THE POSSIBILITY OF SUCH DAMAGE.
  
  */
-
+import org.apache.commons.jelly.JellyTagException;
 import org.apache.commons.jelly.XMLOutput;
 
 /** Begin an <code>InputArc</code> definition block.
@@ -78,7 +78,7 @@
     /** @see org.apache.commons.jelly.Tag
      */
     public void doTag(XMLOutput output)
-        throws Exception
+        throws JellyTagException
     {
         verifyAncestor( "transition",
                         TransitionTag.class );
Index: src/java/main/com/werken/werkflow/jelly/ManualInitiateTag.java
===================================================================
RCS file: 
/cvsroot/werkflow/werkflow/src/java/main/com/werken/werkflow/jelly/ManualInitiateTag.java,v
retrieving revision 1.2
diff -u -r1.2 ManualInitiateTag.java
--- src/java/main/com/werken/werkflow/jelly/ManualInitiateTag.java      21 Nov 2002 
07:53:24 -0000      1.2
+++ src/java/main/com/werken/werkflow/jelly/ManualInitiateTag.java      30 Jan 2003 
+04:41:53 -0000
@@ -47,7 +47,7 @@
  */
 
 import org.apache.commons.jelly.XMLOutput;
-import org.apache.commons.jelly.JellyException;
+import org.apache.commons.jelly.JellyTagException;
 
 /** Define a <code>ManualInitiator</code>.
  *
@@ -103,13 +103,13 @@
     /** @see org.apache.commons.jelly.Tag
      */
     public void doTag(XMLOutput output)
-        throws Exception
+        throws JellyTagException
     {
         ProcessTag tag = (ProcessTag) findAncestorWithClass( ProcessTag.class );
 
         if ( tag == null )
         {
-            throw new JellyException( "no current process" );
+            throw new JellyTagException( "no current process" );
         }
 
         verifyStringAttribute( "start",
Index: src/java/main/com/werken/werkflow/jelly/ManualTriggerTag.java
===================================================================
RCS file: 
/cvsroot/werkflow/werkflow/src/java/main/com/werken/werkflow/jelly/ManualTriggerTag.java,v
retrieving revision 1.4
diff -u -r1.4 ManualTriggerTag.java
--- src/java/main/com/werken/werkflow/jelly/ManualTriggerTag.java       21 Nov 2002 
07:53:24 -0000      1.4
+++ src/java/main/com/werken/werkflow/jelly/ManualTriggerTag.java       30 Jan 2003 
+04:41:53 -0000
@@ -50,6 +50,7 @@
 
 import com.werken.petridish.Transition;
 
+import org.apache.commons.jelly.JellyTagException;
 import org.apache.commons.jelly.XMLOutput;
 
 /** Set a manually-triggered <code>FiringStrategy</code>.
@@ -82,7 +83,7 @@
     /** @see org.apache.commons.jelly.Tag
      */
     public void doTag(XMLOutput output)
-        throws Exception
+        throws JellyTagException
     {
         Transition transition = getCurrentTransition();
 
Index: src/java/main/com/werken/werkflow/jelly/MessageInitiateTag.java
===================================================================
RCS file: 
/cvsroot/werkflow/werkflow/src/java/main/com/werken/werkflow/jelly/MessageInitiateTag.java,v
retrieving revision 1.2
diff -u -r1.2 MessageInitiateTag.java
--- src/java/main/com/werken/werkflow/jelly/MessageInitiateTag.java     21 Nov 2002 
07:53:24 -0000      1.2
+++ src/java/main/com/werken/werkflow/jelly/MessageInitiateTag.java     30 Jan 2003 
+04:41:53 -0000
@@ -47,7 +47,7 @@
  */
 
 import org.apache.commons.jelly.XMLOutput;
-import org.apache.commons.jelly.JellyException;
+import org.apache.commons.jelly.JellyTagException;
 import org.apache.commons.jelly.expression.Expression;
 
 /** Define a <code>MessageInitiator</code>.
@@ -129,13 +129,20 @@
      *
      *  @return The message type class.
      *
-     *  @throws Exception If an error occurs attempting to
+     *  @throws JellyTagException If an error occurs attempting to
      *          retrieve the message type.
      */
     public Class getMessageType()
-        throws Exception
+        throws JellyTagException
     {
-        return Class.forName( getType() );
+        try 
+        {
+            return Class.forName(getType());
+        } 
+        catch (ClassNotFoundException e) 
+        {
+            throw new JellyTagException(e);
+        }
     }
 
     /** Set the message match <code>Expression</code>.
@@ -159,13 +166,13 @@
     /** @see org.apache.commons.jelly.Tag
      */
     public void doTag(XMLOutput output)
-        throws Exception
+        throws JellyTagException
     {
         ProcessTag tag = (ProcessTag) findAncestorWithClass( ProcessTag.class );
 
         if ( tag == null )
         {
-            throw new JellyException( "no current process" );
+            throw new JellyTagException( "no current process" );
         }
 
         verifyStringAttribute( "start",
Index: src/java/main/com/werken/werkflow/jelly/MessageTriggerTag.java
===================================================================
RCS file: 
/cvsroot/werkflow/werkflow/src/java/main/com/werken/werkflow/jelly/MessageTriggerTag.java,v
retrieving revision 1.3
diff -u -r1.3 MessageTriggerTag.java
--- src/java/main/com/werken/werkflow/jelly/MessageTriggerTag.java      21 Nov 2002 
07:53:24 -0000      1.3
+++ src/java/main/com/werken/werkflow/jelly/MessageTriggerTag.java      30 Jan 2003 
+04:41:53 -0000
@@ -48,6 +48,7 @@
 
 import com.werken.petridish.Transition;
 
+import org.apache.commons.jelly.JellyTagException;
 import org.apache.commons.jelly.XMLOutput;
 import org.apache.commons.jelly.expression.Expression;
 
@@ -128,19 +129,26 @@
      *
      *  @return The message type class.
      *
-     *  @throws Exception If an error occurs while attempting to 
+     *  @throws JellyTagException If an error occurs while attempting to 
      *          retrieve the message type.
      */
     private Class getTypeClass()
-        throws Exception
+        throws JellyTagException
     {
-        return Class.forName( getType() );
+        try
+        {
+            return Class.forName(getType());
+        }
+        catch (ClassNotFoundException e)
+        {
+            throw new JellyTagException(e);
+        }
     }
 
     /** @see org.apache.commons.jelly.Tag
      */
     public void doTag(XMLOutput output)
-        throws Exception
+        throws JellyTagException
     {
         verifyAncestor( "transition",
                         TransitionTag.class );
Index: src/java/main/com/werken/werkflow/jelly/OutputTag.java
===================================================================
RCS file: 
/cvsroot/werkflow/werkflow/src/java/main/com/werken/werkflow/jelly/OutputTag.java,v
retrieving revision 1.2
diff -u -r1.2 OutputTag.java
--- src/java/main/com/werken/werkflow/jelly/OutputTag.java      18 Nov 2002 18:35:07 
-0000      1.2
+++ src/java/main/com/werken/werkflow/jelly/OutputTag.java      30 Jan 2003 04:41:53 
+-0000
@@ -46,10 +46,12 @@
  
  */
 
+import com.werken.petridish.NoSuchIdException;
 import com.werken.petridish.Place;
 import com.werken.petridish.Transition;
 import com.werken.petridish.OutputArc;
 
+import org.apache.commons.jelly.JellyTagException;
 import org.apache.commons.jelly.Script;
 import org.apache.commons.jelly.XMLOutput;
 
@@ -110,19 +112,25 @@
      *
      *  @return The destination place of the arc.
      *
-     *  @throws Exception If an error occurs while attempting to
+     *  @throws JellyTagException If an error occurs while attempting to
      *          retrieve the origin place.
      */
-    private Place getToPlace()
-        throws Exception
+    private Place getToPlace() throws JellyTagException
     {
-        return getCurrentNet().getPlace( getTo() );
+        try
+        {
+            return getCurrentNet().getPlace(getTo());
+        }
+        catch (NoSuchIdException e)
+        {
+            throw new JellyTagException(e);
+        } 
     }
 
     /** @see org.apache.commons.jelly.Tag
      */
     public void doTag(XMLOutput output)
-        throws Exception
+        throws JellyTagException
     {
         verifyAncestor( "outputs",
                         OutputsTag.class );
Index: src/java/main/com/werken/werkflow/jelly/OutputsTag.java
===================================================================
RCS file: 
/cvsroot/werkflow/werkflow/src/java/main/com/werken/werkflow/jelly/OutputsTag.java,v
retrieving revision 1.2
diff -u -r1.2 OutputsTag.java
--- src/java/main/com/werken/werkflow/jelly/OutputsTag.java     18 Nov 2002 22:54:40 
-0000      1.2
+++ src/java/main/com/werken/werkflow/jelly/OutputsTag.java     30 Jan 2003 04:41:53 
+-0000
@@ -46,6 +46,7 @@
  
  */
 
+import org.apache.commons.jelly.JellyTagException;
 import org.apache.commons.jelly.XMLOutput;
 
 /** Begin an <code>OutputArc</code> definition block.
@@ -78,7 +79,7 @@
     /** @see org.apache.commons.jelly.Tag
      */
     public void doTag(XMLOutput output)
-        throws Exception
+        throws JellyTagException
     {
         invokeBody( output );
     }
Index: src/java/main/com/werken/werkflow/jelly/PlaceTag.java
===================================================================
RCS file: 
/cvsroot/werkflow/werkflow/src/java/main/com/werken/werkflow/jelly/PlaceTag.java,v
retrieving revision 1.3
diff -u -r1.3 PlaceTag.java
--- src/java/main/com/werken/werkflow/jelly/PlaceTag.java       21 Nov 2002 07:53:24 
-0000      1.3
+++ src/java/main/com/werken/werkflow/jelly/PlaceTag.java       30 Jan 2003 04:41:53 
+-0000
@@ -46,9 +46,11 @@
  
  */
 
+import com.werken.petridish.DuplicateIdException;
 import com.werken.petridish.Net;
 import com.werken.petridish.Place;
 
+import org.apache.commons.jelly.JellyTagException;
 import org.apache.commons.jelly.XMLOutput;
 
 /** Add a <code>Place</code> to the process.
@@ -128,13 +130,20 @@
      *
      *  @return The type class.
      *
-     *  @throws Exception If an error occurs while attempting
+     *  @throws JellyTagException If an error occurs while attempting
      *          to retrieve the message type.
      */
     private Class getTypeClass()
-        throws Exception
+        throws JellyTagException
     {
-        return Class.forName( getType() );
+        try 
+        {
+                       return Class.forName( getType() );
+               } 
+        catch (ClassNotFoundException e) 
+        {
+            throw new JellyTagException( e );
+               }
     }
 
     /** Retrieve the <code>Place</code>.
@@ -149,7 +158,7 @@
     /** @see org.apache.commons.jelly.Tag
      */
     public void doTag(XMLOutput output)
-        throws Exception
+        throws JellyTagException
     {
         verifyStringAttribute( "id",
                                getId() );
@@ -161,8 +170,14 @@
 
         Net net = getCurrentNet();
 
-        this.place = net.addPlace( getId(),
-                                   type );
+        try 
+        {
+            this.place = net.addPlace(getId(), type);
+        }
+        catch (DuplicateIdException e) 
+        {
+            throw new JellyTagException(e);
+        }
 
 
         invokeBody( output );
Index: src/java/main/com/werken/werkflow/jelly/ProcessTag.java
===================================================================
RCS file: 
/cvsroot/werkflow/werkflow/src/java/main/com/werken/werkflow/jelly/ProcessTag.java,v
retrieving revision 1.4
diff -u -r1.4 ProcessTag.java
--- src/java/main/com/werken/werkflow/jelly/ProcessTag.java     21 Nov 2002 07:53:24 
-0000      1.4
+++ src/java/main/com/werken/werkflow/jelly/ProcessTag.java     30 Jan 2003 04:41:54 
+-0000
@@ -50,7 +50,9 @@
 
 import com.werken.petridish.Net;
 import com.werken.petridish.NetFactory;
+import com.werken.petridish.NoSuchIdException;
 
+import org.apache.commons.jelly.JellyTagException;
 import org.apache.commons.jelly.XMLOutput;
 import org.apache.commons.jelly.JellyException;
 
@@ -144,7 +146,7 @@
     /** @see org.apache.commons.jelly.Tag
      */
     public void doTag(XMLOutput output)
-        throws Exception
+        throws JellyTagException
     {
         verifyStringAttribute( "id",
                                getId() );
@@ -157,10 +159,19 @@
 
         if ( this.initiatorSpec == null )
         {
-            throw new JellyException( "no initiator" );
+            throw new JellyTagException( "no initiator" );
+        }
+
+
+        try 
+        {
+            this.def.setInitiator( this.initiatorSpec.getInitiator( this.net ) );
+        } 
+        catch (NoSuchIdException e) 
+        {
+            throw new JellyTagException( e );
         }
 
-        this.def.setInitiator( this.initiatorSpec.getInitiator( this.net ) );
 
         JellyProcessDefinitionRepository repo =
             (JellyProcessDefinitionRepository) getContext().getVariable( 
"werkflow.jelly.process.repo" );
Index: src/java/main/com/werken/werkflow/jelly/ProcessTagSupport.java
===================================================================
RCS file: 
/cvsroot/werkflow/werkflow/src/java/main/com/werken/werkflow/jelly/ProcessTagSupport.java,v
retrieving revision 1.5
diff -u -r1.5 ProcessTagSupport.java
--- src/java/main/com/werken/werkflow/jelly/ProcessTagSupport.java      21 Nov 2002 
07:53:24 -0000      1.5
+++ src/java/main/com/werken/werkflow/jelly/ProcessTagSupport.java      30 Jan 2003 
+04:41:54 -0000
@@ -53,7 +53,7 @@
 
 import org.apache.commons.jelly.Tag;
 import org.apache.commons.jelly.TagSupport;
-import org.apache.commons.jelly.JellyException;
+import org.apache.commons.jelly.JellyTagException;
 import org.apache.commons.jelly.MissingAttributeException;
 
 /** Process definition tag support.
@@ -84,16 +84,16 @@
      *
      *  @return The current process definition.
      *
-     *  @throws JellyException If no process definition currently in scope.
+     *  @throws JellyTagException If no process definition currently in scope.
      */
     ProcessDefinition getCurrentProcessDefinition()
-        throws JellyException
+        throws JellyTagException
     {
         ProcessTag tag = (ProcessTag) findAncestorWithClass( ProcessTag.class );
 
         if ( tag == null )
         {
-            throw new JellyException( "no current process" );
+            throw new JellyTagException( "no current process" );
         }
 
         return tag.getProcessDefinition();
@@ -103,16 +103,16 @@
      *
      *  @return The current net.
      *
-     *  @throws JellyException If no net currently in scope.
+     *  @throws JellyTagException If no net currently in scope.
      */
     Net getCurrentNet()
-        throws JellyException
+        throws JellyTagException
     {
         ProcessTag tag = (ProcessTag) findAncestorWithClass( ProcessTag.class );
 
         if ( tag == null )
         {
-            throw new JellyException( "no current process" );
+            throw new JellyTagException( "no current process" );
         }
 
         return tag.getNet();
@@ -122,16 +122,16 @@
      *
      *  @return The current transition.
      *
-     *  @throws JellyException If no transition currently in scope.
+     *  @throws JellyTagException If no transition currently in scope.
      */
     Transition getCurrentTransition()
-        throws JellyException
+        throws JellyTagException
     {
         TransitionTag tag = (TransitionTag) findAncestorWithClass( 
TransitionTag.class );
 
         if ( tag == null )
         {
-            throw new JellyException( "no current transition" );
+            throw new JellyTagException( "no current transition" );
         }
 
         return tag.getTransition();
@@ -178,17 +178,17 @@
      *  @param tagName The ancestor tag name.
      *  @param ancestorClass The ancestor tag class.
      *
-     *  @throws JellyException If ancestry is incorrect.
+     *  @throws JellyTagException If ancestry is incorrect.
      */
     void verifyAncestor(String tagName,
                         Class ancestorClass)
-        throws JellyException
+        throws JellyTagException
     {
         Tag tag = findAncestorWithClass( ancestorClass );
 
         if ( tag == null )
         {
-            throw new JellyException( "not within a " + tagName );
+            throw new JellyTagException( "not within a " + tagName );
         }
     }
 }
Index: src/java/main/com/werken/werkflow/jelly/ProduceTag.java
===================================================================
RCS file: 
/cvsroot/werkflow/werkflow/src/java/main/com/werken/werkflow/jelly/ProduceTag.java,v
retrieving revision 1.2
diff -u -r1.2 ProduceTag.java
--- src/java/main/com/werken/werkflow/jelly/ProduceTag.java     19 Nov 2002 05:06:14 
-0000      1.2
+++ src/java/main/com/werken/werkflow/jelly/ProduceTag.java     30 Jan 2003 04:41:54 
+-0000
@@ -46,9 +46,9 @@
  
  */
 
+import org.apache.commons.jelly.JellyTagException;
 import org.apache.commons.jelly.TagSupport;
 import org.apache.commons.jelly.XMLOutput;
-import org.apache.commons.jelly.JellyException;
 
 import java.util.List;
 
@@ -106,13 +106,13 @@
     /** @see org.apache.commons.jelly.Tag
      */
     public void doTag(XMLOutput output)
-        throws Exception
+        throws JellyTagException
     {
         List collector = (List) getContext().getVariable( "werkflow.collector" );
 
         if ( collector == null )
         {
-            throw new JellyException( "no collector" );
+            throw new JellyTagException( "no collector" );
         }
 
         collector.add( getObject() );
Index: src/java/main/com/werken/werkflow/jelly/SendTag.java
===================================================================
RCS file: 
/cvsroot/werkflow/werkflow/src/java/main/com/werken/werkflow/jelly/SendTag.java,v
retrieving revision 1.3
diff -u -r1.3 SendTag.java
--- src/java/main/com/werken/werkflow/jelly/SendTag.java        22 Nov 2002 03:06:23 
-0000      1.3
+++ src/java/main/com/werken/werkflow/jelly/SendTag.java        30 Jan 2003 04:41:54 
+-0000
@@ -51,6 +51,7 @@
 
 import com.werken.petridish.Transition;
 
+import org.apache.commons.jelly.JellyTagException;
 import org.apache.commons.jelly.XMLOutput;
 
 /** Send a message.
@@ -107,7 +108,7 @@
     /** @see org.apache.commons.jelly.Tag
      */
     public void doTag(XMLOutput output)
-        throws Exception
+        throws JellyTagException
     {
         verifyAncestor( "activity",
                         ActivityTag.class );
@@ -123,8 +124,15 @@
         
         WorkflowEngineImpl engine = (WorkflowEngineImpl) getContext().getVariable( 
"werkflow.engine" );
         
-        engine.sendMessage( instance,
-                            transition,
-                            msg );
+        try
+        {
+            engine.sendMessage( instance,
+                                transition,
+                                msg );
+        }
+        catch (Exception e)
+        {
+            throw new JellyTagException( e );
+        }
     }
 }
Index: src/java/main/com/werken/werkflow/jelly/TransitionTag.java
===================================================================
RCS file: 
/cvsroot/werkflow/werkflow/src/java/main/com/werken/werkflow/jelly/TransitionTag.java,v
retrieving revision 1.2
diff -u -r1.2 TransitionTag.java
--- src/java/main/com/werken/werkflow/jelly/TransitionTag.java  19 Nov 2002 05:06:14 
-0000      1.2
+++ src/java/main/com/werken/werkflow/jelly/TransitionTag.java  30 Jan 2003 04:41:54 
+-0000
@@ -46,9 +46,11 @@
  
  */
 
+import com.werken.petridish.DuplicateIdException;
 import com.werken.petridish.Net;
 import com.werken.petridish.Transition;
 
+import org.apache.commons.jelly.JellyTagException;
 import org.apache.commons.jelly.XMLOutput;
 
 /** Create a <code>Transition</code> in a <code>Net</code>.
@@ -115,14 +117,21 @@
     /** @see org.apache.commons.jelly.Tag
      */
     public void doTag(XMLOutput output)
-        throws Exception
+        throws JellyTagException
     {
         verifyStringAttribute( "id",
                                getId() );
 
         Net net = getCurrentNet();
 
-        this.transition = net.addTransition( getId() );
+        try
+        {
+            this.transition = net.addTransition( getId() );
+        }
+        catch (DuplicateIdException e)
+        {
+            throw new JellyTagException( e );
+        }
 
 
         invokeBody( output );

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to