You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by js...@apache.org on 2002/02/07 20:17:27 UTC

cvs commit: jakarta-commons-sandbox/betwixt/src/test/org/apache/commons/betwixt TestXMLBeanInfoDigester.java TestAll.java

jstrachan    02/02/07 11:17:27

  Modified:    betwixt  build.xml
               betwixt/src/java/org/apache/commons/betwixt
                        ElementDescriptor.java NodeDescriptor.java
               betwixt/src/test/org/apache/commons/betwixt TestAll.java
  Added:       betwixt/src/java/org/apache/commons/betwixt/digester
                        ElementRule.java InfoRule.java
                        XMLBeanInfoDigester.java package.html
               betwixt/src/test/org/apache/commons/betwixt
                        TestXMLBeanInfoDigester.java
  Log:
  Adding early version of the XMLBeanInfo Digester to allow XMLBeanInfo definitions to be customized via an XML config file. This new Digester is still not working properly, some work is still required on the ElementDescriptor tree it creates but it is fairly close.
  
  Revision  Changes    Path
  1.10      +16 -2     jakarta-commons-sandbox/betwixt/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/betwixt/build.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- build.xml	31 Jan 2002 21:24:42 -0000	1.9
  +++ build.xml	7 Feb 2002 19:17:26 -0000	1.10
  @@ -3,7 +3,7 @@
   
   <!--
           "Digester" component of the Jakarta Commons Subproject
  -        $Id: build.xml,v 1.9 2002/01/31 21:24:42 jstrachan Exp $
  +        $Id: build.xml,v 1.10 2002/02/07 19:17:26 jstrachan Exp $
   -->
   
   
  @@ -252,9 +252,23 @@
   
   
      <target name="test.reader" depends="compile.tests" 
  -      description="Runs sample bean reader">
  +      description="Runs test of bean reader">
       <java classname="org.apache.commons.betwixt.TestBeanReader" fork="yes">
         <classpath refid="test.classpath"/>
  +        <!-- this all seems a bit much to get some logging? -->
  +      <sysproperty key="org.apache.commons.logging.log" value="org.apache.commons.logging.SimpleLog"/>
  +      <sysproperty key="org.apache.commons.logging.simplelog.defaultlog" value="debug"/>
  +      <sysproperty key="org.apache.commons.logging.simplelog.log.org.apache.commons.digester.Digester" value="warn"/>
  +      <sysproperty key="org.apache.commons.logging.simplelog.log.org.apache.commons.digester.Digester.sax" value="warn"/>
  +      <sysproperty key="org.apache.commons.logging.simplelog.defaultlog" value="debug"/>
  +    </java>
  +   </target>
  +
  +   <target name="test.digester" depends="compile.tests" 
  +      description="Runs the test of the XMLBeanInfo digester">
  +    <java classname="org.apache.commons.betwixt.TestXMLBeanInfoDigester" fork="yes">
  +      <classpath refid="test.classpath"/>
  +        <!-- this all seems a bit much to get some logging? -->
         <sysproperty key="org.apache.commons.logging.log" value="org.apache.commons.logging.SimpleLog"/>
         <sysproperty key="org.apache.commons.logging.simplelog.defaultlog" value="debug"/>
         <sysproperty key="org.apache.commons.logging.simplelog.log.org.apache.commons.digester.Digester" value="warn"/>
  
  
  
  1.8       +20 -5     jakarta-commons-sandbox/betwixt/src/java/org/apache/commons/betwixt/ElementDescriptor.java
  
  Index: ElementDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/betwixt/src/java/org/apache/commons/betwixt/ElementDescriptor.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ElementDescriptor.java	31 Jan 2002 21:24:42 -0000	1.7
  +++ ElementDescriptor.java	7 Feb 2002 19:17:26 -0000	1.8
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons-sandbox/betwixt/src/java/org/apache/commons/betwixt/ElementDescriptor.java,v 1.7 2002/01/31 21:24:42 jstrachan Exp $
  - * $Revision: 1.7 $
  - * $Date: 2002/01/31 21:24:42 $
  + * $Header: /home/cvs/jakarta-commons-sandbox/betwixt/src/java/org/apache/commons/betwixt/ElementDescriptor.java,v 1.8 2002/02/07 19:17:26 jstrachan Exp $
  + * $Revision: 1.8 $
  + * $Date: 2002/02/07 19:17:26 $
    *
    * ====================================================================
    *
  @@ -57,7 +57,7 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    * 
  - * $Id: ElementDescriptor.java,v 1.7 2002/01/31 21:24:42 jstrachan Exp $
  + * $Id: ElementDescriptor.java,v 1.8 2002/02/07 19:17:26 jstrachan Exp $
    */
   package org.apache.commons.betwixt;
   
  @@ -70,7 +70,7 @@
     * and <code>ElementDescriptor</code>'s for it's child elements.
     *
     * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
  -  * @version $Revision: 1.7 $
  +  * @version $Revision: 1.8 $
     */
   public class ElementDescriptor extends NodeDescriptor {
   
  @@ -126,6 +126,21 @@
       /** Set <code>AttributesDescriptors</code> for this element */
       public void setAttributeDescriptors(AttributeDescriptor[] attributeDescriptors) {
           this.attributeDescriptors = attributeDescriptors;
  +    }
  +    
  +    public void addElementDescriptor(ElementDescriptor descriptor) {
  +        // XXX: not a very efficient way of doing it. Maybe keep an internal List implementation
  +        
  +        if ( elementDescriptors == null ) {
  +            elementDescriptors = new ElementDescriptor[] { descriptor };
  +        }
  +        else {
  +            int size = elementDescriptors.length;
  +            ElementDescriptor[] newValue = new ElementDescriptor[ size + 1 ];
  +            System.arraycopy( elementDescriptors, 0, newValue, 0, size );
  +            newValue[size] = descriptor;
  +            elementDescriptors = newValue;
  +        }
       }
       
       /** Returns the child element descriptors for this element */
  
  
  
  1.6       +18 -5     jakarta-commons-sandbox/betwixt/src/java/org/apache/commons/betwixt/NodeDescriptor.java
  
  Index: NodeDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/betwixt/src/java/org/apache/commons/betwixt/NodeDescriptor.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- NodeDescriptor.java	31 Jan 2002 19:56:02 -0000	1.5
  +++ NodeDescriptor.java	7 Feb 2002 19:17:26 -0000	1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons-sandbox/betwixt/src/java/org/apache/commons/betwixt/NodeDescriptor.java,v 1.5 2002/01/31 19:56:02 jstrachan Exp $
  - * $Revision: 1.5 $
  - * $Date: 2002/01/31 19:56:02 $
  + * $Header: /home/cvs/jakarta-commons-sandbox/betwixt/src/java/org/apache/commons/betwixt/NodeDescriptor.java,v 1.6 2002/02/07 19:17:26 jstrachan Exp $
  + * $Revision: 1.6 $
  + * $Date: 2002/02/07 19:17:26 $
    *
    * ====================================================================
    *
  @@ -57,7 +57,7 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    * 
  - * $Id: NodeDescriptor.java,v 1.5 2002/01/31 19:56:02 jstrachan Exp $
  + * $Id: NodeDescriptor.java,v 1.6 2002/02/07 19:17:26 jstrachan Exp $
    */
   package org.apache.commons.betwixt;
   
  @@ -70,7 +70,7 @@
     * or they can have a local name, qualified name and a namespace uri.</p>
     *
     * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
  -  * @version $Revision: 1.5 $
  +  * @version $Revision: 1.6 $
     */
   public class NodeDescriptor {
   
  @@ -83,6 +83,8 @@
       private Expression textExpression;
       /** the updater used to update the current bean from the text value of this node */
       private Updater updater;
  +    /** The property expression to which this node refers to, or null if it is just a constant */
  +    private String propertyName;
       /** the property type associated with this node, if any */
       private Class propertyType;
       
  @@ -177,5 +179,16 @@
       /** Sets the property type associated with this node, if any */
       public void setPropertyType(Class propertyType) {
           this.propertyType = propertyType;
  +    }
  +
  +    
  +    /** @return the property expression to which this node refers to, or null if it is just a constant */
  +    public String getPropertyName() {
  +        return propertyName;
  +    }
  +    
  +    /** Sets the property expression to which this node refers to, or null if it is just a constant */
  +    public void setPropertyName(String propertyName) {
  +        this.propertyName = propertyName;
       }
   }
  
  
  
  1.1                  jakarta-commons-sandbox/betwixt/src/java/org/apache/commons/betwixt/digester/ElementRule.java
  
  Index: ElementRule.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-commons-sandbox/betwixt/src/java/org/apache/commons/betwixt/digester/ElementRule.java,v 1.1 2002/02/07 19:17:27 jstrachan Exp $
   * $Revision: 1.1 $
   * $Date: 2002/02/07 19:17:27 $
   *
   * ====================================================================
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Commons", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   * 
   * $Id: ElementRule.java,v 1.1 2002/02/07 19:17:27 jstrachan Exp $
   */
  package org.apache.commons.betwixt.digester;
  
  import java.beans.BeanInfo;
  import java.beans.Introspector;
  import java.beans.PropertyDescriptor;
  import java.lang.reflect.Method;
  
  import org.apache.commons.betwixt.AttributeDescriptor;
  import org.apache.commons.betwixt.ElementDescriptor;
  import org.apache.commons.betwixt.XMLBeanInfo;
  import org.apache.commons.betwixt.XMLIntrospector;
  import org.apache.commons.betwixt.expression.Context;
  import org.apache.commons.betwixt.expression.Updater;
  import org.apache.commons.betwixt.expression.MethodExpression;
  import org.apache.commons.betwixt.expression.MethodUpdater;
  
  import org.apache.commons.digester.Rule;
  import org.apache.commons.digester.Digester;
  
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogSource;
  
  import org.xml.sax.Attributes;
  import org.xml.sax.SAXException;
  
  /** <p><code>ElementRule</code> the digester Rule for parsing the &lt;element&gt; elements.</p>
    *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
    * @version $Revision: 1.1 $
    */
  public class ElementRule extends Rule {
  
      /** Logger */
      private static final Log log = LogSource.getInstance( ElementRule.class );
      
      private ClassLoader classLoader;
      
      public ElementRule(Digester digester) {
          super(digester);
          this.classLoader = getClass().getClassLoader();
      }
      
      // Rule interface
      //-------------------------------------------------------------------------    
      
      /**
       * Process the beginning of this element.
       *
       * @param attributes The attribute list of this element
       */
      public void begin(Attributes attributes) throws Exception {
          //log.debug( "Called with descriptor: " + descriptor + " propertyType: " + descriptor.getPropertyType() );
          
          ElementDescriptor descriptor = new ElementDescriptor();
          
          descriptor.setQualifiedName( attributes.getValue( "name" ) );
          descriptor.setLocalName( attributes.getValue( "name" ) );
          String uri = attributes.getValue( "uri" );
          if ( uri != null ) {
              descriptor.setURI( uri );        
          }
          descriptor.setPropertyName( attributes.getValue( "property" ) );
          descriptor.setPropertyType( loadClass( attributes.getValue( "type" ) ) );
          
          configureDescriptor(descriptor);
          
          Object top = digester.peek();
          if ( top instanceof XMLBeanInfo ) {
              XMLBeanInfo beanInfo = (XMLBeanInfo) top;
              beanInfo.setElementDescriptor( descriptor );
          }
          else if ( top instanceof ElementDescriptor ) {
              ElementDescriptor parent = (ElementDescriptor) top;
              parent.addElementDescriptor( descriptor );
          }
          else {
              throw new SAXException( "Invalid use of <element>. It should be nested inside <info> or other <element> nodes" );
          }            
          digester.push(descriptor);        
      }
  
  
      /**
       * Process the end of this element.
       */
      public void end() throws Exception {
          Object top = digester.pop();
      }
  
      
      // Implementation methods
      //-------------------------------------------------------------------------    
      protected Class loadClass( String name ) {
          // XXX: should use a ClassLoader to handle complex class loading situations
          if ( name != null ) {
              try {
                  return classLoader.loadClass(name);
              }
              catch (Exception e) {
              }
          }
          return null;            
      }
      
      /** Set the Expression and Updater from a bean property name */
      protected void configureDescriptor(ElementDescriptor elementDescriptor) {
          Class beanClass = elementDescriptor.getPropertyType();
          if ( beanClass != null ) {
              String name = elementDescriptor.getPropertyName();
              if ( name != null ) {
                  try {
                      BeanInfo beanInfo = Introspector.getBeanInfo( beanClass );
                      PropertyDescriptor[] descriptors = beanInfo.getPropertyDescriptors();
                      if ( descriptors != null ) {
                          for ( int i = 0, size = descriptors.length; i < size; i++ ) {
                              PropertyDescriptor descriptor = descriptors[i];
                              if ( name.equals( descriptor.getName() ) ) {
                                  Method readMethod = descriptor.getReadMethod();
                                  Method writeMethod = descriptor.getWriteMethod();
                                  if ( readMethod != null ) {
                                      elementDescriptor.setTextExpression( new MethodExpression( readMethod ) );
                                  }
                                  if ( writeMethod != null ) {
                                      elementDescriptor.setTextExpression( new MethodExpression( writeMethod ) );
                                  }
                                  break;
                              }
                          }
                      }
                  }
                  catch (Exception e) {
                      log.info( "Caught introspection exception", e );
                  }
              }
          }
      }
  }
  
  
  
  1.1                  jakarta-commons-sandbox/betwixt/src/java/org/apache/commons/betwixt/digester/InfoRule.java
  
  Index: InfoRule.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-commons-sandbox/betwixt/src/java/org/apache/commons/betwixt/digester/InfoRule.java,v 1.1 2002/02/07 19:17:27 jstrachan Exp $
   * $Revision: 1.1 $
   * $Date: 2002/02/07 19:17:27 $
   *
   * ====================================================================
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Commons", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   * 
   * $Id: InfoRule.java,v 1.1 2002/02/07 19:17:27 jstrachan Exp $
   */
  package org.apache.commons.betwixt.digester;
  
  import org.apache.commons.betwixt.AttributeDescriptor;
  import org.apache.commons.betwixt.ElementDescriptor;
  import org.apache.commons.betwixt.XMLBeanInfo;
  import org.apache.commons.betwixt.XMLIntrospector;
  import org.apache.commons.betwixt.expression.Context;
  import org.apache.commons.betwixt.expression.Updater;
  
  import org.apache.commons.digester.Rule;
  import org.apache.commons.digester.Digester;
  
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogSource;
  
  import org.xml.sax.Attributes;
  
  /** <p><code>InfoRule</code> the digester Rule for parsing the info element.</p>
    *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
    * @version $Revision: 1.1 $
    */
  public class InfoRule extends Rule {
  
      /** Logger */
      private static final Log log = LogSource.getInstance( InfoRule.class );
      
      private XMLBeanInfo xmlBeanInfo;
      
      
      public InfoRule(Digester digester) {
          super(digester);
      }
      
      // Rule interface
      //-------------------------------------------------------------------------    
      
      /**
       * Process the beginning of this element.
       *
       * @param attributes The attribute list of this element
       */
      public void begin(Attributes attributes) throws Exception {
          xmlBeanInfo = new XMLBeanInfo();
          
          getDigester().push(xmlBeanInfo);
          
      }
  
  
      /**
       * Process the end of this element.
       */
      public void end() throws Exception {
          Object top = getDigester().pop();
      }
  
      // Implementation methods
      //-------------------------------------------------------------------------    
      
      
  }
  
  
  
  1.1                  jakarta-commons-sandbox/betwixt/src/java/org/apache/commons/betwixt/digester/XMLBeanInfoDigester.java
  
  Index: XMLBeanInfoDigester.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-commons-sandbox/betwixt/src/java/org/apache/commons/betwixt/digester/XMLBeanInfoDigester.java,v 1.1 2002/02/07 19:17:27 jstrachan Exp $
   * $Revision: 1.1 $
   * $Date: 2002/02/07 19:17:27 $
   *
   * ====================================================================
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Commons", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   * 
   * $Id: XMLBeanInfoDigester.java,v 1.1 2002/02/07 19:17:27 jstrachan Exp $
   */
  package org.apache.commons.betwixt.digester;
  
  import javax.xml.parsers.SAXParser;
  
  import org.apache.commons.digester.Rule;
  import org.apache.commons.digester.Digester;
  
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogSource;
  
  import org.xml.sax.XMLReader;
  
  /** <p><code>XMLBeanInfoDigester</code> is a digester of XML files
    * containing XMLBeanInfo definitions for a JavaBean.</p>
    *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
    * @version $Revision: 1.1 $
    */
  public class XMLBeanInfoDigester extends Digester {
  
      /** Logger */
      private static final Log log = LogSource.getInstance( XMLBeanInfoDigester.class );
      
      /**
       * Construct a new XMLBeanInfoDigester with default properties.
       */
      public XMLBeanInfoDigester() {
      }
  
      /**
       * Construct a new XMLBeanInfoDigester, allowing a SAXParser to be passed in.  This
       * allows XMLBeanInfoDigester to be used in environments which are unfriendly to
       * JAXP1.1 (such as WebLogic 6.0).  Thanks for the request to change go to
       * James House (james@interobjective.com).  This may help in places where
       * you are able to load JAXP 1.1 classes yourself.
       */
      public XMLBeanInfoDigester(SAXParser parser) {
          super(parser);
      }
  
      /**
       * Construct a new XMLBeanInfoDigester, allowing an XMLReader to be passed in.  This
       * allows XMLBeanInfoDigester to be used in environments which are unfriendly to
       * JAXP1.1 (such as WebLogic 6.0).  Note that if you use this option you
       * have to configure namespace and validation support yourself, as these
       * properties only affect the SAXParser and emtpy constructor.
       */
      public XMLBeanInfoDigester(XMLReader reader) {
          super(reader);
      }
      
      // Implementation methods
      //-------------------------------------------------------------------------        
      protected void configure() {
          if (! configured) {
              configured = true;
           
              // add the various rules
              
              addRule( "info", new InfoRule( this ) );
              addRule( "*/element", new ElementRule( this ) );
          }
      }
      
  }
  
  
  
  1.1                  jakarta-commons-sandbox/betwixt/src/java/org/apache/commons/betwixt/digester/package.html
  
  Index: package.html
  ===================================================================
  <html>
  <head>
  </head>
  <body>
  
    <p> This package contains the Digester and associated rules and helper classes
  	for parsing the XMLBeanInfo metadata from an XML file format.</p>
  
  </body>
  </html>
  
  
  
  1.5       +6 -5      jakarta-commons-sandbox/betwixt/src/test/org/apache/commons/betwixt/TestAll.java
  
  Index: TestAll.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/betwixt/src/test/org/apache/commons/betwixt/TestAll.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestAll.java	31 Jan 2002 19:56:03 -0000	1.4
  +++ TestAll.java	7 Feb 2002 19:17:27 -0000	1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons-sandbox/betwixt/src/test/org/apache/commons/betwixt/TestAll.java,v 1.4 2002/01/31 19:56:03 jstrachan Exp $
  - * $Revision: 1.4 $
  - * $Date: 2002/01/31 19:56:03 $
  + * $Header: /home/cvs/jakarta-commons-sandbox/betwixt/src/test/org/apache/commons/betwixt/TestAll.java,v 1.5 2002/02/07 19:17:27 jstrachan Exp $
  + * $Revision: 1.5 $
  + * $Date: 2002/02/07 19:17:27 $
    *
    * ====================================================================
    *
  @@ -57,7 +57,7 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    * 
  - * $Id: TestAll.java,v 1.4 2002/01/31 19:56:03 jstrachan Exp $
  + * $Id: TestAll.java,v 1.5 2002/02/07 19:17:27 jstrachan Exp $
    */
   package org.apache.commons.betwixt;
   
  @@ -71,7 +71,7 @@
   /** Entry point for all JUnit tests.
     *
     * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
  -  * @version $Revision: 1.4 $
  +  * @version $Revision: 1.5 $
    */
   public class TestAll extends TestCase {
       
  @@ -84,6 +84,7 @@
           suite.addTest(TestBeanWriter.suite());
           suite.addTest(TestXMLIntrospector.suite());
           suite.addTest(TestEvaluation.suite());
  +        suite.addTest(TestXMLBeanInfoDigester.suite());
           return suite;
       }
       
  
  
  
  1.1                  jakarta-commons-sandbox/betwixt/src/test/org/apache/commons/betwixt/TestXMLBeanInfoDigester.java
  
  Index: TestXMLBeanInfoDigester.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-commons-sandbox/betwixt/src/test/org/apache/commons/betwixt/TestXMLBeanInfoDigester.java,v 1.1 2002/02/07 19:17:27 jstrachan Exp $
   * $Revision: 1.1 $
   * $Date: 2002/02/07 19:17:27 $
   *
   * ====================================================================
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Commons", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   * 
   * $Id: TestXMLBeanInfoDigester.java,v 1.1 2002/02/07 19:17:27 jstrachan Exp $
   */
  package org.apache.commons.betwixt;
  
  import java.io.InputStream;
  
  import junit.framework.Test;
  import junit.framework.TestCase;
  import junit.framework.TestSuite;
  import junit.textui.TestRunner;
  
  import org.apache.commons.betwixt.digester.XMLBeanInfoDigester;
  import org.apache.commons.digester.rss.Channel;
  
  /** Test harness for the Digester of XMLBeanInfo
    *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
    * @version $Revision: 1.1 $
    */
  public class TestXMLBeanInfoDigester extends AbstractTestCase {
      
      public static void main( String[] args ) {
          TestRunner.run( suite() );
      }
      
      public static Test suite() {
          return new TestSuite(TestXMLBeanInfoDigester.class);
      }
          
      public TestXMLBeanInfoDigester(String testName) {
          super(testName);
      }
      
      public void testDigester() throws Exception {
          XMLBeanInfoDigester digester = new XMLBeanInfoDigester();
  
          InputStream in = Channel.class.getResourceAsStream( "Channel.betwixt.xml" );
          
          XMLBeanInfo info = (XMLBeanInfo) digester.parse( in );
          
          assertTrue( "Found XMLBeanInfo", info != null );
          
          ElementDescriptor descriptor = info.getElementDescriptor();
          
          assertTrue( "Found root element descriptor", descriptor != null );
          assertEquals( "Element name correct", "channel", descriptor.getLocalName() );
          
          ElementDescriptor[] elements = descriptor.getElementDescriptors();
          
          assertTrue( "Found elements", elements != null && elements.length > 0 );
          
          descriptor = elements[0];
          assertEquals( "Element name correct", "title", descriptor.getLocalName() );
          assertEquals( "Element property correct", "title", descriptor.getPropertyName() );
      }
  }
  
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Workflow

Posted by bob mcwhirter <bo...@werken.com>.
> WFMC and friends are more appropriately used at what the Commons Workflow
> proposal calls the "Process" concept (which hasn't been fleshed out at all
> yet) than the "Activity" concept (which is focused on the lower level
> things).

Might want to check out the Savvion stuff.  Yes, it's commercial,
but we certainly have a history of 'borrowing' ideas from commercial
and other sources.  

They have the concept of the asynch process, with a synch/interactive
activity UI.  All nicely coupled.

	-bob


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Calendar / Scheduler / Workflow

Posted by Kelvin Tan <ke...@relevanz.com>.
FWIW,

Fulcrum has a scheduler service which is an implementation of Unix's cron.

Regards,
Kelvin
----- Original Message -----
From: "James House" <ja...@interobjective.com>
To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
Sent: Friday, February 15, 2002 11:11 AM
Subject: Re: Calendar / Scheduler / Workflow


>
> I've got a Job Scheduler project under way at Source Forge - I'm not aware
> of one here at Commons.
>
> The project began last spring, and actually was "completed" in the sense
> that there was a release.  In fact there are a number of people using
> it.  However, the design was really shoddy, and I removed all of it, and
> restarted the project from "the ground up" this fall/winter. It is once
> again approaching a real release  - within 2 to 4 weeks it should be there
> ... you know how development goes!
>
> So far it's got a really sucky web page, and a bunch of code checked
> in.  The code is pretty full of JavaDOC, so anyone should be able to poke
> around the code and figure out the general ideas.
>
> If anyone's interested, please feel free to join the project - or download
> and use it in a few weeks when it's ready.
>
> I'd be happy to see the project end up over in Jakarta land, which I know
> is based on the project gaining a broad user base and good support record.
>
> You can find it here: http://quartz.sourceforge.net  -- over the next few
> days you should see a lot more of it get "fleshed out" as I get a few more
> things off the drawing board and into real classes.
>
> James
>
> At 2/14/2002 05:17 AM -0800, you wrote:
> >Hi,
> >
> >I noticed requests on this list in reference to
> >Workflow, Job Scheduler and Calendar capabilities.  I
> >believe that Worklfow and Job Scheduler are part of
> >commons.  Is anyone addressing the Calendar.
> >
> >It appears to me that there is commonality betweeen
> >these three components.  For calendar there is a need
> >to specify events that occur at some time.  These
> >events could be one time, or recurring.  Some action
> >takes place (such as notifying the user) at the time
> >of the event.  The Job Scheduler needs similar
> >functionality - the action would be to run a job.  The
> >calendar also has "To Do" lists (or worklists in
> >workflow).
> >
> >Is someone looking at these pieces from a holostic
> >view so that the various efforts can leverage the work
> >being done in other services ?
> >
> >Thanks.
> >
> >- viraf
> >
> >__________________________________________________
> >Do You Yahoo!?
> >Send FREE Valentine eCards with Yahoo! Greetings!
> >http://greetings.yahoo.com
> >
> >--
> >To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> >For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Calendar / Scheduler / Workflow

Posted by James House <ja...@interobjective.com>.
I've got a Job Scheduler project under way at Source Forge - I'm not aware 
of one here at Commons.

The project began last spring, and actually was "completed" in the sense 
that there was a release.  In fact there are a number of people using 
it.  However, the design was really shoddy, and I removed all of it, and 
restarted the project from "the ground up" this fall/winter. It is once 
again approaching a real release  - within 2 to 4 weeks it should be there 
... you know how development goes!

So far it's got a really sucky web page, and a bunch of code checked 
in.  The code is pretty full of JavaDOC, so anyone should be able to poke 
around the code and figure out the general ideas.

If anyone's interested, please feel free to join the project - or download 
and use it in a few weeks when it's ready.

I'd be happy to see the project end up over in Jakarta land, which I know 
is based on the project gaining a broad user base and good support record.

You can find it here: http://quartz.sourceforge.net  -- over the next few 
days you should see a lot more of it get "fleshed out" as I get a few more 
things off the drawing board and into real classes.

James

At 2/14/2002 05:17 AM -0800, you wrote:
>Hi,
>
>I noticed requests on this list in reference to
>Workflow, Job Scheduler and Calendar capabilities.  I
>believe that Worklfow and Job Scheduler are part of
>commons.  Is anyone addressing the Calendar.
>
>It appears to me that there is commonality betweeen
>these three components.  For calendar there is a need
>to specify events that occur at some time.  These
>events could be one time, or recurring.  Some action
>takes place (such as notifying the user) at the time
>of the event.  The Job Scheduler needs similar
>functionality - the action would be to run a job.  The
>calendar also has "To Do" lists (or worklists in
>workflow).
>
>Is someone looking at these pieces from a holostic
>view so that the various efforts can leverage the work
>being done in other services ?
>
>Thanks.
>
>- viraf
>
>__________________________________________________
>Do You Yahoo!?
>Send FREE Valentine eCards with Yahoo! Greetings!
>http://greetings.yahoo.com
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Calendar / Scheduler / Workflow

Posted by Incze Lajos <in...@mail.matav.hu>.
On Thu, Feb 14, 2002 at 05:17:22AM -0800, Viraf Bankwalla wrote:
> Hi,
> 
> I noticed requests on this list in reference to
> Workflow, Job Scheduler and Calendar capabilities.  I
> believe that Worklfow and Job Scheduler are part of
> commons.  Is anyone addressing the Calendar.

Didn't dig into it yet, but I see a "periodicity" project
in the sandbox that seemingly addresses what you are after.

incze

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Calendar / Scheduler / Workflow

Posted by James Strachan <ja...@yahoo.co.uk>.
Hey Jeff

Minor point - you might wanna remove the xerces.jar from periodicity CVS -
most commons projects use the build.properties[.sample] approach to locating
dependent jars. I found using one of the existing build.xml files helped -
like the build from commons-digester in commons proper.

James
----- Original Message -----
From: "Jeff Prickett" <pr...@shpimp.com>
To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
Sent: Thursday, February 07, 2002 9:35 PM
Subject: Re: Calendar / Scheduler / Workflow


> Viraf Bankwalla wrote:
> >
> > Hi,
> >
> > I noticed requests on this list in reference to
> > Workflow, Job Scheduler and Calendar capabilities.  I
> > believe that Worklfow and Job Scheduler are part of
> > commons.  Is anyone addressing the Calendar.
> >
> > It appears to me that there is commonality betweeen
> > these three components.  For calendar there is a need
> > to specify events that occur at some time.  These
> > events could be one time, or recurring.  Some action
> > takes place (such as notifying the user) at the time
> > of the event.  The Job Scheduler needs similar
> > functionality - the action would be to run a job.  The
> > calendar also has "To Do" lists (or worklists in
> > workflow).
> >
>
>
> Calendar would be me. There is a new commit as of yesterday with a first
> cut of an iCalendar implementation based on an earlier code base which
> was distributed with Jetspeed but not completed.
>
> You can check out the new codebase by checking out
> jakarta-commons-sandbox/periodicity
>
> > Is someone looking at these pieces from a holostic
> > view so that the various efforts can leverage the work
> > being done in other services ?
> >
>
> No work has yet been done to see what type of integration could be done
> with Workflow, Avalon, James, Turbine, or Velocity. If you would like to
> volunteer it would be very appreciated. Soon probably within a week I
> will be posting an "official" to do list along with a tentative release
> plan.
>
> The first order of business will probably be to get Periodicity working
> with Torque generated peers. From there we will probably concentrate on
> user access issues and integrating users, groups, and permissions.
>
>
> > Thanks.
> >
>
> thank you for your interest in Calendaring
>
> Jeff Prickett
>
> > - viraf
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Send FREE Valentine eCards with Yahoo! Greetings!
> > http://greetings.yahoo.com
> >
> > --
> > To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> > For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Calendar / Scheduler / Workflow

Posted by Jeff Prickett <pr...@shpimp.com>.
Viraf Bankwalla wrote:
> 
> Hi,
> 
> I noticed requests on this list in reference to
> Workflow, Job Scheduler and Calendar capabilities.  I
> believe that Worklfow and Job Scheduler are part of
> commons.  Is anyone addressing the Calendar.
> 
> It appears to me that there is commonality betweeen
> these three components.  For calendar there is a need
> to specify events that occur at some time.  These
> events could be one time, or recurring.  Some action
> takes place (such as notifying the user) at the time
> of the event.  The Job Scheduler needs similar
> functionality - the action would be to run a job.  The
> calendar also has "To Do" lists (or worklists in
> workflow).
> 


Calendar would be me. There is a new commit as of yesterday with a first
cut of an iCalendar implementation based on an earlier code base which
was distributed with Jetspeed but not completed.

You can check out the new codebase by checking out
jakarta-commons-sandbox/periodicity

> Is someone looking at these pieces from a holostic
> view so that the various efforts can leverage the work
> being done in other services ?
>

No work has yet been done to see what type of integration could be done
with Workflow, Avalon, James, Turbine, or Velocity. If you would like to
volunteer it would be very appreciated. Soon probably within a week I
will be posting an "official" to do list along with a tentative release
plan.

The first order of business will probably be to get Periodicity working
with Torque generated peers. From there we will probably concentrate on
user access issues and integrating users, groups, and permissions.

 
> Thanks.
> 

thank you for your interest in Calendaring

Jeff Prickett

> - viraf
> 
> __________________________________________________
> Do You Yahoo!?
> Send FREE Valentine eCards with Yahoo! Greetings!
> http://greetings.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Calendar / Scheduler / Workflow

Posted by Viraf Bankwalla <vi...@yahoo.com>.
Hi,

I noticed requests on this list in reference to
Workflow, Job Scheduler and Calendar capabilities.  I
believe that Worklfow and Job Scheduler are part of
commons.  Is anyone addressing the Calendar.

It appears to me that there is commonality betweeen
these three components.  For calendar there is a need
to specify events that occur at some time.  These
events could be one time, or recurring.  Some action
takes place (such as notifying the user) at the time
of the event.  The Job Scheduler needs similar
functionality - the action would be to run a job.  The
calendar also has "To Do" lists (or worklists in
workflow).  

Is someone looking at these pieces from a holostic
view so that the various efforts can leverage the work
being done in other services ?

Thanks.

- viraf

__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Workflow

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Thu, 7 Feb 2002, Viraf Bankwalla wrote:

> Date: Thu, 7 Feb 2002 15:31:38 -0800 (PST)
> From: Viraf Bankwalla <vi...@yahoo.com>
> Reply-To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> Subject: Re: Workflow
>
> Hi,
>
> I am still not clear on the distinction being made
> between the Process and Workflow engines.

I'm actually distinguishing between the
org.apache.commons.workflow.Process interface (which doesn't exist yet)
and the org.apache.commons.workflow.Activity interface (which does, and
has a couple of different implementations available.

>  I was also
> wondering you are referring to
> jakarta-commons-sandbox\workflow\PROPOSAL.html when
> you refer to Proposal (as I did not see a reference to
> process).  If not, could you please refer me to the
> correct Workflow and Process proposals.
>

A more in depth background discussion is available at:

  http://jakarta.apache.org/struts/proposal-workflow.html

because being able to script a series of Struts Actions was one of my
primary motivations.

> Based on my understanding of WfMC, a Workflow is made
> up of Activities.  An activity may be "manual" or
> "automatic".  Manual activities are synchronous - i.e.
> they involve users.  Both should be part of a
> workflow.
>
> So in a sense a WorkFlow definition (XML) is the
> script that ties the processes.  In addition, there is
> noting to prevent an Activity to be a script itself.
>
> I am interested in what you call Wizards and how you
> see them working.
>

If you download the source of the Workflow package, you can use the
"compile.wizard" and "deploy.wizard" targets to create a very simple demo
of this approach, in a way that only relies on servlet and JSP APIs (it is
not specific to Struts).

This demo was written before the introduction of conditional steps, so it
uses "goto" for flow control -- but you can get a feel for where I've been
thinking from this.

> Thanks.
>
> - viraf
>

Craig


>
>
>
> --- "Craig R. McClanahan" <cr...@apache.org> wrote:
> >
> >
> > On Thu, 7 Feb 2002, Viraf Bankwalla wrote:
> >
> > > Date: Thu, 7 Feb 2002 14:37:36 -0800 (PST)
> > > From: Viraf Bankwalla <vi...@yahoo.com>
> > > Reply-To: Jakarta Commons Developers List
> > <co...@jakarta.apache.org>
> > > To: Jakarta Commons Developers List
> > <co...@jakarta.apache.org>
> > > Subject: Workflow
> > >
> > > Hi,
> > >
> > > I noticed that there was a workflow component in
> > the
> > > commons sandbox.  I have read the proposal, and
> > was
> > > inquiring to see if there were more details.
> > >
> > > Are we leveraging any existing work for this ?
> > Are we
> > > basing it on any standards such as the WFMC ?
> > >
> >
> > Hello Viraf,
> >
> > I looked at WFMC and a couple of the other "high
> > level" standards for this
> > sort of thing before designing the Workflow
> > component.  They didn't really
> > address the sort of "low level" things that I was
> > interested in scripting,
> > which tend to be synchronous, short duration, and
> > executed by a single
> > individual.  In particular, I wanted to be able to
> > script things like a
> > "wizard" dialog in web applications, where you had
> > to interact with the
> > user across multiple HTTP requests, which required
> > the ability to suspend
> > and resume execution of the script.
> >
> > WFMC and friends are more appropriately used at what
> > the Commons Workflow
> > proposal calls the "Process" concept (which hasn't
> > been fleshed out at all
> > yet) than the "Activity" concept (which is focused
> > on the lower level
> > things).
> >
> > > Thanks.
> > >
> > > - viraf
> >
> > Craig
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Send FREE Valentine eCards with Yahoo! Greetings!
> http://greetings.yahoo.com
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Workflow

Posted by Eric Dobbs <er...@dobbse.net>.
On Thursday, February 7, 2002, at 04:31  PM, Viraf Bankwalla wrote:

> I am still not clear on the distinction being made
> between the Process and Workflow engines.  I was also
> wondering you are referring to
> jakarta-commons-sandbox\workflow\PROPOSAL.html when
> you refer to Proposal (as I did not see a reference to
> process).

The Javadocs have good descriptions and it's in there
where you'll find mention of "process".

-Eric

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Workflow

Posted by Viraf Bankwalla <vi...@yahoo.com>.
Hi,

I am still not clear on the distinction being made
between the Process and Workflow engines.  I was also
wondering you are referring to
jakarta-commons-sandbox\workflow\PROPOSAL.html when
you refer to Proposal (as I did not see a reference to
process).  If not, could you please refer me to the
correct Workflow and Process proposals.

Based on my understanding of WfMC, a Workflow is made
up of Activities.  An activity may be "manual" or
"automatic".  Manual activities are synchronous - i.e.
they involve users.  Both should be part of a
workflow.

So in a sense a WorkFlow definition (XML) is the
script that ties the processes.  In addition, there is
noting to prevent an Activity to be a script itself.

I am interested in what you call Wizards and how you
see them working.  

Thanks.

- viraf




--- "Craig R. McClanahan" <cr...@apache.org> wrote:
> 
> 
> On Thu, 7 Feb 2002, Viraf Bankwalla wrote:
> 
> > Date: Thu, 7 Feb 2002 14:37:36 -0800 (PST)
> > From: Viraf Bankwalla <vi...@yahoo.com>
> > Reply-To: Jakarta Commons Developers List
> <co...@jakarta.apache.org>
> > To: Jakarta Commons Developers List
> <co...@jakarta.apache.org>
> > Subject: Workflow
> >
> > Hi,
> >
> > I noticed that there was a workflow component in
> the
> > commons sandbox.  I have read the proposal, and
> was
> > inquiring to see if there were more details.
> >
> > Are we leveraging any existing work for this ? 
> Are we
> > basing it on any standards such as the WFMC ?
> >
> 
> Hello Viraf,
> 
> I looked at WFMC and a couple of the other "high
> level" standards for this
> sort of thing before designing the Workflow
> component.  They didn't really
> address the sort of "low level" things that I was
> interested in scripting,
> which tend to be synchronous, short duration, and
> executed by a single
> individual.  In particular, I wanted to be able to
> script things like a
> "wizard" dialog in web applications, where you had
> to interact with the
> user across multiple HTTP requests, which required
> the ability to suspend
> and resume execution of the script.
> 
> WFMC and friends are more appropriately used at what
> the Commons Workflow
> proposal calls the "Process" concept (which hasn't
> been fleshed out at all
> yet) than the "Activity" concept (which is focused
> on the lower level
> things).
> 
> > Thanks.
> >
> > - viraf
> 
> Craig
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Workflow

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Thu, 7 Feb 2002, Viraf Bankwalla wrote:

> Date: Thu, 7 Feb 2002 14:37:36 -0800 (PST)
> From: Viraf Bankwalla <vi...@yahoo.com>
> Reply-To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> Subject: Workflow
>
> Hi,
>
> I noticed that there was a workflow component in the
> commons sandbox.  I have read the proposal, and was
> inquiring to see if there were more details.
>
> Are we leveraging any existing work for this ?  Are we
> basing it on any standards such as the WFMC ?
>

Hello Viraf,

I looked at WFMC and a couple of the other "high level" standards for this
sort of thing before designing the Workflow component.  They didn't really
address the sort of "low level" things that I was interested in scripting,
which tend to be synchronous, short duration, and executed by a single
individual.  In particular, I wanted to be able to script things like a
"wizard" dialog in web applications, where you had to interact with the
user across multiple HTTP requests, which required the ability to suspend
and resume execution of the script.

WFMC and friends are more appropriately used at what the Commons Workflow
proposal calls the "Process" concept (which hasn't been fleshed out at all
yet) than the "Activity" concept (which is focused on the lower level
things).

> Thanks.
>
> - viraf

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Workflow

Posted by Viraf Bankwalla <vi...@yahoo.com>.
Hi,

I noticed that there was a workflow component in the
commons sandbox.  I have read the proposal, and was
inquiring to see if there were more details.

Are we leveraging any existing work for this ?  Are we
basing it on any standards such as the WFMC ?

Thanks.

- viraf

__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>