[jbpm-commits] JBoss JBPM SVN: r6786 - in jbpm3/branches/jbpm-3.2-soa/core/src: main/java/org/jbpm/jpdl/xml and 13 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Oct 27 03:33:04 EDT 2010


Author: alex.guizar at jboss.com
Date: 2010-10-27 03:33:01 -0400 (Wed, 27 Oct 2010)
New Revision: 6786

Added:
   jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/SetInfo.java
   jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jboss/
   jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jboss/seam/
   jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jboss/seam/pageflow/
   jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jboss/seam/pageflow/Page.java
   jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2774/
   jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2774/PageflowParsingTest.java
   jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.1.xsd
   jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.2.xsd
   jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithNamespace.xml
   jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithSchemaLocation.xml
   jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/
   jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.0.xml
   jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.1.xml
   jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.2.xml
   jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.0.xml
   jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.1.xml
   jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.2.xml
Removed:
   jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jpdl/xml/SchemaTest.java
Modified:
   jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/ObjectFactoryParser.java
   jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/xml/JpdlParser.java
   jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jbpm.cfg.xml
   jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm1707/JBPM1707Test.java
   jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.0.xsd
   jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithNamespace.xml
   jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithSchemaLocation.xml
   jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithoutNamespace.xml
Log:
JBPM-2774 introduce configuration property jbpm.schema.resources;
load resources from the classpath and set them as the schemas to validate against

Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/ObjectFactoryParser.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/ObjectFactoryParser.java	2010-10-21 21:26:52 UTC (rev 6785)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/ObjectFactoryParser.java	2010-10-27 07:33:01 UTC (rev 6786)
@@ -49,6 +49,7 @@
     addMapping(mappings, "bean", BeanInfo.class);
     addMapping(mappings, "ref", RefInfo.class);
     addMapping(mappings, "list", ListInfo.class);
+    addMapping(mappings, "set", SetInfo.class);
     addMapping(mappings, "map", MapInfo.class);
     addMapping(mappings, "string", StringInfo.class);
     addMapping(mappings, "int", IntegerInfo.class);

