[jbpm-commits] JBoss JBPM SVN: r2692 - in projects/gwt-console/trunk: rpc/src/main/java/org/jboss/bpm/console/client/model/util and 5 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Oct 31 05:11:31 EDT 2008


Author: heiko.braun at jboss.com
Date: 2008-10-31 05:11:30 -0400 (Fri, 31 Oct 2008)
New Revision: 2692

Added:
   projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/util/MapEntry.java
   projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/util/MapReplacement.java
Modified:
   projects/gwt-console/trunk/gwt-console.iml
   projects/gwt-console/trunk/pom.xml
   projects/gwt-console/trunk/server/pom.xml
   projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/TaskManagement.java
   projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/DiagramDAO.java
   projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/TaskDAO.java
   projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/JBPM3CommandDelegate.java
   projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/JBPM3TaskDAO.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java
Log:
Added TaskFormList and TaskForm resources that give access to the jbpm3 JSF forms

Modified: projects/gwt-console/trunk/gwt-console.iml
===================================================================
--- projects/gwt-console/trunk/gwt-console.iml	2008-10-31 09:10:33 UTC (rev 2691)
+++ projects/gwt-console/trunk/gwt-console.iml	2008-10-31 09:11:30 UTC (rev 2692)
@@ -1,8 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <module version="4" relativePaths="true" type="JAVA_MODULE">
   <component name="ModuleRootManager" />
-  <component name="NewModuleRootManager" inherit-compiler-output="true">
+  <component name="NewModuleRootManager" inherit-compiler-output="false">
+    <output url="file://$MODULE_DIR$/server/target/classes" />
     <exclude-output />
+    <output-test url="file://$MODULE_DIR$/../../../../../../IdeaProjects/jBPM3/classes/test/gwt-console" />
     <content url="file://$MODULE_DIR$">
       <sourceFolder url="file://$MODULE_DIR$/rpc/src/main/java" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/server/src/main/java" isTestSource="false" />
@@ -14,90 +16,153 @@
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module" module-name="jbpm3-enterprise" />
     <orderEntry type="module" module-name="jbpm3-core" />
-    <orderEntry type="module" module-name="jbpm3-enterprise" />
     <orderEntry type="module-library">
-      <library name="M2 Dep: org.slf4j:slf4j-simple:jar:1.5.2:compile">
+      <library name="M2 Dep: javax.xml.stream:stax-api:jar:1.0-2:provided">
         <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/slf4j/slf4j-simple/1.5.2/slf4j-simple-1.5.2.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES />
       </library>
     </orderEntry>
     <orderEntry type="module-library">
-      <library name="M2 Dep: nekohtml:nekohtml:jar:0.9.4:provided">
+      <library name="M2 Dep: com.google.gwt:gwt-servlet:jar:1.5.2:runtime">
         <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/nekohtml/nekohtml/0.9.4/nekohtml-0.9.4.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/google/gwt/gwt-servlet/1.5.2/gwt-servlet-1.5.2.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES />
       </library>
     </orderEntry>
     <orderEntry type="module-library">
-      <library name="M2 Dep: org.apache.derby:derby:jar:10.2.1.6:provided">
+      <library name="M2 Dep: com.google.gwt:gchart:jar:2.2:compile">
         <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/apache/derby/derby/10.2.1.6/derby-10.2.1.6.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/google/gwt/gchart/2.2/gchart-2.2.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES />
       </library>
     </orderEntry>
     <orderEntry type="module-library">
-      <library name="M2 Dep: javax.xml.stream:stax-api:jar:1.0-2:provided">
+      <library name="M2 Dep: com.google.gwt:gwt-user:jar:1.5.2:provided">
         <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/google/gwt/gwt-user/1.5.2/gwt-user-1.5.2.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES />
       </library>
     </orderEntry>
     <orderEntry type="module-library">
-      <library name="M2 Dep: poi:poi:jar:2.5.1-final-20040804:provided">
+      <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:provided">
         <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/poi/poi/2.5.1-final-20040804/poi-2.5.1-final-20040804.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES />
       </library>
     </orderEntry>
     <orderEntry type="module-library">
-      <library name="M2 Dep: asm:asm:jar:1.5.3:provided">
+      <library name="M2 Dep: junit:junit:jar:3.8.1:test">
         <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/asm/asm/1.5.3/asm-1.5.3.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES />
       </library>
     </orderEntry>
     <orderEntry type="module-library">
-      <library name="M2 Dep: commons-httpclient:commons-httpclient:jar:3.1:compile">
+      <library name="M2 Dep: com.google.gwt:gwt-dev:jar:mac:1.5.2:provided">
         <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/google/gwt/gwt-dev/1.5.2/gwt-dev-1.5.2-mac.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES />
       </library>
     </orderEntry>
     <orderEntry type="module-library">
-      <library name="M2 Dep: com.google.gwt:gwt-servlet:jar:1.5.2:runtime">
+      <library name="M2 Dep: javax.activation:activation:jar:1.1:provided">
         <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/google/gwt/gwt-servlet/1.5.2/gwt-servlet-1.5.2.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES />
       </library>
     </orderEntry>
     <orderEntry type="module-library">
-      <library name="M2 Dep: com.google.gwt:gchart:jar:2.2:compile">
+      <library name="M2 Dep: com.gwtext:gwtext:jar:2.0.5:compile">
         <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/google/gwt/gchart/2.2/gchart-2.2.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/gwtext/gwtext/2.0.5/gwtext-2.0.5.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES />
       </library>
     </orderEntry>
     <orderEntry type="module-library">
+      <library name="M2 Dep: org.slf4j:slf4j-simple:jar:1.5.2:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/slf4j/slf4j-simple/1.5.2/slf4j-simple-1.5.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="M2 Dep: nekohtml:nekohtml:jar:0.9.4:provided">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/nekohtml/nekohtml/0.9.4/nekohtml-0.9.4.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="M2 Dep: org.apache.derby:derby:jar:10.2.1.6:provided">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/apache/derby/derby/10.2.1.6/derby-10.2.1.6.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="M2 Dep: poi:poi:jar:2.5.1-final-20040804:provided">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/poi/poi/2.5.1-final-20040804/poi-2.5.1-final-20040804.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="M2 Dep: asm:asm:jar:1.5.3:provided">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/asm/asm/1.5.3/asm-1.5.3.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="M2 Dep: commons-httpclient:commons-httpclient:jar:3.1:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="M2 Dep: org.jboss:jboss-common-core:jar:2.2.7.GA:provided">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/jboss/jboss-common-core/2.2.7.GA/jboss-common-core-2.2.7.GA.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
       <library name="M2 Dep: xml-apis:xml-apis:jar:1.3.03:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/xml-apis/xml-apis/1.3.03/xml-apis-1.3.03.jar!/" />
@@ -161,18 +226,18 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library">
-      <library name="M2 Dep: org.apache.jackrabbit:jackrabbit-api:jar:1.4:provided">
+      <library name="M2 Dep: javax.mail:mail:jar:1.4:compile">
         <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/apache/jackrabbit/jackrabbit-api/1.4/jackrabbit-api-1.4.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/mail/mail/1.4/mail-1.4.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES />
       </library>
     </orderEntry>
     <orderEntry type="module-library">
-      <library name="M2 Dep: javax.mail:mail:jar:1.4:compile">
+      <library name="M2 Dep: org.apache.jackrabbit:jackrabbit-api:jar:1.4:provided">
         <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/mail/mail/1.4/mail-1.4.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/apache/jackrabbit/jackrabbit-api/1.4/jackrabbit-api-1.4.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES />
@@ -215,27 +280,27 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library">
-      <library name="M2 Dep: com.google.gwt:gwt-user:jar:1.5.2:provided">
+      <library name="M2 Dep: org.apache.jackrabbit:jackrabbit-spi-commons:jar:1.4:provided">
         <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/google/gwt/gwt-user/1.5.2/gwt-user-1.5.2.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/apache/jackrabbit/jackrabbit-spi-commons/1.4/jackrabbit-spi-commons-1.4.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES />
       </library>
     </orderEntry>
     <orderEntry type="module-library">