Added: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/SetInfo.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/SetInfo.java	                        (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/SetInfo.java	2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.configuration;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.w3c.dom.Element;
+
+import org.jbpm.util.XmlUtil;
+
+public class SetInfo extends AbstractObjectInfo {
+
+  private static final long serialVersionUID = 1L;
+
+  private ObjectInfo[] elementInfos;
+
+  public SetInfo(Element listElement, ObjectFactoryParser configParser) {
+    super(listElement, configParser);
+
+    List elementElements = XmlUtil.elements(listElement);
+    elementInfos = new ObjectInfo[elementElements.size()];
+    for (int i = 0; i < elementElements.size(); i++) {
+      Element elementElement = (Element) elementElements.get(i);
+      elementInfos[i] = configParser.parse(elementElement);
+    }
+  }
+
+  public Object createObject(ObjectFactory objectFactory) {
+    Set set = new HashSet();
+    if (elementInfos != null) {
+      for (int i = 0; i < elementInfos.length; i++) {
+        Object element = objectFactory.getObject(elementInfos[i]);
+        set.add(element);
+      }
+    }
+    return set;
+  }
+
+}


Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/configuration/SetInfo.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/xml/JpdlParser.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/xml/JpdlParser.java	2010-10-21 21:26:52 UTC (rev 6785)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/xml/JpdlParser.java	2010-10-27 07:33:01 UTC (rev 6786)
@@ -24,7 +24,6 @@
 import java.io.Serializable;
 import java.net.URL;
 import java.util.ArrayList;
-import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
@@ -44,11 +43,12 @@
 import org.xml.sax.SAXParseException;
 import org.xml.sax.XMLReader;
 
+import org.jbpm.JbpmConfiguration.Configs;
 import org.jbpm.util.ClassLoaderUtil;
 
 /**
- * Validate an XML document using JAXP techniques and an XML Schema. This helper class wraps the
- * processing of a schema to aid in schema validation throughout the product.
+ * This helper class wraps the processing of XML schema documents to aid {@link JpdlXmlReader}
+ * in validation.
  * 
  * @author Tom Baeyens
  * @author Jim Rigsbee
@@ -62,8 +62,8 @@
   private static final String JAXP_SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";
 
   private static final SAXParserFactory saxParserFactory = createSaxParserFactory();
-  private static final Set schemaResources = getDefaultSchemaResources();
-  private static Object schemaSource;
+  private static final Set schemaResources = (Set) Configs.getObject("jbpm.schema.resources");
+  private static String[] schemaSource;
 
   private JpdlParser() {
     // hide default constructor to prevent instantiation
@@ -135,12 +135,13 @@
           schemaLocations.add(schemaLocation);
         }
       }
-      schemaSource = schemaLocations.toArray(new String[schemaLocations.size()]);
+      schemaSource = new String[schemaLocations.size()];
+      schemaLocations.toArray(schemaSource);
     }
     return schemaSource;
   }
 
-  static class JpdlErrorHandler implements ErrorHandler, Serializable {
+  private static class JpdlErrorHandler implements ErrorHandler, Serializable {
 
     private ProblemListener problemListener;
 
@@ -171,21 +172,13 @@
     }
   }
 
-  public synchronized static void addSchemaResource(String resource) {
-    schemaResources.add(resource);
+  public synchronized static void addSchemaResource(String resourceName) {
+    // register resource
+    schemaResources.add(resourceName);
+    // invalidate existing schema source
     schemaSource = null;
   }
 
-  private static Set getDefaultSchemaResources() {
-    Set schemaResources = new HashSet();
-    schemaResources.add("org/jbpm/jpdl/xml/jpdl-3.0.xsd");
-    schemaResources.add("org/jbpm/jpdl/xml/jpdl-3.1.xsd");
-    schemaResources.add("org/jbpm/jpdl/xml/jpdl-3.2.xsd");
-    schemaResources.add("org/jbpm/jpdl/xml/jpdl-3.3.xsd");
-    schemaResources.add("org/jboss/seam/pageflow-2.0.xsd");
-    return schemaResources;
-  }
-
   private static SAXParserFactory createSaxParserFactory() {
     SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
     saxParserFactory.setValidating(true);

Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jbpm.cfg.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jbpm.cfg.xml	2010-10-21 21:26:52 UTC (rev 6785)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jbpm.cfg.xml	2010-10-27 07:33:01 UTC (rev 6786)
@@ -43,6 +43,13 @@
   <string name="resource.varmapping" value="org/jbpm/context/exe/jbpm.varmapping.xml" />
   <string name="resource.mail.templates" value="jbpm.mail.templates.xml" />
 
+  <set name="jbpm.schema.resources">
+    <string value="org/jbpm/jpdl/xml/jpdl-3.0.xsd" />
+    <string value="org/jbpm/jpdl/xml/jpdl-3.1.xsd" />
+    <string value="org/jbpm/jpdl/xml/jpdl-3.2.xsd" />
+    <string value="org/jboss/seam/pageflow-2.2.xsd" />
+  </set>
+
   <!-- alternate delegation class loader
   <string name="jbpm.class.loader" value="context" />
   -->

Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jboss/seam/pageflow/Page.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jboss/seam/pageflow/Page.java	                        (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jboss/seam/pageflow/Page.java	2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.pageflow;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.dom4j.Element;
+
+import org.jbpm.graph.def.Node;
+import org.jbpm.graph.exe.ExecutionContext;
+import org.jbpm.jpdl.xml.JpdlXmlReader;
+
+/**
+ * Placeholder for the Seam page node.
+ * 
+ * @author Alejandro Guizar
+ */
+public class Page extends Node {
+
+  private String viewId;
+
+  private static final long serialVersionUID = 1L;
+  private static final Log log = LogFactory.getLog(Page.class);
+
+  public void read(Element nodeElement, JpdlXmlReader jpdlXmlReader) {
+    viewId = nodeElement.attributeValue("view-id");
+  }
+
+  public void execute(ExecutionContext executionContext) {
+    log.info("rendering view: " + viewId);
+    executionContext.leaveNode();
+  }
+
+}


Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jboss/seam/pageflow/Page.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm1707/JBPM1707Test.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm1707/JBPM1707Test.java	2010-10-21 21:26:52 UTC (rev 6785)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm1707/JBPM1707Test.java	2010-10-27 07:33:01 UTC (rev 6786)
@@ -21,7 +21,6 @@
  */
 package org.jbpm.jbpm1707;
 
-import java.io.InputStream;
 import java.util.List;
 
 import org.jbpm.AbstractJbpmTestCase;
@@ -60,7 +59,6 @@
   }
 
   private ProcessDefinition parseXmlForThisMethod() {
-    InputStream xmlStream = getClass().getResourceAsStream(getName() + ".xml");
-    return ProcessDefinition.parseXmlInputStream(xmlStream);
+    return ProcessDefinition.parseXmlResource("org/jbpm/jbpm1707/" + getName() + ".xml");
   }
 }

Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2774/PageflowParsingTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2774/PageflowParsingTest.java	                        (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2774/PageflowParsingTest.java	2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.jbpm2774;
+
+import org.jbpm.AbstractJbpmTestCase;
+import org.jbpm.graph.def.ProcessDefinition;
+
+/**
+ * Pageflow parsing requires Internet connection.
+ * 
+ * @see <a href="https://jira.jboss.org/browse/JBPM-2774">JBPM-2774</a>
+ * @author Alejandro Guizar
+ */
+public class PageflowParsingTest extends AbstractJbpmTestCase {
+
+  public void testPageflow2_0() {
+    ProcessDefinition.parseXmlResource("org/jbpm/jbpm2774/pageflow-2.0.xml");
+  }
+
+  public void testPageflow2_1() {
+    ProcessDefinition.parseXmlResource("org/jbpm/jbpm2774/pageflow-2.1.xml");
+  }
+
+  public void testPageflow2_2() {
+    ProcessDefinition.parseXmlResource("org/jbpm/jbpm2774/pageflow-2.2.xml");
+  }
+}


Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2774/PageflowParsingTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Deleted: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jpdl/xml/SchemaTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jpdl/xml/SchemaTest.java	2010-10-21 21:26:52 UTC (rev 6785)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jpdl/xml/SchemaTest.java	2010-10-27 07:33:01 UTC (rev 6786)
@@ -1,268 +0,0 @@
-package org.jbpm.jpdl.xml;
-
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import org.w3c.dom.Document;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-import org.jbpm.AbstractJbpmTestCase;
-import org.jbpm.util.XmlUtil;
-
-public class SchemaTest extends AbstractJbpmTestCase {
-
-  public static class TestEntityResolver implements EntityResolver {
-    Map schemas;
-
-    public TestEntityResolver(Map schemas) {
-      this.schemas = schemas;
-    }
-
-    public InputSource resolveEntity(String publicId, String systemId) {
-      String schemaXmlString = (String) schemas.get(systemId);
-      if (schemaXmlString == null) {
-        return null;
-      }
-      return new InputSource(new StringReader(schemaXmlString));
-    }
-  }
-
-  public static class TestErrorHandler implements ErrorHandler {
-    List errors = new ArrayList();
-
-    public void error(SAXParseException exception) throws SAXException {
-      errors.add("[" + exception.getLineNumber() + "] " + exception.getMessage());
-    }
-
-    public void fatalError(SAXParseException exception) throws SAXException {
-      error(exception);
-    }
-
-    public void warning(SAXParseException exception) throws SAXException {
-      error(exception);
-    }
-  }
-
-  DocumentBuilderFactory dbf;
-  DocumentBuilder db;
-  Map schemas;
-  TestEntityResolver testEntityResolver;
-
-  protected void setUp() throws Exception {
-    super.setUp();
-
-    dbf = DocumentBuilderFactory.newInstance();
-    dbf.setValidating(true);
-    dbf.setNamespaceAware(true);
-    dbf.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage",
-        "http://www.w3.org/2001/XMLSchema");
-
-    schemas = new HashMap();
-    testEntityResolver = new TestEntityResolver(schemas);
-  }
-
-  public void addSchema(String schemaXmlString) {
-    String systemId = "urn:schema" + schemas.size();
-    schemas.put(systemId, schemaXmlString);
-
-    String[] schemaSources = new String[schemas.size()];
-    for (int i = 0; i < schemas.size(); i++) {
-      schemaSources[i] = "urn:schema" + i;
-    }
-
-    dbf.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaSource", schemaSources);
-  }
-
-  public Document assertValidXml(String documentXmlString) {
-    try {
-      db = dbf.newDocumentBuilder();
-      db.setEntityResolver(testEntityResolver);
-
-      TestErrorHandler errorHandler = new TestErrorHandler();
-      db.setErrorHandler(errorHandler);
-      Document document = db.parse(new InputSource(new StringReader(documentXmlString)));
-      if (!errorHandler.errors.isEmpty()) {
-        StringBuffer buffer = new StringBuffer();
-        buffer.append("parsing problems: \n");
-        Iterator iter = errorHandler.errors.iterator();
-        while (iter.hasNext()) {
-          buffer.append("ERR: ");
-          buffer.append(iter.next());
-        }
-        throw new XmlException(buffer.toString());
-      }
-
-      return document;
-    }
-    catch (XmlException e) {
-      throw e;
-    }
-    catch (Exception e) {
-      throw new XmlException("couldn't parse", e);
-    }
-  }
-
-  public void printDocument(Document document) {
-    log.debug(XmlUtil.toString(document.getDocumentElement()));
-  }
-
-  public static class XmlException extends RuntimeException {
-    private static final long serialVersionUID = 1L;
-
-    public XmlException(String message) {
-      super(message);
-    }
-
-    public XmlException(String message, Throwable cause) {
-      super(message, cause);
-    }
-  }
-
-  public void testSchemaChoices() {
-    addSchema("<xs:schema targetNamespace='urn:jbpm.org:test'\n"
-        + "  xmlns='urn:jbpm.org:test'\n"
-        + "  xmlns:xs='http://www.w3.org/2001/XMLSchema'\n"
-        + "  elementFormDefault='qualified'>\n"
-        + "  <xs:element name='root'>\n"
-        + "    <xs:complexType>\n"
-        + "      <xs:choice minOccurs='0' maxOccurs='3'>\n"
-        + "        <xs:element name='hello' />\n"
-        + "        <xs:element name='world' />\n"
-        + "      </xs:choice>\n"
-        + "    </xs:complexType>\n"
-        + "  </xs:element>\n"
-        + "</xs:schema>");
-
-    assertValidXml("<?xml version='1.0'?>\n"
-        + "<root xmlns='urn:jbpm.org:test'>\n"
-        + "  <hello />\n"
-        + "</root>");
-
-    assertValidXml("<?xml version='1.0'?>\n"
-        + "<root xmlns='urn:jbpm.org:test'>\n"
-        + "  <hello />\n"
-        + "  <world />\n"
-        + "  <hello />\n"
-        + "</root>");
-
-    try {
-      assertValidXml("<?xml version='1.0'?>\n"
-          + "<root xmlns='urn:jbpm.org:test'>\n"
-          + "  <hello />\n"
-          + "  <world />\n"
-          + "  <hello />\n"
-          + "  <hello />\n"
-          + "</root>");
-      fail("expected exception");
-    }
-    catch (XmlException e) {
-      // OK
-    }
-  }
-
-  public void testSchemaSequenceOfChoice() {
-    addSchema("<xs:schema targetNamespace='urn:jbpm.org:test'\n"
-        + "  xmlns='urn:jbpm.org:test'\n"
-        + "  xmlns:xs='http://www.w3.org/2001/XMLSchema'\n"
-        + "  elementFormDefault='qualified'>\n"
-        + "  <xs:element name='root'>\n"
-        + "    <xs:complexType>\n"
-        + "      <xs:sequence maxOccurs='3'>\n"
-        + "        <xs:choice>\n"
-        + "          <xs:element name='hello' />\n"
-        + "          <xs:element name='world' />\n"
-        + "        </xs:choice>\n"
-        + "      </xs:sequence>\n"
-        + "    </xs:complexType>\n"
-        + "  </xs:element>\n"
-        + "</xs:schema>");
-
-    assertValidXml("<?xml version='1.0'?>\n"
-        + "<root xmlns='urn:jbpm.org:test'>\n"
-        + "  <hello />\n"
-        + "</root>");
-
-    assertValidXml("<?xml version='1.0'?>\n"
-        + "<root xmlns='urn:jbpm.org:test'>\n"
-        + "  <hello />\n"
-        + "  <world />\n"
-        + "  <hello />\n"
-        + "</root>");
-
-    assertValidXml("<?xml version='1.0'?>\n"
-        + "<root xmlns='urn:jbpm.org:test'>\n"
-        + "  <hello />\n"
-        + "  <world />\n"
-        + "  <hello />\n"
-        + "</root>");
-
-    try {
-      assertValidXml("<?xml version='1.0'?>\n"
-          + "<root xmlns='urn:jbpm.org:test'>\n"
-          + "  <hello />\n"
-          + "  <world />\n"
-          + "  <hello />\n"
-          + "  <hello />\n"
-          + "</root>");
-      fail("expected exception");
-    }
-    catch (XmlException e) {
-      // OK
-    }
-  }
-
-  public void testMultiSchemas() {
-    addSchema("<xs:schema targetNamespace='urn:jbpm.org:default' \n"
-        + "           xmlns='urn:jbpm.org:default' \n"
-        + "           xmlns:xs='http://www.w3.org/2001/XMLSchema'\n"
-        + "           elementFormDefault='qualified'>\n"
-        + "  <xs:element name='root'>\n"
-        + "    <xs:complexType>\n"
-        + "      <xs:choice minOccurs='0' maxOccurs='3'>\n"
-        + "        <xs:element name='hello' />\n"
-        + "        <xs:element name='world' />\n"
-        + "        <xs:any processContents='lax' minOccurs='0' maxOccurs='unbounded'/>\n"
-        + "        <xs:any namespace='##other' processContents='lax' minOccurs='0' maxOccurs='unbounded'/>\n"
-        + "      </xs:choice>\n"
-        + "    </xs:complexType>\n"
-        + "  </xs:element>\n"
-        + "  <xs:element name='tuut' />\n"
-        + "</xs:schema>");
-
-    addSchema("<xs:schema targetNamespace='urn:jbpm.org:other' \n"
-        + "           xmlns='urn:jbpm.org:other' \n"
-        + "           xmlns:xs='http://www.w3.org/2001/XMLSchema'\n"
-        + "           elementFormDefault='qualified'>\n"
-        + "  <xs:element name='tree'>\n"
-        + "    <xs:complexType>\n"
-        + "      <xs:choice minOccurs='0' maxOccurs='3'>\n"
-        + "        <xs:element name='tree' />\n"
-        + "        <xs:element name='leaf' />\n"
-        + "      </xs:choice>\n"
-        + "    </xs:complexType>\n"
-        + "  </xs:element>\n"
-        + "  <xs:element name='leaf' />\n"
-        + "</xs:schema>");
-
-    assertValidXml("<?xml version='1.0'?>\n"
-        + "<root xmlns='urn:jbpm.org:default'"
-        + "      xmlns:other='urn:jbpm.org:other'>\n"
-        + "  <hello />\n"
-        + "  <hello />\n"
-        + "  <tuut />"
-        + "  <other:tree />"
-        + "</root>");
-  }
-
-}

Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.0.xsd
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.0.xsd	2010-10-21 21:26:52 UTC (rev 6785)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.0.xsd	2010-10-27 07:33:01 UTC (rev 6786)
@@ -54,15 +54,14 @@
 				<xs:element ref="exception-handler" />
 			</xs:choice>
 			<xs:attribute name="name" type="xs:string" />