-      <library name="M2 Dep: org.apache.jackrabbit:jackrabbit-spi-commons:jar:1.4:provided">
+      <library name="M2 Dep: com.sun.xml.bind:jaxb-impl:jar:2.1.2:compile">
         <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/apache/jackrabbit/jackrabbit-spi-commons/1.4/jackrabbit-spi-commons-1.4.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/sun/xml/bind/jaxb-impl/2.1.2/jaxb-impl-2.1.2.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES />
       </library>
     </orderEntry>
     <orderEntry type="module-library">
-      <library name="M2 Dep: com.sun.xml.bind:jaxb-impl:jar:2.1.2:compile">
+      <library name="M2 Dep: org.jboss.logging:jboss-logging-spi:jar:2.0.5.GA:provided">
         <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/sun/xml/bind/jaxb-impl/2.1.2/jaxb-impl-2.1.2.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES />
@@ -260,15 +325,6 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library">
-      <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:provided">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
       <library name="M2 Dep: concurrent:concurrent:jar:1.3.4:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar!/" />
@@ -296,15 +352,6 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library">
-      <library name="M2 Dep: junit:junit:jar:3.8.1:test">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
       <library name="M2 Dep: org.apache.ant:ant:jar:1.7.0:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar!/" />
@@ -332,15 +379,6 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library">
-      <library name="M2 Dep: com.google.gwt:gwt-dev:jar:mac:1.5.2:provided">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/google/gwt/gwt-dev/1.5.2/gwt-dev-1.5.2-mac.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
       <library name="M2 Dep: bsh:bsh:jar:1.3.0:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/bsh/bsh/1.3.0/bsh-1.3.0.jar!/" />
@@ -413,15 +451,6 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library">
-      <library name="M2 Dep: javax.activation:activation:jar:1.1:provided">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
       <library name="M2 Dep: com.sun.xml.fastinfoset:FastInfoset:jar:1.2.2:compile">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/sun/xml/fastinfoset/FastInfoset/1.2.2/FastInfoset-1.2.2.jar!/" />
@@ -520,15 +549,6 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
-      <library name="M2 Dep: com.gwtext:gwtext:jar:2.0.5:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/gwtext/gwtext/2.0.5/gwtext-2.0.5.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
     <orderEntryProperties />
   </component>
 </module>

Modified: projects/gwt-console/trunk/pom.xml
===================================================================
--- projects/gwt-console/trunk/pom.xml	2008-10-31 09:10:33 UTC (rev 2691)
+++ projects/gwt-console/trunk/pom.xml	2008-10-31 09:11:30 UTC (rev 2692)
@@ -1,156 +1,163 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <name>JBoss jBPM3 - GWT Console</name>
-    <groupId>org.jbpm.jbpm3</groupId>
-    <artifactId>gwt-console-parent</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
-    <packaging>pom</packaging>
+   <modelVersion>4.0.0</modelVersion>
+   <name>JBoss jBPM3 - GWT Console</name>
+   <groupId>org.jbpm.jbpm3</groupId>
+   <artifactId>gwt-console-parent</artifactId>
+   <version>1.0.0-SNAPSHOT</version>
+   <packaging>pom</packaging>
 
-    <!-- Parent -->
-    <parent>
-        <groupId>org.jbpm</groupId>
-        <artifactId>jbpm-parent</artifactId>
-        <version>1.0.0.GA</version>
-    </parent>
+   <!-- Parent -->
+   <parent>
+      <groupId>org.jbpm</groupId>
+      <artifactId>jbpm-parent</artifactId>
+      <version>1.0.0.GA</version>
+   </parent>
 
-    <properties>
-        <gwt.version>1.5.2</gwt.version>
-        <gchart.version>2.2</gchart.version>
-        <gwtext.version>2.0.5</gwtext.version>
-        <stax-api.version>1.0-2</stax-api.version>
-        <jaf.version>1.1</jaf.version>
-        <resteasy.version>1.0-beta-8</resteasy.version>
-        <gson.version>1.2.2</gson.version>
-        <commons.fileupload.version>1.2.1</commons.fileupload.version>
-        <commons.io.version>1.3.2</commons.io.version>
-        <jbpm.version>3.3.0-SNAPSHOT</jbpm.version>
-        <javax.jaxb.version>2.1</javax.jaxb.version>
-        <javax.ejb.version>3.0</javax.ejb.version>
-        <junit.version>3.8.1</junit.version>
-    </properties>
+   <properties>
+      <gwt.version>1.5.2</gwt.version>
+      <gchart.version>2.2</gchart.version>
+      <gwtext.version>2.0.5</gwtext.version>
+      <stax-api.version>1.0-2</stax-api.version>
+      <jaf.version>1.1</jaf.version>
+      <resteasy.version>1.0-beta-8</resteasy.version>
+      <gson.version>1.2.2</gson.version>
+      <commons.fileupload.version>1.2.1</commons.fileupload.version>
+      <commons.io.version>1.3.2</commons.io.version>
+      <jbpm.version>3.3.0-SNAPSHOT</jbpm.version>
+      <javax.jaxb.version>2.1</javax.jaxb.version>
+      <javax.ejb.version>3.0</javax.ejb.version>
+      <jboss.common.version>2.2.7.GA</jboss.common.version>
+      <junit.version>3.8.1</junit.version>
+   </properties>
 
-    <modules>
-        <module>rpc</module>
-        <module>server</module>
-        <module>war</module>
-    </modules>
+   <modules>
+      <module>rpc</module>
+      <module>server</module>
+      <module>war</module>
+   </modules>
 
-    <dependencyManagement>
-        <dependencies>
+   <dependencyManagement>
+      <dependencies>
 