-            <xs:attribute name="binding" type="bindingType" />
+			<xs:attribute name="binding" type="bindingType" />
 		</xs:complexType>
 	</xs:element>
 
 	<xs:element name="sub-process">
 		<xs:complexType>
 			<xs:attribute name="name" type="xs:string" use="required" />
-            <xs:attribute name="version" type="xs:integer" />
-            
+			<xs:attribute name="version" type="xs:integer" />
 		</xs:complexType>
 	</xs:element>
 

Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.1.xsd
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.1.xsd	                        (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.1.xsd	2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,326 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xs:schema xmlns="http://jboss.com/products/seam/pageflow"
+	targetNamespace="http://jboss.com/products/seam/pageflow"
+	xmlns:xs="http://www.w3.org/2001/XMLSchema"
+	elementFormDefault="qualified">
+
+	<!--  PAGEFLOW-DEFINITION -->
+	<!--  ################### -->
+	<xs:element name="pageflow-definition">
+		<xs:complexType>
+			<xs:choice minOccurs="0" maxOccurs="unbounded">
+				<xs:group ref="start-node-elements" />
+				<xs:group ref="node-elements" />
+				<xs:group ref="end-node-elements" />
+				<xs:group ref="action-elements" />
+				<xs:element ref="event" />
+				<xs:element ref="exception-handler" />
+			</xs:choice>
+			<xs:attribute name="name" type="xs:string" use="required" />
+			<xs:attribute name="start-page" type="xs:string" />
+		</xs:complexType>
+	</xs:element>
+
+	<!--  NODES -->
+	<!--  ##### -->
+	<xs:element name="start-state">
+		<xs:complexType>
+			<xs:choice minOccurs="0" maxOccurs="unbounded">
+				<xs:element ref="transition" />
+				<xs:element ref="event" />
+				<xs:element ref="exception-handler" />
+			</xs:choice>
+			<xs:attribute name="name" type="xs:string" />
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="end-state">
+		<xs:complexType>
+			<xs:choice minOccurs="0" maxOccurs="unbounded">
+				<xs:element ref="event" />
+				<xs:element ref="exception-handler" />
+			</xs:choice>
+			<xs:attribute name="name" type="xs:string" use="required" />
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="process-state">
+		<xs:complexType>
+			<xs:choice minOccurs="0" maxOccurs="unbounded">
+				<xs:element ref="sub-process" />
+				<xs:element ref="transition" />
+				<xs:element ref="event" />
+				<xs:element ref="exception-handler" />
+			</xs:choice>
+			<xs:attribute name="name" type="xs:string" />
+			<xs:attribute name="binding" type="bindingType" />
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="sub-process">
+		<xs:complexType>
+			<xs:attribute name="name" type="xs:string" use="required" />
+			<xs:attribute name="version" type="xs:integer" />
+			<xs:attribute name="binding" type="bindingType" />
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="start-page">
+		<xs:complexType>
+			<xs:choice minOccurs="0" maxOccurs="unbounded">
+				<xs:group ref="page-elements" />
+			</xs:choice>
+			<xs:attributeGroup ref="page-attributes" />
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="decision">
+		<xs:complexType>
+			<xs:choice minOccurs="0" maxOccurs="unbounded">
+				<xs:element name="handler" type="delegation" />
+				<xs:element ref="event" />
+				<xs:element ref="exception-handler" />
+				<xs:element name="transition">
+					<xs:complexType>
+						<xs:choice minOccurs="0"
+							maxOccurs="unbounded">
+							<xs:element name="condition">
+								<xs:complexType mixed="true">
+									<xs:sequence minOccurs="0"
+										maxOccurs="unbounded">
+										<xs:any processContents="lax"
+											minOccurs="0" maxOccurs="unbounded" />
+									</xs:sequence>
+									<xs:attribute name="expression"
+										type="xs:string" />
+								</xs:complexType>
+							</xs:element>
+							<xs:group ref="action-elements" />
+							<xs:element ref="exception-handler" />
+						</xs:choice>
+						<xs:attribute name="to" type="xs:string"
+							use="required" />
+						<xs:attribute name="name" type="xs:string" />
+					</xs:complexType>
+				</xs:element>
+			</xs:choice>
+			<xs:attribute name="name" type="xs:string" use="required" />
+			<xs:attribute name="expression" type="xs:string" />
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="page">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:choice minOccurs="0" maxOccurs="1">
+					<xs:element ref="end-conversation" />
+				</xs:choice>
+				<xs:choice minOccurs="0" maxOccurs="1">
+					<xs:element ref="end-task" />
+				</xs:choice>
+				<xs:group ref="page-elements" />
+			</xs:sequence>
+			<xs:attributeGroup ref="page-attributes" />
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="redirect" />
+	<xs:element name="description" type="xs:string" />
+
+	<xs:element name="end-conversation">
+		<xs:complexType>
+			<xs:attribute name="before-redirect" type="booleanType" />
+			<xs:attribute name="create-process" type="xs:string" />
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="end-task">
+		<xs:complexType>
+			<xs:attribute name="transition" type="xs:string" />
+		</xs:complexType>
+	</xs:element>
+
+	<!--  TRANSITION -->
+	<!--  ########## -->
+	<xs:element name="transition">
+		<xs:complexType>
+			<xs:choice minOccurs="0" maxOccurs="unbounded">
+				<xs:group ref="action-elements" />
+				<xs:element ref="exception-handler" />
+			</xs:choice>
+			<xs:attribute name="to" type="xs:string" use="required" />
+			<xs:attribute name="name" type="xs:string" />
+		</xs:complexType>
+	</xs:element>
+
+	<!-- ACTIONS -->
+	<!-- ####### -->
+	<xs:element name="action">
+		<xs:complexType mixed="true">
+			<xs:sequence>
+				<xs:any processContents="lax" minOccurs="0"
+					maxOccurs="unbounded" />
+			</xs:sequence>
+			<xs:attribute name="class" type="xs:string" />
+			<xs:attribute name="config-type" default="field" type="xs:string" />
+			<xs:attribute name="name" type="xs:string" />
+			<xs:attribute name="ref-name" type="xs:string" />
+			<xs:attribute name="accept-propagated-events"
+				type="booleanType" default="true" />
+			<xs:attribute name="expression" type="xs:string" />
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="script">
+		<xs:complexType mixed="true">
+			<xs:sequence>
+				<xs:any processContents="lax" minOccurs="0"
+					maxOccurs="unbounded" />
+			</xs:sequence>
+			<xs:attribute name="name" type="xs:string" />
+			<xs:attribute name="accept-propagated-events"
+				type="booleanType" default="true" />
+		</xs:complexType>
+	</xs:element>
+
+	<!--  EVENT -->
+	<!--  ##### -->
+	<xs:element name="event">
+		<xs:complexType>
+			<xs:choice minOccurs="0" maxOccurs="unbounded">
+				<xs:group ref="action-elements" />
+			</xs:choice>
+			<xs:attribute name="type" use="required">
+				<xs:simpleType>
+					<xs:union>
+						<xs:simpleType>
+							<xs:restriction base="xs:string" />
+						</xs:simpleType>
+						<xs:simpleType>
+							<xs:restriction base="xs:string">
+								<xs:enumeration value="node-enter" />
+								<xs:enumeration value="node-leave" />
+								<xs:enumeration value="process-start" />
+								<xs:enumeration value="process-end" />
+								<xs:enumeration value="task-create" />
+								<xs:enumeration value="task-assign" />
+								<xs:enumeration value="task-start" />
+								<xs:enumeration value="task-end" />
+								<xs:enumeration value="before-signal" />
+								<xs:enumeration value="after-signal" />
+							</xs:restriction>
+						</xs:simpleType>
+					</xs:union>
+				</xs:simpleType>
+			</xs:attribute>
+		</xs:complexType>
+	</xs:element>
+
+	<!--  EXCEPTION-HANDLER -->
+	<!--  ################# -->
+	<xs:element name="exception-handler">
+		<xs:complexType>
+			<xs:choice minOccurs="1" maxOccurs="unbounded">
+				<xs:element ref="action" />
+				<xs:element ref="script" />
+			</xs:choice>
+			<xs:attribute name="exception-class" type="xs:string" />
+		</xs:complexType>
+	</xs:element>
+
+	<!-- TYPES AND GROUPS -->
+	<!-- ################ -->
+	<xs:complexType name="delegation" mixed="true">
+		<xs:sequence>
+			<xs:any processContents="lax" minOccurs="0"
+				maxOccurs="unbounded" />
+		</xs:sequence>
+		<xs:attribute name="class" type="xs:string" />
+		<xs:attribute name="config-type" default="field" type="xs:string" />
+	</xs:complexType>
+
+	<xs:simpleType name="configType">
+		<xs:restriction base="xs:string">
+			<xs:enumeration value="field" />
+			<xs:enumeration value="bean" />
+			<xs:enumeration value="constructor" />
+			<xs:enumeration value="configuration-property" />
+		</xs:restriction>
+	</xs:simpleType>
+
+	<xs:simpleType name="booleanType">
+		<xs:restriction base="xs:string">
+			<xs:enumeration value="yes" />
+			<xs:enumeration value="no" />
+			<xs:enumeration value="true" />
+			<xs:enumeration value="false" />
+			<xs:enumeration value="on" />
+			<xs:enumeration value="off" />
+		</xs:restriction>
+	</xs:simpleType>
+
+	<xs:simpleType name="enabledType">
+		<xs:restriction base="xs:string">
+			<xs:enumeration value="enabled" />
+			<xs:enumeration value="disabled" />
+		</xs:restriction>
+	</xs:simpleType>
+
+	<xs:group name="start-node-elements">
+		<xs:choice>
+			<xs:element ref="start-state" />
+			<xs:element ref="start-page" />
+		</xs:choice>
+	</xs:group>
+
+	<xs:group name="node-elements">
+		<xs:choice>
+			<xs:element ref="page" />
+			<xs:element ref="decision" />
+			<xs:element ref="process-state" />
+		</xs:choice>
+	</xs:group>
+	
+	<xs:group name="end-node-elements">
+		<xs:choice>
+			<xs:element ref="end-state" />
+		</xs:choice>
+	</xs:group>
+
+	<xs:group name="action-elements">
+		<xs:choice>
+			<xs:element ref="action" />
+			<xs:element ref="script"/>
+		</xs:choice>
+	</xs:group>
+
+	<xs:group name="page-elements">
+		<xs:sequence>
+            <xs:element ref="description" maxOccurs="1" minOccurs="0"/>
+            <xs:element ref="redirect" maxOccurs="1" minOccurs="0"/>
+			<xs:element ref="event" minOccurs="0" maxOccurs="unbounded"/>
+			<xs:element ref="exception-handler" minOccurs="0" maxOccurs="unbounded"/>
+			<xs:element ref="transition" maxOccurs="unbounded" minOccurs="0"/>
+			<xs:group ref="action-elements" minOccurs="0" maxOccurs="1" />
+		</xs:sequence>
+	</xs:group>
+
+	<xs:attributeGroup name="page-attributes">
+		<xs:attribute name="redirect" type="xs:boolean" />
+		<xs:attribute name="switch" type="enabledType" />
+		<xs:attribute name="no-conversation-view-id" type="xs:string" />
+		<xs:attribute name="timeout" type="xs:int" />
+		<xs:attribute name="back" type="enabledType" />
+		<xs:attribute name="view-id" type="xs:string" use="required" />
+		<xs:attribute name="name" type="xs:string" use="required" />
+	</xs:attributeGroup>
+  
+    <xs:simpleType name="bindingType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="late" />
+            <xs:enumeration value="early" />
+        </xs:restriction>
+    </xs:simpleType>
+
+</xs:schema>


Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.1.xsd
___________________________________________________________________
Name: svn:eol-style
   + native

Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.2.xsd
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.2.xsd	                        (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.2.xsd	2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,326 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xs:schema xmlns="http://jboss.com/products/seam/pageflow"
+	targetNamespace="http://jboss.com/products/seam/pageflow"
+	xmlns:xs="http://www.w3.org/2001/XMLSchema"
+	elementFormDefault="qualified">
+
+	<!--  PAGEFLOW-DEFINITION -->
+	<!--  ################### -->
+	<xs:element name="pageflow-definition">
+		<xs:complexType>
+			<xs:choice minOccurs="0" maxOccurs="unbounded">
+				<xs:group ref="start-node-elements" />
+				<xs:group ref="node-elements" />
+				<xs:group ref="end-node-elements" />
+				<xs:group ref="action-elements" />
+				<xs:element ref="event" />
+				<xs:element ref="exception-handler" />
+			</xs:choice>
+			<xs:attribute name="name" type="xs:string" use="required" />
+			<xs:attribute name="start-page" type="xs:string" />
+		</xs:complexType>
+	</xs:element>
+
+	<!--  NODES -->
+	<!--  ##### -->
+	<xs:element name="start-state">
+		<xs:complexType>
+			<xs:choice minOccurs="0" maxOccurs="unbounded">
+				<xs:element ref="transition" />
+				<xs:element ref="event" />
+				<xs:element ref="exception-handler" />
+			</xs:choice>
+			<xs:attribute name="name" type="xs:string" />
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="end-state">
+		<xs:complexType>
+			<xs:choice minOccurs="0" maxOccurs="unbounded">
+				<xs:element ref="event" />
+				<xs:element ref="exception-handler" />
+			</xs:choice>
+			<xs:attribute name="name" type="xs:string" use="required" />
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="process-state">
+		<xs:complexType>
+			<xs:choice minOccurs="0" maxOccurs="unbounded">
+				<xs:element ref="sub-process" />
+				<xs:element ref="transition" />
+				<xs:element ref="event" />
+				<xs:element ref="exception-handler" />
+			</xs:choice>
+			<xs:attribute name="name" type="xs:string" />
+			<xs:attribute name="binding" type="bindingType" />
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="sub-process">
+		<xs:complexType>
+			<xs:attribute name="name" type="xs:string" use="required" />
+			<xs:attribute name="version" type="xs:integer" />
+			<xs:attribute name="binding" type="bindingType" />
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="start-page">
+		<xs:complexType>
+			<xs:choice minOccurs="0" maxOccurs="unbounded">
+				<xs:group ref="page-elements" />
+			</xs:choice>
+			<xs:attributeGroup ref="page-attributes" />
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="decision">
+		<xs:complexType>
+			<xs:choice minOccurs="0" maxOccurs="unbounded">
+				<xs:element name="handler" type="delegation" />
+				<xs:element ref="event" />
+				<xs:element ref="exception-handler" />
+				<xs:element name="transition">
+					<xs:complexType>
+						<xs:choice minOccurs="0"
+							maxOccurs="unbounded">
+							<xs:element name="condition">
+								<xs:complexType mixed="true">
+									<xs:sequence minOccurs="0"
+										maxOccurs="unbounded">
+										<xs:any processContents="lax"
+											minOccurs="0" maxOccurs="unbounded" />
+									</xs:sequence>
+									<xs:attribute name="expression"
+										type="xs:string" />
+								</xs:complexType>
+							</xs:element>
+							<xs:group ref="action-elements" />
+							<xs:element ref="exception-handler" />
+						</xs:choice>
+						<xs:attribute name="to" type="xs:string"
+							use="required" />
+						<xs:attribute name="name" type="xs:string" />
+					</xs:complexType>
+				</xs:element>
+			</xs:choice>
+			<xs:attribute name="name" type="xs:string" use="required" />
+			<xs:attribute name="expression" type="xs:string" />
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="page">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:choice minOccurs="0" maxOccurs="1">
+					<xs:element ref="end-conversation" />
+				</xs:choice>
+				<xs:choice minOccurs="0" maxOccurs="1">
+					<xs:element ref="end-task" />
+				</xs:choice>
+				<xs:group ref="page-elements" />
+			</xs:sequence>
+			<xs:attributeGroup ref="page-attributes" />
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="redirect" />
+	<xs:element name="description" type="xs:string" />
+
+	<xs:element name="end-conversation">
+		<xs:complexType>
+			<xs:attribute name="before-redirect" type="booleanType" />
+			<xs:attribute name="create-process" type="xs:string" />
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="end-task">
+		<xs:complexType>
+			<xs:attribute name="transition" type="xs:string" />
+		</xs:complexType>
+	</xs:element>
+
+	<!--  TRANSITION -->
+	<!--  ########## -->
+	<xs:element name="transition">
+		<xs:complexType>
+			<xs:choice minOccurs="0" maxOccurs="unbounded">
+				<xs:group ref="action-elements" />
+				<xs:element ref="exception-handler" />
+			</xs:choice>
+			<xs:attribute name="to" type="xs:string" use="required" />
+			<xs:attribute name="name" type="xs:string" />
+		</xs:complexType>
+	</xs:element>
+
+	<!-- ACTIONS -->
+	<!-- ####### -->
+	<xs:element name="action">
+		<xs:complexType mixed="true">
+			<xs:sequence>
+				<xs:any processContents="lax" minOccurs="0"
+					maxOccurs="unbounded" />
+			</xs:sequence>
+			<xs:attribute name="class" type="xs:string" />
+			<xs:attribute name="config-type" default="field" type="xs:string" />
+			<xs:attribute name="name" type="xs:string" />
+			<xs:attribute name="ref-name" type="xs:string" />
+			<xs:attribute name="accept-propagated-events"
+				type="booleanType" default="true" />
+			<xs:attribute name="expression" type="xs:string" />
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="script">
+		<xs:complexType mixed="true">
+			<xs:sequence>
+				<xs:any processContents="lax" minOccurs="0"
+					maxOccurs="unbounded" />
+			</xs:sequence>
+			<xs:attribute name="name" type="xs:string" />
+			<xs:attribute name="accept-propagated-events"
+				type="booleanType" default="true" />
+		</xs:complexType>
+	</xs:element>
+
+	<!--  EVENT -->
+	<!--  ##### -->
+	<xs:element name="event">
+		<xs:complexType>
+			<xs:choice minOccurs="0" maxOccurs="unbounded">
+				<xs:group ref="action-elements" />
+			</xs:choice>
+			<xs:attribute name="type" use="required">
+				<xs:simpleType>
+					<xs:union>
+						<xs:simpleType>
+							<xs:restriction base="xs:string" />
+						</xs:simpleType>
+						<xs:simpleType>
+							<xs:restriction base="xs:string">
+								<xs:enumeration value="node-enter" />
+								<xs:enumeration value="node-leave" />
+								<xs:enumeration value="process-start" />
+								<xs:enumeration value="process-end" />
+								<xs:enumeration value="task-create" />
+								<xs:enumeration value="task-assign" />
+								<xs:enumeration value="task-start" />
+								<xs:enumeration value="task-end" />
+								<xs:enumeration value="before-signal" />
+								<xs:enumeration value="after-signal" />
+							</xs:restriction>
+						</xs:simpleType>
+					</xs:union>
+				</xs:simpleType>
+			</xs:attribute>
+		</xs:complexType>
+	</xs:element>
+
+	<!--  EXCEPTION-HANDLER -->
+	<!--  ################# -->
+	<xs:element name="exception-handler">
+		<xs:complexType>
+			<xs:choice minOccurs="1" maxOccurs="unbounded">
+				<xs:element ref="action" />
+				<xs:element ref="script" />
+			</xs:choice>
+			<xs:attribute name="exception-class" type="xs:string" />
+		</xs:complexType>
+	</xs:element>
+
+	<!-- TYPES AND GROUPS -->
+	<!-- ################ -->
+	<xs:complexType name="delegation" mixed="true">
+		<xs:sequence>
+			<xs:any processContents="lax" minOccurs="0"
+				maxOccurs="unbounded" />
+		</xs:sequence>
+		<xs:attribute name="class" type="xs:string" />
+		<xs:attribute name="config-type" default="field" type="xs:string" />
+	</xs:complexType>
+
+	<xs:simpleType name="configType">
+		<xs:restriction base="xs:string">
+			<xs:enumeration value="field" />
+			<xs:enumeration value="bean" />
+			<xs:enumeration value="constructor" />
+			<xs:enumeration value="configuration-property" />
+		</xs:restriction>
+	</xs:simpleType>
+
+	<xs:simpleType name="booleanType">
+		<xs:restriction base="xs:string">
+			<xs:enumeration value="yes" />
+			<xs:enumeration value="no" />
+			<xs:enumeration value="true" />
+			<xs:enumeration value="false" />
+			<xs:enumeration value="on" />
+			<xs:enumeration value="off" />
+		</xs:restriction>
+	</xs:simpleType>
+
+	<xs:simpleType name="enabledType">
+		<xs:restriction base="xs:string">
+			<xs:enumeration value="enabled" />
+			<xs:enumeration value="disabled" />
+		</xs:restriction>
+	</xs:simpleType>
+
+	<xs:group name="start-node-elements">
+		<xs:choice>
+			<xs:element ref="start-state" />
+			<xs:element ref="start-page" />
+		</xs:choice>
+	</xs:group>
+
+	<xs:group name="node-elements">
+		<xs:choice>
+			<xs:element ref="page" />
+			<xs:element ref="decision" />
+			<xs:element ref="process-state" />
+		</xs:choice>
+	</xs:group>
+	
+	<xs:group name="end-node-elements">
+		<xs:choice>
+			<xs:element ref="end-state" />
+		</xs:choice>
+	</xs:group>
+
+	<xs:group name="action-elements">
+		<xs:choice>
+			<xs:element ref="action" />
+			<xs:element ref="script"/>
+		</xs:choice>
+	</xs:group>
+
+	<xs:group name="page-elements">
+		<xs:sequence>
+            <xs:element ref="description" maxOccurs="1" minOccurs="0"/>
+            <xs:element ref="redirect" maxOccurs="1" minOccurs="0"/>
+			<xs:element ref="event" minOccurs="0" maxOccurs="unbounded"/>
+			<xs:element ref="exception-handler" minOccurs="0" maxOccurs="unbounded"/>
+			<xs:element ref="transition" maxOccurs="unbounded" minOccurs="0"/>
+			<xs:group ref="action-elements" minOccurs="0" maxOccurs="1" />
+		</xs:sequence>
+	</xs:group>
+
+	<xs:attributeGroup name="page-attributes">
+		<xs:attribute name="redirect" type="xs:boolean" />
+		<xs:attribute name="switch" type="enabledType" />
+		<xs:attribute name="no-conversation-view-id" type="xs:string" />
+		<xs:attribute name="timeout" type="xs:int" />
+		<xs:attribute name="back" type="enabledType" />
+		<xs:attribute name="view-id" type="xs:string" use="required" />
+		<xs:attribute name="name" type="xs:string" use="required" />
+	</xs:attributeGroup>
+  
+    <xs:simpleType name="bindingType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="late" />
+            <xs:enumeration value="early" />
+        </xs:restriction>
+    </xs:simpleType>
+
+</xs:schema>


Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jboss/seam/pageflow-2.2.xsd
___________________________________________________________________
Name: svn:eol-style
   + native

Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithNamespace.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithNamespace.xml	                        (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithNamespace.xml	2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<root-container/>
\ No newline at end of file


Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithNamespace.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithSchemaLocation.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithSchemaLocation.xml	                        (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithSchemaLocation.xml	2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<root-container/>
\ No newline at end of file


Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/.gpd.testPageflowWithSchemaLocation.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithNamespace.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithNamespace.xml	2010-10-21 21:26:52 UTC (rev 6785)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithNamespace.xml	2010-10-27 07:33:01 UTC (rev 6786)
@@ -4,27 +4,26 @@
     <!-- the parser will notice because a schema is associated to the namespace above -->
   </i-do-not-belong-here>
 
-  <start-state name="displayGuess">
+  <start-page name="displayGuess" view-id="/numberGuess.jspx">
     <transition name="guess" to="evaluateGuess">
       <action expression="#{numberGuess.guess}" />
     </transition>
-  </start-state>
+  </start-page>
 
   <decision name="evaluateGuess" expression="#{numberGuess.correctGuess}">
     <transition name="true" to="win" />
     <transition name="false" to="evaluateRemainingGuesses" />
   </decision>
 
-  <decision name="evaluateRemainingGuesses"
-    expression="#{numberGuess.lastGuess}">
+  <decision name="evaluateRemainingGuesses" expression="#{numberGuess.lastGuess}">
     <transition name="true" to="lose" />
     <transition name="false" to="evaluateGuess">
       <action expression="#{numberGuess.guess}" />
     </transition>
   </decision>
 
-  <end-state name="win" />
+  <page name="win" view-id="/win.jspx" />
 
-  <end-state name="lose" />
+  <page name="lose" view-id="/lose.jspx" />
 
 </pageflow-definition>
\ No newline at end of file

Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithSchemaLocation.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithSchemaLocation.xml	2010-10-21 21:26:52 UTC (rev 6785)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithSchemaLocation.xml	2010-10-27 07:33:01 UTC (rev 6786)
@@ -1,15 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<pageflow-definition name="numberGuess"
-  xsi:schemaLocation="http://jboss.com/products/seam/pageflow
-                      http://jboss.com/products/seam/pageflow-2.0.xsd"
+<pageflow-definition name="numberGuess" xmlns="http://jboss.com/products/seam/pageflow"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns="http://jboss.com/products/seam/pageflow">
+  xsi:schemaLocation="http://jboss.com/products/seam/pageflow
+                      http://jboss.com/products/seam/pageflow-2.2.xsd">
 
-  <start-state name="displayGuess">
+  <start-page name="displayGuess" view-id="/numberGuess.jspx">
     <transition name="guess" to="evaluateGuess">
       <action expression="#{numberGuess.guess}" />
     </transition>
-  </start-state>
+  </start-page>
 
   <decision name="evaluateGuess" expression="#{numberGuess.correctGuess}">
     <transition name="true" to="win" />
@@ -24,8 +23,8 @@
     </transition>
   </decision>
 
-  <end-state name="win" />
+  <page name="win" view-id="/win.jspx" />
 
-  <end-state name="lose" />
+  <page name="lose" view-id="/lose.jspx" />
 
 </pageflow-definition>
\ No newline at end of file

Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithoutNamespace.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithoutNamespace.xml	2010-10-21 21:26:52 UTC (rev 6785)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm1707/testPageflowWithoutNamespace.xml	2010-10-27 07:33:01 UTC (rev 6786)
@@ -4,11 +4,11 @@
     <!-- the parser will not notice because no namespace was specified -->
   </i-do-not-belong-here>
 
-  <start-state name="displayGuess">
+  <start-page name="displayGuess" view-id="/numberGuess.jspx">
     <transition name="guess" to="evaluateGuess">
       <action expression="#{numberGuess.guess}" />
     </transition>
-  </start-state>
+  </start-page>
 
   <decision name="evaluateGuess" expression="#{numberGuess.correctGuess}">
     <transition name="true" to="win" />
@@ -23,8 +23,8 @@
     </transition>
   </decision>
 
-  <end-state name="win" />
+  <page name="win" view-id="/win.jspx" />
 
-  <end-state name="lose" />
+  <page name="lose" view-id="/lose.jspx" />
 
 </pageflow-definition>
\ No newline at end of file

Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.0.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.0.xml	                        (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.0.xml	2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<root-container name="jbpm2774" width="784" height="581">
+  <node name="guess number" x="36" y="108" width="145" height="37">
+    <edge>
+      <label x="5" y="-10"/>
+    </edge>
+  </node>
+  <node name="is guess correct?" x="36" y="180" width="145" height="37">
+    <edge>
+      <label x="5" y="-10"/>
+    </edge>
+    <edge>
+      <label x="5" y="-10"/>
+      <bendpoint w1="108" h1="1" w2="108" h2="73"/>
+      <bendpoint w1="108" h1="-73" w2="108" h2="-1"/>
+    </edge>
+  </node>
+  <node name="show attempts" x="36" y="264" width="144" height="36"/>
+</root-container>


Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.0.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.1.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.1.xml	                        (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.1.xml	2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<root-container name="jbpm2774" width="784" height="581">
+  <node name="guess number" x="36" y="108" width="145" height="37">
+    <edge>
+      <label x="5" y="-10"/>
+    </edge>
+  </node>
+  <node name="is guess correct?" x="36" y="180" width="145" height="37">
+    <edge>
+      <label x="5" y="-10"/>
+    </edge>
+    <edge>
+      <label x="5" y="-10"/>
+      <bendpoint w1="108" h1="1" w2="108" h2="73"/>
+      <bendpoint w1="108" h1="-73" w2="108" h2="-1"/>
+    </edge>
+  </node>
+  <node name="show attempts" x="36" y="264" width="144" height="36"/>
+</root-container>


Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.1.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.2.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.2.xml	                        (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.2.xml	2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<root-container name="jbpm2774" width="784" height="581">
+  <node name="guess number" x="36" y="108" width="145" height="37">
+    <edge>
+      <label x="5" y="-10"/>
+    </edge>
+  </node>
+  <node name="is guess correct?" x="36" y="180" width="145" height="37">
+    <edge>
+      <label x="5" y="-10"/>
+    </edge>
+    <edge>
+      <label x="5" y="-10"/>
+      <bendpoint w1="108" h1="1" w2="108" h2="73"/>
+      <bendpoint w1="108" h1="-73" w2="108" h2="-1"/>
+    </edge>
+  </node>
+  <node name="show attempts" x="36" y="264" width="144" height="36"/>
+</root-container>


Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/.gpd.pageflow-2.2.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.0.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.0.xml	                        (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.0.xml	2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<pageflow-definition name="jbpm2774" xmlns="http://jboss.com/products/seam/pageflow"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://jboss.com/products/seam/pageflow
+    http://jboss.com/products/seam/pageflow-2.0.xsd">
+  <start-page name="guess number" view-id="guess.xhtml">
+    <transition to="is guess correct?" />
+  </start-page>
+
+  <decision name="is guess correct?">
+    <transition to="show attempts" name="yes" />
+    <transition name="no" to="guess number" />
+  </decision>
+
+  <page name="show attempts" view-id="show.xhtml" />
+</pageflow-definition>


Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.0.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.1.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.1.xml	                        (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.1.xml	2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<pageflow-definition name="jbpm2774" xmlns="http://jboss.com/products/seam/pageflow"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://jboss.com/products/seam/pageflow
+    http://jboss.com/products/seam/pageflow-2.1.xsd">
+  <event type="process-start">
+    <script>executionContext.setVariable(&quot;number&quot;, (int) System.currentTimeMillis() % 100);</script>  
+  </event>
+
+  <start-page name="guess number" view-id="guess.xhtml">
+    <transition to="is guess correct?" ></transition>
+  </start-page>
+
+  <decision name="is guess correct?">
+    <transition to="show attempts" name="yes" />
+    <transition name="no" to="guess number" />
+  </decision>
+
+  <page name="show attempts" view-id="show.xhtml" />
+</pageflow-definition>


Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.1.xml
___________________________________________________________________
Name: svn:eol-style
   + native

Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.2.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.2.xml	                        (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.2.xml	2010-10-27 07:33:01 UTC (rev 6786)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<pageflow-definition name="jbpm2774" xmlns="http://jboss.com/products/seam/pageflow"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://jboss.com/products/seam/pageflow
+    http://jboss.com/products/seam/pageflow-2.2.xsd">
+  <event type="process-start">
+    <script>executionContext.setVariable(&quot;number&quot;, (int) System.currentTimeMillis() % 100);</script>  
+  </event>
+
+  <start-page name="guess number" view-id="guess.xhtml">
+    <transition to="is guess correct?" />
+  </start-page>
+
+  <decision name="is guess correct?">
+    <transition to="show attempts" name="yes" />
+    <transition name="no" to="guess number" />
+  </decision>
+
+  <page name="show attempts" view-id="show.xhtml" />
+</pageflow-definition>


Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2774/pageflow-2.2.xml
___________________________________________________________________
Name: svn:eol-style
   + native



More information about the jbpm-commits mailing list