-            <!-- JBPM -->
-            <dependency>
-                <groupId>org.jbpm.jbpm3</groupId>
-                <artifactId>jbpm-core</artifactId>
-                <scope>provided</scope>
-                <version>${jbpm.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.jbpm.jbpm3</groupId>
-                <artifactId>jbpm-enterprise-beans</artifactId>
-                <scope>provided</scope>
-                <version>${jbpm.version}</version>
-            </dependency>
+         <!-- JBPM -->
+         <dependency>
+            <groupId>org.jbpm.jbpm3</groupId>
+            <artifactId>jbpm-core</artifactId>
+            <scope>provided</scope>
+            <version>${jbpm.version}</version>
+         </dependency>
+         <dependency>
+            <groupId>org.jbpm.jbpm3</groupId>
+            <artifactId>jbpm-enterprise-beans</artifactId>
+            <scope>provided</scope>
+            <version>${jbpm.version}</version>
+         </dependency>
 
-            <!-- GET related -->
-            <dependency>
-                <groupId>com.google.gwt</groupId>
-                <artifactId>gwt-servlet</artifactId>
-                <version>${gwt.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>com.google.gwt</groupId>
-                <artifactId>gwt-user</artifactId>
-                <version>${gwt.version}</version>
-            </dependency>
+         <!-- GET related -->
+         <dependency>
+            <groupId>com.google.gwt</groupId>
+            <artifactId>gwt-servlet</artifactId>
+            <version>${gwt.version}</version>
+         </dependency>
+         <dependency>
+            <groupId>com.google.gwt</groupId>
+            <artifactId>gwt-user</artifactId>
+            <version>${gwt.version}</version>
+         </dependency>
 
-            <dependency>
-                <groupId>com.gwtext</groupId>
-                <artifactId>gwtext</artifactId>
-                <version>${gwtext.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>com.google.gwt</groupId>
-                <artifactId>gchart</artifactId>
-                <version>${gchart.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>com.google.code.gson</groupId>
-                <artifactId>gson</artifactId>
-                <version>${gson.version}</version>
-            </dependency>
+         <dependency>
+            <groupId>com.gwtext</groupId>
+            <artifactId>gwtext</artifactId>
+            <version>${gwtext.version}</version>
+         </dependency>
+         <dependency>
+            <groupId>com.google.gwt</groupId>
+            <artifactId>gchart</artifactId>
+            <version>${gchart.version}</version>
+         </dependency>
+         <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+            <version>${gson.version}</version>
+         </dependency>
 
-            <!-- Other -->
-            <dependency>
-                <groupId>javax.xml.stream</groupId>
-                <artifactId>stax-api</artifactId>
-                <version>${stax-api.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>javax.activation</groupId>
-                <artifactId>activation</artifactId>
-                <version>${jaf.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>javax.xml.bind</groupId>
-                <artifactId>jaxb-api</artifactId>
-                <version>${javax.jaxb.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>javax.ejb</groupId>
-                <artifactId>ejb-api</artifactId>
-                <version>${javax.ejb.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>junit</groupId>
-                <artifactId>junit</artifactId>
-                <version>${junit.version}</version>
-                <scope>test</scope>
-            </dependency>
-            <dependency>
-                <groupId>org.jboss.resteasy</groupId>
-                <artifactId>resteasy-jaxrs</artifactId>
-                <version>${resteasy.version}</version>
-            </dependency>
+         <!-- Other -->
+         <dependency>
+            <groupId>javax.xml.stream</groupId>
+            <artifactId>stax-api</artifactId>
+            <version>${stax-api.version}</version>
+         </dependency>
+         <dependency>
+            <groupId>javax.activation</groupId>
+            <artifactId>activation</artifactId>
+            <version>${jaf.version}</version>
+         </dependency>
+         <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+            <version>${javax.jaxb.version}</version>
+         </dependency>
+         <dependency>
+            <groupId>javax.ejb</groupId>
+            <artifactId>ejb-api</artifactId>
+            <version>${javax.ejb.version}</version>
+         </dependency>
+         <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>${junit.version}</version>
+            <scope>test</scope>
+         </dependency>
+         <dependency>
+            <groupId>org.jboss</groupId>
+            <artifactId>jboss-common-core</artifactId>
+            <version>${jboss.common.version}</version>
+            <scope>provided</scope>
+         </dependency>
+         <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-jaxrs</artifactId>
+            <version>${resteasy.version}</version>
+         </dependency>
 
-            <dependency>
-                <groupId>commons-fileupload</groupId>
-                <artifactId>commons-fileupload</artifactId>
-                <version>${commons.fileupload.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>commons-io</groupId>
-                <artifactId>commons-io</artifactId>
-                <version>${commons.io.version}</version>
-            </dependency>
+         <dependency>
+            <groupId>commons-fileupload</groupId>
+            <artifactId>commons-fileupload</artifactId>
+            <version>${commons.fileupload.version}</version>
+         </dependency>
+         <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>${commons.io.version}</version>
+         </dependency>
 
-        </dependencies>
-    </dependencyManagement>
+      </dependencies>
+   </dependencyManagement>
 
-    <!-- Repositories -->
-    <repositories>
-        <repository>
-            <id>repository.jboss.org</id>
-            <url>http://repository.jboss.org/maven2</url>
-        </repository>
-        <repository>
-            <id>snapshots.jboss.org</id>
-            <name>JBoss Snapshot Repository</name>
-            <url>http://snapshots.jboss.org/maven2</url>
-            <releases>
-                <enabled>false</enabled>
-            </releases>
-            <snapshots>
-                <enabled>true</enabled>
-            </snapshots>
-        </repository>
-    </repositories>
-    <pluginRepositories>
-        <pluginRepository>
-            <id>gwt-maven</id>
-            <url>http://gwt-maven.googlecode.com/svn/trunk/mavenrepo</url>
-        </pluginRepository>
-    </pluginRepositories>
+   <!-- Repositories -->
+   <repositories>
+      <repository>
+         <id>repository.jboss.org</id>
+         <url>http://repository.jboss.org/maven2</url>
+      </repository>
+      <repository>
+         <id>snapshots.jboss.org</id>
+         <name>JBoss Snapshot Repository</name>
+         <url>http://snapshots.jboss.org/maven2</url>
+         <releases>
+            <enabled>false</enabled>
+         </releases>
+         <snapshots>
+            <enabled>true</enabled>
+         </snapshots>
+      </repository>
+   </repositories>
+   <pluginRepositories>
+      <pluginRepository>
+         <id>gwt-maven</id>
+         <url>http://gwt-maven.googlecode.com/svn/trunk/mavenrepo</url>
+      </pluginRepository>
+   </pluginRepositories>
 
 </project>

Added: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/util/MapEntry.java
===================================================================
--- projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/util/MapEntry.java	                        (rev 0)
+++ projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/util/MapEntry.java	2008-10-31 09:11:30 UTC (rev 2692)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.bpm.console.client.model.util;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class MapEntry
+{
+   String name;
+   Object value;
+
+   public MapEntry(String name, Object value)
+   {
+      this.name = name;
+      this.value = value;
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   public Object getValue()
+   {
+      return value;
+   }
+}

Added: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/util/MapReplacement.java
===================================================================
--- projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/util/MapReplacement.java	                        (rev 0)
+++ projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/util/MapReplacement.java	2008-10-31 09:11:30 UTC (rev 2692)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.bpm.console.client.model.util;
+
+import java.util.List;
+
+/**
+ * Json Map serialization is a problem, hence the map replacement.
+ * 
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class MapReplacement
+{
+   String name;
+
+   List<MapEntry> entries;
+
+   public MapReplacement(String name, List<MapEntry> entries)
+   {
+      this.name = name;
+      this.entries = entries;
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   public List<MapEntry> getEntries()
+   {
+      return entries;
+   }
+}

Modified: projects/gwt-console/trunk/server/pom.xml
===================================================================
--- projects/gwt-console/trunk/server/pom.xml	2008-10-31 09:10:33 UTC (rev 2691)
+++ projects/gwt-console/trunk/server/pom.xml	2008-10-31 09:11:30 UTC (rev 2692)
@@ -6,7 +6,7 @@
    <modelVersion>4.0.0</modelVersion>
    <name>JBoss jBPM3 - GWT Console (Server)</name>
    <groupId>org.jbpm.jbpm3</groupId>
-   <artifactId>gwt-console-server</artifactId>  
+   <artifactId>gwt-console-server</artifactId>
    <packaging>war</packaging>
 
    <!-- Parent -->
@@ -30,12 +30,12 @@
       <dependency>
          <groupId>org.jbpm.jbpm3</groupId>
          <artifactId>jbpm-enterprise-beans</artifactId>
-         <scope>provided</scope>         
+         <scope>provided</scope>
       </dependency>
       <dependency>
          <groupId>org.jbpm.jbpm3</groupId>
          <artifactId>jbpm-core</artifactId>
-         <scope>provided</scope>        
+         <scope>provided</scope>
       </dependency>
 
       <!-- GWT related -->
@@ -46,7 +46,7 @@
       </dependency>
       <dependency>
          <groupId>com.google.gwt</groupId>
-         <artifactId>gwt-user</artifactId>         
+         <artifactId>gwt-user</artifactId>
          <scope>provided</scope>
       </dependency>
 
@@ -70,8 +70,13 @@
       </dependency>
       <dependency>
          <groupId>commons-io</groupId>
-         <artifactId>commons-io</artifactId>         
+         <artifactId>commons-io</artifactId>
       </dependency>
+      <dependency>
+         <groupId>org.jboss</groupId>
+         <artifactId>jboss-common-core</artifactId>
+         <scope>provided</scope>
+      </dependency>
    </dependencies>
 
    <build>

Modified: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/TaskManagement.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/TaskManagement.java	2008-10-31 09:10:33 UTC (rev 2691)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/TaskManagement.java	2008-10-31 09:11:30 UTC (rev 2692)
@@ -23,19 +23,19 @@
 
 import com.google.gson.Gson;
 import org.jboss.bpm.console.client.model.TaskReferenceWrapper;
+import org.jboss.bpm.console.client.model.util.MapEntry;
+import org.jboss.bpm.console.client.model.util.MapReplacement;
 import org.jboss.bpm.console.server.dao.DAOFactory;
 import org.jboss.bpm.console.server.dao.TaskDAO;
 import org.jboss.bpm.console.server.gson.GsonFactory;
 
 import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
+import javax.ws.rs.*;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.Response;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 import java.util.StringTokenizer;
 
 /**
@@ -66,10 +66,10 @@
    @Path("actor")
    @Produces("application/json")
    public Response getTasksForActor(
-     @Context
-     HttpServletRequest request,
-     @QueryParam("actors")
-     String actors
+         @Context
+         HttpServletRequest request,
+         @QueryParam("actors")
+         String actors
    )
    {
       List<String> actorList = new ArrayList<String>();
@@ -81,10 +81,49 @@
       }
 
       TaskReferenceWrapper wrapper =
-        new TaskReferenceWrapper(getTaskDAO(request).getTasksByActors(actorList));
+            new TaskReferenceWrapper(getTaskDAO(request).getTasksByActors(actorList));
       return createJsonResponse(wrapper);
    }
 
+   @GET
+   @Path("forms/{processId}")
+   @Produces("application/json")
+   public Response getTasksForms(
+         @Context
+         HttpServletRequest request,
+         @PathParam("processId")
+         long processId
+   )
+   {
+      Map<String,String> formMapping =
+            getTaskDAO(request).getAvailableTaskForms(processId);
+
+      List<MapEntry> entries = new ArrayList<MapEntry>();
+      for(String s : formMapping.keySet())
+      {
+         entries.add( new MapEntry(s, formMapping.get(s)) );
+      }
+
+      return createJsonResponse( new MapReplacement("formMapping", entries));
+   }
+
+   @GET
+   @Path("forms/{processId}/{taskId}")
+   @Produces("text/html")
+   public Response getTasksFormByTaskName(
+         @Context
+         HttpServletRequest request,
+         @PathParam("processId")
+         long processId,
+         @PathParam("taskId")
+         long taskId
+
+   )
+   {
+      byte[] form = getTaskDAO(request).getTaskFormByTaskName(processId, taskId);
+      return Response.ok(form).build();
+   }
+
    private Response createJsonResponse(Object wrapper)
    {
       Gson gson = GsonFactory.createInstance();

Modified: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/DiagramDAO.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/DiagramDAO.java	2008-10-31 09:10:33 UTC (rev 2691)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/DiagramDAO.java	2008-10-31 09:11:30 UTC (rev 2692)
@@ -26,6 +26,8 @@
 import org.jboss.bpm.console.server.dao.ProcessDAO;
 
 /**
+ * Proprietary to jBPM3, no sure if it will stay.
+ * 
  * @author Heiko.Braun <heiko.braun at jboss.com>
  */
 public interface DiagramDAO

Modified: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/TaskDAO.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/TaskDAO.java	2008-10-31 09:10:33 UTC (rev 2691)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/TaskDAO.java	2008-10-31 09:11:30 UTC (rev 2692)
@@ -24,6 +24,7 @@
 import org.jboss.bpm.console.client.model.TaskReference;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * @author Heiko.Braun <heiko.braun at jboss.com>
@@ -32,4 +33,6 @@
 {
    List<TaskReference> getTasksByActors(List<String> actorList);
    List<TaskReference> getTasksByInstanceId(long instanceId);
+   Map<String, String> getAvailableTaskForms(long processId);
+   byte[] getTaskFormByTaskName(long processId, long taskId);
 }

Modified: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/JBPM3CommandDelegate.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/JBPM3CommandDelegate.java	2008-10-31 09:10:33 UTC (rev 2691)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/JBPM3CommandDelegate.java	2008-10-31 09:11:30 UTC (rev 2692)
@@ -152,4 +152,11 @@
             facade.execute( new GetTaskListCommand(actorList.toArray(new String[]{})));
       return tasks;
    }
+
+   public TaskInstance getTaskById(long taskId)
+   {
+
+      // include variables, but no logs
+      return (TaskInstance) facade.execute( new GetTaskInstanceCommand(taskId, true, false));
+   }
 }

Modified: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/JBPM3TaskDAO.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/JBPM3TaskDAO.java	2008-10-31 09:10:33 UTC (rev 2691)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/JBPM3TaskDAO.java	2008-10-31 09:11:30 UTC (rev 2692)
@@ -21,11 +21,17 @@
  */
 package org.jboss.bpm.console.server.dao.internal;
 
+import org.jboss.bpm.console.client.model.TaskReference;
 import org.jboss.bpm.console.server.dao.TaskDAO;
-import org.jboss.bpm.console.client.model.TaskReference;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.file.def.FileDefinition;
+import org.jbpm.util.XmlUtil;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
 
-import java.util.List;
-import java.util.ArrayList;
+import java.util.*;
+import java.io.InputStream;
 
 /**
  * @author Heiko.Braun <heiko.braun at jboss.com>
@@ -35,7 +41,6 @@
 
    private JBPM3CommandDelegate delegate;
 
-
    public JBPM3TaskDAO()
    {
       this.delegate = new JBPM3CommandDelegate();
@@ -55,8 +60,67 @@
       return taskRefs;
    }
 
+   // TODO: If not requred please remove
    public List<TaskReference> getTasksByInstanceId(long instanceId)
    {
-      return null;  //To change body of implemented methods use File | Settings | File Templates.
+      throw new RuntimeException("Not implemented");
    }
+
+   public Map<String, String> getAvailableTaskForms(long processId)
+   {
+      org.jbpm.graph.def.ProcessDefinition processDefinition =
+                  delegate.getActualDefinition(processId);
+
+      return getTask2FileMapping(processDefinition);
+   }
+
+   private Map<String, String> getTask2FileMapping(ProcessDefinition processDefinition)
+   {
+      Map<String, String> result = new HashMap<String, String>();
+
+      final FileDefinition fileDefinition = processDefinition.getFileDefinition();
+      if (! fileDefinition.hasFile("forms.xml"))
+      {
+         // exit with empty list
+         // TODO: maybe an exception is better?
+         return result;
+      }
+
+      final InputStream inputStream = fileDefinition.getInputStream("forms.xml");
+      if (inputStream == null)
+      {
+         throw new RuntimeException("Failed to open stream on forms.xml");
+      }
+
+      final Document document = XmlUtil.parseXmlInputStream(inputStream);
+      final Element documentElement = document.getDocumentElement();
+      final NodeList nodeList = documentElement.getElementsByTagName("form");
+      final int length = nodeList.getLength();
+      for (int i = 0; i < length; i ++)
+      {
+         final Element element = (Element) nodeList.item(i);
+         final String itemTaskName = element.getAttribute("task");
+         final String itemFormName = element.getAttribute("form");
+         if (itemTaskName == null || itemFormName == null) {
+            continue;
+         }
+         result.put(itemTaskName, itemFormName);
+      }
+      return result;
+   }
+
+   public byte[] getTaskFormByTaskName(long processId, long taskId)
+   {
+      org.jbpm.graph.def.ProcessDefinition processDefinition =
+                       delegate.getActualDefinition(processId);
+      org.jbpm.taskmgmt.exe.TaskInstance t0 = delegate.getTaskById(taskId);
+
+      Map<String,String> fileMapping = getTask2FileMapping(processDefinition);
+      String fileName = fileMapping.get(t0.getName());
+      if(fileName !=null)
+         return processDefinition.getFileDefinition().getBytes(fileName);
+      else
+         throw new RuntimeException("No form definition for taskId '"+taskId+"'");
+      
+   }
 }

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java	2008-10-31 09:10:33 UTC (rev 2691)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java	2008-10-31 09:11:30 UTC (rev 2692)
@@ -25,6 +25,8 @@
 
 import java.util.List;
 import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
 
 import org.jboss.bpm.console.client.util.JSONWalk;
 
@@ -107,4 +109,13 @@
 
       return ref;
    }
+
+   public static Map<String,String> parseFormMapping(String json)
+   {
+      //{"Wait for money":"form.money.xhtml","Fix web order data":"form.fix.xhtml"}
+      Map<String,String> result = new HashMap<String,String>();
+
+      
+      return result;
+   }
 }




More information about the jbpm-commits mailing list