[jbpm-commits] JBoss JBPM SVN: r3954 - in projects/gwt-console/trunk: plugin-api and 13 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Feb 19 14:30:32 EST 2009


Author: heiko.braun at jboss.com
Date: 2009-02-19 14:30:32 -0500 (Thu, 19 Feb 2009)
New Revision: 3954

Added:
   projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/util/InvocationProxy.java
   projects/gwt-console/trunk/server/src/main/resources/process.jpdl.xml
Removed:
   projects/gwt-console/trunk/server/src/main/resources/SampleProcess.par
Modified:
   projects/gwt-console/trunk/gwt-parent.iml
   projects/gwt-console/trunk/plugin-api/plugin.iml
   projects/gwt-console/trunk/plugin-api/src/main/java/org/jboss/bpm/console/client/URLBuilder.java
   projects/gwt-console/trunk/plugin-api/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java
   projects/gwt-console/trunk/plugin-example/plugin-example.iml
   projects/gwt-console/trunk/pom.xml
   projects/gwt-console/trunk/rpc/gwt-rpc.iml
   projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/jbpm3/TokenReference.java
   projects/gwt-console/trunk/server-integration/gwt-server-integration.iml
   projects/gwt-console/trunk/server-integration/pom.xml
   projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/ProcessManagement.java
   projects/gwt-console/trunk/server/gwt-server.iml
   projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/ProcessMgmtFacade.java
   projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/TestFacade.java
   projects/gwt-console/trunk/war/gwt-war.iml
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceDetailForm.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java
Log:
More work on the process managent plugin for the console

Modified: projects/gwt-console/trunk/gwt-parent.iml
===================================================================
--- projects/gwt-console/trunk/gwt-parent.iml	2009-02-19 18:15:52 UTC (rev 3953)
+++ projects/gwt-console/trunk/gwt-parent.iml	2009-02-19 19:30:32 UTC (rev 3954)
@@ -39,15 +39,6 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: com.sun.xml.stream:sjsxp:jar:1.0.1:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/sun/xml/stream/sjsxp/1.0.1/sjsxp-1.0.1.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: javassist:javassist:jar:3.6.0.GA:compile">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javassist/javassist/3.6.0.GA/javassist-3.6.0.GA.jar!/" />
@@ -57,24 +48,6 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: org.jyaml:jyaml:jar:1.3:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/jyaml/jyaml/1.3/jyaml-1.3.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: org.jboss.resteasy:jaxrs-api:jar:1.0-beta-8:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/jboss/resteasy/jaxrs-api/1.0-beta-8/jaxrs-api-1.0-beta-8.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: com.google.gwt:gwt-user:jar:1.5.2:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/google/gwt/gwt-user/1.5.2/gwt-user-1.5.2.jar!/" />
@@ -140,15 +113,6 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library" exported="">
-      <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!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: javax.ejb:ejb-api:jar:3.0:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/ejb/ejb-api/3.0/ejb-api-3.0.jar!/" />
@@ -158,24 +122,6 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: org.codehaus.jettison:jettison:jar:1.0.1:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/codehaus/jettison/jettison/1.0.1/jettison-1.0.1.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: org.jboss.resteasy:resteasy-jaxrs:jar:1.0-beta-8:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/jboss/resteasy/resteasy-jaxrs/1.0-beta-8/resteasy-jaxrs-1.0-beta-8.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: org.scannotation:scannotation:jar:1.0.2:compile">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/scannotation/scannotation/1.0.2/scannotation-1.0.2.jar!/" />
@@ -314,6 +260,35 @@
         <SOURCES />
       </library>
     </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: org.jboss.resteasy:resteasy-jaxrs:jar:1.0.2.GA:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/jboss/resteasy/resteasy-jaxrs/1.0.2.GA/resteasy-jaxrs-1.0.2.GA.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: org.jboss.resteasy:jaxrs-api:jar:1.0.2.GA:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/jboss/resteasy/jaxrs-api/1.0.2.GA/jaxrs-api-1.0.2.GA.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: org.jboss.javaee:jboss-javaee:jar:5.0.0.GA:provided">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/jboss/javaee/jboss-javaee/5.0.0.GA/jboss-javaee-5.0.0.GA.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES>
+          <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/jboss/javaee/jboss-javaee/5.0.0.GA/jboss-javaee-5.0.0.GA-sources.jar!/" />
+        </SOURCES>
+      </library>
+    </orderEntry>
     <orderEntryProperties />
   </component>
 </module>

Modified: projects/gwt-console/trunk/plugin-api/plugin.iml
===================================================================
--- projects/gwt-console/trunk/plugin-api/plugin.iml	2009-02-19 18:15:52 UTC (rev 3953)
+++ projects/gwt-console/trunk/plugin-api/plugin.iml	2009-02-19 19:30:32 UTC (rev 3954)
@@ -10,7 +10,6 @@
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="module" module-name="gwt-parent" />
-    <orderEntry type="module" module-name="gwt-rpc" />
     <orderEntry type="module-library" exported="">
       <library name="M2 Dep: com.gwtext:gwtext:jar:2.0.5:compile">
         <CLASSES>
@@ -48,15 +47,6 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: com.google.gwt:gwt-servlet:jar:1.5.2:runtime">
-        <CLASSES>
-          <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" exported="">
       <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:compile">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/" />

Modified: projects/gwt-console/trunk/plugin-api/src/main/java/org/jboss/bpm/console/client/URLBuilder.java
===================================================================
--- projects/gwt-console/trunk/plugin-api/src/main/java/org/jboss/bpm/console/client/URLBuilder.java	2009-02-19 18:15:52 UTC (rev 3953)
+++ projects/gwt-console/trunk/plugin-api/src/main/java/org/jboss/bpm/console/client/URLBuilder.java	2009-02-19 19:30:32 UTC (rev 3954)
@@ -98,7 +98,7 @@
 
   public String getUploadDefinitionURL()
   {
-    return getConsoleServerUrl() + "/rs/jbpm3/definitions/new";
+    return getConsoleServerUrl() + "/rs/process/definitions/new";
   }
 
   public String getTaskListByActorURL(String actor)

Modified: projects/gwt-console/trunk/plugin-api/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java
===================================================================
--- projects/gwt-console/trunk/plugin-api/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java	2009-02-19 18:15:52 UTC (rev 3953)
+++ projects/gwt-console/trunk/plugin-api/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java	2009-02-19 19:30:32 UTC (rev 3954)
@@ -197,6 +197,10 @@
   {
     ConsoleLog.debug("parse " + root);
 
+    //  {"id":"StateSequence/8", "definitionId":"StateSequence:1",
+    // "startDate":"2009-02-19 14:36:50", "suspended":false}
+
+
     String id = JSONWalk.on(root).next("id").asString();
     String definitionId = JSONWalk.on(root).next("definitionId").asString();
     Date start = JSONWalk.on(root).next("startDate").asDate();
@@ -223,11 +227,12 @@
 
   public static TokenReference parseTokenReference(JSONObject jso)
   {
-    long rootTokenId = JSONWalk.on(jso).next("id").asLong();
-    String name = JSONWalk.on(jso).next("name").asString();
+    String rootTokenId = JSONWalk.on(jso).next("id").asString();
+    //String name = JSONWalk.on(jso).next("name").asString();
     String nodeName = JSONWalk.on(jso).next("currentNodeName").asString();
 
-    TokenReference rt = new TokenReference(rootTokenId, name, nodeName);
+    // TDOD: Fix token name
+    TokenReference rt = new TokenReference(rootTokenId, "", nodeName);
 
     boolean canBeSignaled = JSONWalk.on(jso).next("canBeSignaled").asBool();
     rt.setCanBeSignaled(canBeSignaled);

Modified: projects/gwt-console/trunk/plugin-example/plugin-example.iml
===================================================================
--- projects/gwt-console/trunk/plugin-example/plugin-example.iml	2009-02-19 18:15:52 UTC (rev 3953)
+++ projects/gwt-console/trunk/plugin-example/plugin-example.iml	2009-02-19 19:30:32 UTC (rev 3954)
@@ -9,7 +9,7 @@
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="module" module-name="plugin" exported="" />
+    <orderEntry type="module" module-name="gwt-parent" />
     <orderEntry type="module-library" exported="">
       <library name="M2 Dep: com.google.code.gson:gson:jar:1.2.2:provided">
         <CLASSES>
@@ -20,26 +20,6 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: com.google.gwt:gwt-servlet:jar:1.5.2:provided">
-        <CLASSES>
-          <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" exported="">
-      <library name="M2 Dep: org.jbpm.jbpm3:gwt-console-rpc:jar:1.0.0-SNAPSHOT:provided">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jbpm/jbpm3/gwt-console-rpc/1.0.0-SNAPSHOT/gwt-console-rpc-1.0.0-SNAPSHOT.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jbpm/jbpm3/gwt-console-rpc/1.0.0-SNAPSHOT/gwt-console-rpc-1.0.0-SNAPSHOT-sources.jar!/" />
-        </SOURCES>
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: com.gwtext:gwtext:jar:2.0.5:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/gwtext/gwtext/2.0.5/gwtext-2.0.5.jar!/" />
@@ -86,6 +66,15 @@
         </SOURCES>
       </library>
     </orderEntry>
+    <orderEntry type="module-library">
+      <library name="M2 Dep: com.google.gwt:gwt-user:jar:1.5.2:provided">
+        <CLASSES>
+          <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>
     <orderEntryProperties />
   </component>
 </module>

Modified: projects/gwt-console/trunk/pom.xml
===================================================================
--- projects/gwt-console/trunk/pom.xml	2009-02-19 18:15:52 UTC (rev 3953)
+++ projects/gwt-console/trunk/pom.xml	2009-02-19 19:30:32 UTC (rev 3954)
@@ -29,7 +29,7 @@
     <jboss.common.version>2.2.7.GA</jboss.common.version>
     <jbpm.version>3.3.1.GA</jbpm.version>
     <junit.version>3.8.1</junit.version>
-    <resteasy.version>1.0-beta-8</resteasy.version>
+    <resteasy.version>1.0.2.GA</resteasy.version>
     <stax-api.version>1.0-2</stax-api.version>
   </properties>
 

Modified: projects/gwt-console/trunk/rpc/gwt-rpc.iml
===================================================================
--- projects/gwt-console/trunk/rpc/gwt-rpc.iml	2009-02-19 18:15:52 UTC (rev 3953)
+++ projects/gwt-console/trunk/rpc/gwt-rpc.iml	2009-02-19 19:30:32 UTC (rev 3954)
@@ -36,15 +36,6 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: com.google.gwt:gwt-servlet:jar:1.5.2:runtime">
-        <CLASSES>
-          <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" exported="">
       <library name="M2 Dep: javax.xml.stream:stax-api:jar:1.0-2:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar!/" />

Modified: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/jbpm3/TokenReference.java
===================================================================
--- projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/jbpm3/TokenReference.java	2009-02-19 18:15:52 UTC (rev 3953)
+++ projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/jbpm3/TokenReference.java	2009-02-19 19:30:32 UTC (rev 3954)
@@ -33,7 +33,7 @@
 @XmlRootElement(name = "tokenReference")
 public class TokenReference
 {
-   private long id;
+   private String id;
    private String name;
 
    private String currentNodeName;
@@ -47,14 +47,14 @@
    {
    }
 
-   public TokenReference(long id, String name, String nodeName)
+   public TokenReference(String id, String name, String nodeName)
    {
       this.id = id;
       this.name = name!=null ? name : "";
       this.currentNodeName = nodeName;
    }
 
-   public void setId(long id)
+   public void setId(String id)
    {
       this.id = id;
    }
@@ -79,7 +79,7 @@
       this.availableSignals = availableSignals;
    }
 
-   public long getId()
+   public String getId()
    {
       return id;
    }
@@ -114,35 +114,4 @@
       this.canBeSignaled = canBeSignaled;
    }
 
-
-   public boolean equals(Object o)
-   {
-      if (this == o) return true;
-      if (o == null || getClass() != o.getClass()) return false;
-
-      TokenReference that = (TokenReference) o;
-
-      if (canBeSignaled != that.canBeSignaled) return false;
-      if (id != that.id) return false;
-      if (availableSignals != null ? !availableSignals.equals(that.availableSignals) : that.availableSignals != null)
-         return false;
-      if (children != null ? !children.equals(that.children) : that.children != null) return false;
-      if (currentNodeName != null ? !currentNodeName.equals(that.currentNodeName) : that.currentNodeName != null)
-         return false;
-      if (name != null ? !name.equals(that.name) : that.name != null) return false;
-
-      return true;
-   }
-
-   public int hashCode()
-   {
-      int result;
-      result = (int) (id ^ (id >>> 32));
-      result = 31 * result + (name != null ? name.hashCode() : 0);
-      result = 31 * result + (currentNodeName != null ? currentNodeName.hashCode() : 0);
-      result = 31 * result + (children != null ? children.hashCode() : 0);
-      result = 31 * result + (availableSignals != null ? availableSignals.hashCode() : 0);
-      result = 31 * result + (canBeSignaled ? 1 : 0);
-      return result;
-   }
 }

Modified: projects/gwt-console/trunk/server/gwt-server.iml
===================================================================
--- projects/gwt-console/trunk/server/gwt-server.iml	2009-02-19 18:15:52 UTC (rev 3953)
+++ projects/gwt-console/trunk/server/gwt-server.iml	2009-02-19 19:30:32 UTC (rev 3954)
@@ -11,8 +11,6 @@
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="module" module-name="gwt-parent" />
-    <orderEntry type="module" module-name="gwt-rpc" />
-    <orderEntry type="module" module-name="gwt-server-integration" />
     <orderEntry type="module-library" exported="">
       <library name="M2 Dep: org.slf4j:slf4j-simple:jar:1.5.2:compile">
         <CLASSES>
@@ -41,15 +39,6 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: com.sun.xml.stream:sjsxp:jar:1.0.1:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/sun/xml/stream/sjsxp/1.0.1/sjsxp-1.0.1.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: javassist:javassist:jar:3.6.0.GA:compile">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javassist/javassist/3.6.0.GA/javassist-3.6.0.GA.jar!/" />
@@ -59,24 +48,6 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: org.jyaml:jyaml:jar:1.3:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jyaml/jyaml/1.3/jyaml-1.3.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: org.jboss.resteasy:jaxrs-api:jar:1.0-beta-8:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/resteasy/jaxrs-api/1.0-beta-8/jaxrs-api-1.0-beta-8.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: com.google.gwt:gwt-user:jar:1.5.2:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/gwt/gwt-user/1.5.2/gwt-user-1.5.2.jar!/" />
@@ -133,15 +104,6 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library" exported="">
-      <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!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: javax.ejb:ejb-api:jar:3.0:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/ejb/ejb-api/3.0/ejb-api-3.0.jar!/" />
@@ -151,24 +113,6 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: org.codehaus.jettison:jettison:jar:1.0.1:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/codehaus/jettison/jettison/1.0.1/jettison-1.0.1.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: org.jboss.resteasy:resteasy-jaxrs:jar:1.0-beta-8:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/resteasy/resteasy-jaxrs/1.0-beta-8/resteasy-jaxrs-1.0-beta-8.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: com.google.code.gson:gson:jar:1.2.2:compile">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/code/gson/gson/1.2.2/gson-1.2.2.jar!/" />
@@ -186,7 +130,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: net.sf.ezmorph:ezmorph:jar:1.0.6:test">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/net/sf/ezmorph/ezmorph/1.0.6/ezmorph-1.0.6.jar!/" />
@@ -195,7 +139,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: net.sf.json-lib:json-lib:jar:2.2.3:test">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/net/sf/json-lib/json-lib/2.2.3/json-lib-2.2.3.jar!/" />
@@ -204,7 +148,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: commons-beanutils:commons-beanutils:jar:1.7.0:test">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar!/" />
@@ -215,7 +159,7 @@
         </SOURCES>
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <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!/" />
@@ -226,7 +170,7 @@
         </SOURCES>
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: commons-lang:commons-lang:jar:2.4:test">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar!/" />
@@ -235,7 +179,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: commons-collections:commons-collections:jar:3.2:test">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-collections/commons-collections/3.2/commons-collections-3.2.jar!/" />
@@ -244,7 +188,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <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!/" />
@@ -253,7 +197,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: javax.xml.stream:stax-api:jar:1.0-2:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar!/" />
@@ -262,7 +206,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: org.slf4j:slf4j-api:jar:1.5.2:compile">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/slf4j/slf4j-api/1.5.2/slf4j-api-1.5.2.jar!/" />
@@ -271,7 +215,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <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!/" />
@@ -280,6 +224,24 @@
         <SOURCES />
       </library>
     </orderEntry>
+    <orderEntry type="module-library">
+      <library name="M2 Dep: org.jboss.resteasy:resteasy-jaxrs:jar:1.0.2.GA:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/resteasy/resteasy-jaxrs/1.0.2.GA/resteasy-jaxrs-1.0.2.GA.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="M2 Dep: org.jboss.resteasy:jaxrs-api:jar:1.0.2.GA:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/resteasy/jaxrs-api/1.0.2.GA/jaxrs-api-1.0.2.GA.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
     <orderEntryProperties />
   </component>
 </module>

Modified: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/ProcessMgmtFacade.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/ProcessMgmtFacade.java	2009-02-19 18:15:52 UTC (rev 3953)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/ProcessMgmtFacade.java	2009-02-19 19:30:32 UTC (rev 3954)
@@ -23,9 +23,15 @@
 
 import javax.ws.rs.*;
 import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Context;
+import javax.servlet.http.HttpServletRequest;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.commons.fileupload.FileItemFactory;
+import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.fileupload.servlet.ServletFileUpload;
+import org.apache.commons.fileupload.disk.DiskFileItemFactory;
 import org.jboss.bpm.console.client.model.ProcessDefinitionRefWrapper;
 import org.jboss.bpm.console.client.model.ProcessInstanceRef;
 import org.jboss.bpm.console.client.model.ProcessInstanceRefWrapper;
@@ -35,6 +41,10 @@
 
 import com.google.gson.Gson;
 
+import java.util.Iterator;
+import java.util.List;
+import java.io.InputStream;
+
 /**
  * REST server module for accessing process related data.
  *
@@ -43,99 +53,153 @@
 @Path("process")
 public class ProcessMgmtFacade
 {
-   private static final Log log = LogFactory.getLog(ProcessMgmtFacade.class);
-   private ProcessManagement processManagement;
-   
-   private ProcessManagement getProcessManagement()
-   {
-      if(null==this.processManagement)
-      {
-         ManagementFactory factory = ManagementFactory.newInstance();
-         this.processManagement = factory.createProcessManagement();
-         log.debug("Using ManagementFactory impl:" + factory.getClass().getName());
-      }
+  private static final Log log = LogFactory.getLog(ProcessMgmtFacade.class);
+  private ProcessManagement processManagement;
 
-      return this.processManagement;
-   }
+  private ProcessManagement getProcessManagement()
+  {
+    if(null==this.processManagement)
+    {
+      ManagementFactory factory = ManagementFactory.newInstance();
+      this.processManagement = factory.createProcessManagement();
+      log.debug("Using ManagementFactory impl:" + factory.getClass().getName());
+    }
 
-   @GET
-   @Path("definitions")
-   @Produces("application/json")
-   public Response getDefinitionsJSON()
-   {
-      ProcessDefinitionRefWrapper wrapper =
-            new ProcessDefinitionRefWrapper(getProcessManagement().getProcessDefinitions());
-      return createJsonResponse(wrapper);
-   }
+    return this.processManagement;
+  }
 
-   @POST
-   @Path("definitions/{id}/remove")
-   @Produces("application/json")
-   public Response removeDefinitionsJSON(
-         @PathParam("id")
-         String processId
-   )
-   {
-      ProcessDefinitionRefWrapper wrapper =
-            new ProcessDefinitionRefWrapper( getProcessManagement().removeProcessDefinition(processId));
-      return createJsonResponse(wrapper);
-   }
+  @GET
+  @Path("definitions")
+  @Produces("application/json")
+  public Response getDefinitionsJSON()
+  {
+    ProcessDefinitionRefWrapper wrapper =
+        new ProcessDefinitionRefWrapper(getProcessManagement().getProcessDefinitions());
+    return createJsonResponse(wrapper);
+  }
 
-   @GET
-   @Path("definitions/{id}/instances")
-   @Produces("application/json")
-   public Response getInstancesJSON(
-         @PathParam("id")
-         String processId
-   )
-   {
+  @POST
+  @Path("definitions/{id}/remove")
+  @Produces("application/json")
+  public Response removeDefinitionsJSON(
+      @PathParam("id")
+      String processId
+  )
+  {
+    ProcessDefinitionRefWrapper wrapper =
+        new ProcessDefinitionRefWrapper( getProcessManagement().removeProcessDefinition(processId));
+    return createJsonResponse(wrapper);
+  }
 
-      ProcessInstanceRefWrapper wrapper =
-            new ProcessInstanceRefWrapper(getProcessManagement().getProcessInstances(processId));
-      return createJsonResponse(wrapper);
-   }
+  @GET
+  @Path("definitions/{id}/instances")
+  @Produces("application/json")
+  public Response getInstancesJSON(
+      @PathParam("id")
+      String processId
+  )
+  {
 
-   @POST
-   @Path("definitions/{id}/instances/new")
-   @Produces("application/json")
-   public Response newInstance(
-         @PathParam("id")
-         String processId)
-   {
+    ProcessInstanceRefWrapper wrapper =
+        new ProcessInstanceRefWrapper(getProcessManagement().getProcessInstances(processId));
+    return createJsonResponse(wrapper);
+  }
 
-     ProcessInstanceRef instance = null;
-     try
-     {
-       instance = getProcessManagement().newInstance(processId);
-       return createJsonResponse(instance);
-     }
-     catch (Throwable t)
-     {
-        throw new WebApplicationException(t, 500);
-     }
+  @POST
+  @Path("definitions/{id}/instances/new")
+  @Produces("application/json")
+  public Response newInstance(
+      @PathParam("id")
+      String processId)
+  {
 
-   }
+    ProcessInstanceRef instance = null;
+    try
+    {
+      instance = getProcessManagement().newInstance(processId);
+      return createJsonResponse(instance);
+    }
+    catch (Throwable t)
+    {
+      throw new WebApplicationException(t, 500);
+    }
 
-   @POST
-   @Path("instances/{id}/state/{next}")
-   @Produces("application/json")
-   public Response changeState(
-         @PathParam("id")
-         String instanceId,
-         @PathParam("next")
-         String next)
-   {
-      log.debug("Change instance (ID "+instanceId+") to state " +next);
+  }
 
-      ProcessInstanceRef.STATE state = ProcessInstanceRef.STATE.valueOf(next);
-      getProcessManagement().setProcessState(instanceId, state);
-      return Response.ok().type("application/json").build();
-   }
+  @POST
+  @Path("instances/{id}/state/{next}")
+  @Produces("application/json")
+  public Response changeState(
+      @PathParam("id")
+      String instanceId,
+      @PathParam("next")
+      String next)
+  {
+    log.debug("Change instance (ID "+instanceId+") to state " +next);
 
-   private Response createJsonResponse(Object wrapper)
-   {
-      Gson gson = GsonFactory.createInstance();
-      String json = gson.toJson(wrapper);
-      return Response.ok(json).type("application/json").build();
-   }
+    ProcessInstanceRef.STATE state = ProcessInstanceRef.STATE.valueOf(next);
+    getProcessManagement().setProcessState(instanceId, state);
+    return Response.ok().type("application/json").build();
+  }
+
+  @POST
+  @Path("definitions/new")
+  @Produces("application/json")
+  @Consumes("multipart/form-data")
+  public Response postNewDefinition(
+      @Context
+      HttpServletRequest request
+  )
+  {
+    try
+    {
+      FileItemFactory factory = new DiskFileItemFactory();
+      ServletFileUpload upload = new ServletFileUpload(factory);
+      List items = upload.parseRequest(request);
+
+      Iterator iter = items.iterator();
+      while (iter.hasNext())
+      {
+        FileItem item = (FileItem) iter.next();
+
+        if (item.isFormField())
+        {
+          // ignore
+          System.out.println("Caught form field on file upload: " + item.getName());
+        }
+        else
+        {
+          String fieldName = item.getFieldName();
+          String fileName = item.getName();
+          String contentType = item.getContentType();
+          boolean isInMemory = item.isInMemory();
+          long sizeInBytes = item.getSize();
+
+          // Process a file upload in memory
+          //byte[] data = item.get();
+
+          // Process stream
+          InputStream uploadedStream = item.getInputStream();
+          getProcessManagement().deploy(fileName, contentType, uploadedStream);
+          uploadedStream.close();
+
+
+        }
+
+      }
+    } catch (Exception e)
+    {
+      return Response.serverError().build();
+    }
+
+    return Response.ok().build();
+  }
+
+
+  private Response createJsonResponse(Object wrapper)
+  {
+    Gson gson = GsonFactory.createInstance();
+    String json = gson.toJson(wrapper);
+    return Response.ok(json).type("application/json").build();
+  }
 }

Modified: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/TestFacade.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/TestFacade.java	2009-02-19 18:15:52 UTC (rev 3953)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/TestFacade.java	2009-02-19 19:30:32 UTC (rev 3954)
@@ -46,7 +46,7 @@
   private static final Log log = LogFactory.getLog(TaskMgmtFacade.class);
 
   private ProcessManagement processManagement;
-  private static final String SAMPLE_PROCESS_PAR = "/SampleProcess.par";
+  private static final String SAMPLE_PROCESS_PAR = "/process.jpdl.xml";
 
   private ProcessManagement getProcessManagement()
   {
@@ -68,7 +68,7 @@
     if(null==in)
       throw new RuntimeException("Failed to read test deployment: " + SAMPLE_PROCESS_PAR);
 
-    getProcessManagement().deploy(in);
+    getProcessManagement().deploy("test.jpdl.xml", "text/xml", in);
     return Response.ok().build();
   }
 

Deleted: projects/gwt-console/trunk/server/src/main/resources/SampleProcess.par
===================================================================
(Binary files differ)

Added: projects/gwt-console/trunk/server/src/main/resources/process.jpdl.xml
===================================================================
--- projects/gwt-console/trunk/server/src/main/resources/process.jpdl.xml	                        (rev 0)
+++ projects/gwt-console/trunk/server/src/main/resources/process.jpdl.xml	2009-02-19 19:30:32 UTC (rev 3954)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process name="StateSequence" xmlns="http://jbpm.org/4/jpdl">
+
+  <start g="16,18,48,48">
+    <flow to="a" />
+  </start>
+
+  <state name="a" g="96,16,75,52">
+    <flow to="b" />
+  </state>
+
+  <state name="b" g="203,16,73,52">
+    <flow to="c" />
+  </state>
+
+  <state name="c" g="308,16,76,52" />
+
+</process>
\ No newline at end of file

Modified: projects/gwt-console/trunk/server-integration/gwt-server-integration.iml
===================================================================
--- projects/gwt-console/trunk/server-integration/gwt-server-integration.iml	2009-02-19 18:15:52 UTC (rev 3953)
+++ projects/gwt-console/trunk/server-integration/gwt-server-integration.iml	2009-02-19 19:30:32 UTC (rev 3954)
@@ -9,7 +9,7 @@
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="module" module-name="gwt-parent" />
-    <orderEntry type="module-library" exported="">
+    <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!/" />
@@ -18,7 +18,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library" exported="">
+    <orderEntry type="module-library">
       <library name="M2 Dep: javax.ejb:ejb-api:jar:3.0:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/ejb/ejb-api/3.0/ejb-api-3.0.jar!/" />
@@ -27,7 +27,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library" exported="">
+    <orderEntry type="module-library">
       <library name="M2 Dep: com.google.code.gson:gson:jar:1.2.2:compile">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/code/gson/gson/1.2.2/gson-1.2.2.jar!/" />
@@ -36,16 +36,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: com.google.gwt:gwt-servlet:jar:1.5.2:runtime">
-        <CLASSES>
-          <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" exported="">
+    <orderEntry type="module-library">
       <library name="M2 Dep: javax.xml.stream:stax-api:jar:1.0-2:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar!/" />
@@ -54,7 +45,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library" exported="">
+    <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!/" />
@@ -65,6 +56,17 @@
         </SOURCES>
       </library>
     </orderEntry>
+    <orderEntry type="module-library">
+      <library name="M2 Dep: org.jboss.javaee:jboss-javaee:jar:5.0.0.GA:provided">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/javaee/jboss-javaee/5.0.0.GA/jboss-javaee-5.0.0.GA.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/javaee/jboss-javaee/5.0.0.GA/jboss-javaee-5.0.0.GA-sources.jar!/" />
+        </SOURCES>
+      </library>
+    </orderEntry>
     <orderEntryProperties />
   </component>
 </module>

Modified: projects/gwt-console/trunk/server-integration/pom.xml
===================================================================
--- projects/gwt-console/trunk/server-integration/pom.xml	2009-02-19 18:15:52 UTC (rev 3953)
+++ projects/gwt-console/trunk/server-integration/pom.xml	2009-02-19 19:30:32 UTC (rev 3954)
@@ -31,7 +31,15 @@
       <groupId>javax.xml.bind</groupId>
       <artifactId>jaxb-api</artifactId>
       <scope>provided</scope>
-    </dependency>   
+    </dependency>
+
+    <dependency>
+      <groupId>org.jboss.javaee</groupId>
+      <artifactId>jboss-javaee</artifactId>
+      <version>5.0.0.GA</version>
+      <scope>provided</scope>
+    </dependency>
+    
   </dependencies>
 
   <build>

Modified: projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/ProcessManagement.java
===================================================================
--- projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/ProcessManagement.java	2009-02-19 18:15:52 UTC (rev 3953)
+++ projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/ProcessManagement.java	2009-02-19 19:30:32 UTC (rev 3954)
@@ -50,5 +50,5 @@
 
   void signalToken(long tokenId, String signal);
 
-  void deploy(InputStream deployment);
+  void deploy(String fileName, String contentType, InputStream deployment);
 }

Added: projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/util/InvocationProxy.java
===================================================================
--- projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/util/InvocationProxy.java	                        (rev 0)
+++ projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/util/InvocationProxy.java	2009-02-19 19:30:32 UTC (rev 3954)
@@ -0,0 +1,91 @@
+/*
+ * 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.server.util;
+
+import javax.transaction.UserTransaction;
+import javax.transaction.SystemException;
+import javax.naming.InitialContext;
+import java.lang.reflect.Method;
+
+/**
+ * Decorates process engine invocations with common system aspects, i.e. transaction demarcation.
+ *
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class InvocationProxy implements java.lang.reflect.InvocationHandler
+{
+  private Object obj;
+
+  public static Object newInstance(Object obj) {
+    return java.lang.reflect.Proxy.newProxyInstance(
+        obj.getClass().getClassLoader(),
+        obj.getClass().getInterfaces(),
+        new InvocationProxy(obj));
+  }
+
+  private InvocationProxy(Object obj) {
+    this.obj = obj;
+  }
+
+  public Object invoke(Object proxy, Method m, Object[] args)
+      throws Throwable
+  {
+    Object result;
+
+    InitialContext ctx = new InitialContext();
+    UserTransaction tx = (UserTransaction)ctx.lookup("UserTransaction");
+    
+
+    try
+    {
+      // before method invocation
+      tx.begin();
+
+      // field target invocation
+      result = m.invoke(obj, args);
+
+      tx.commit();
+
+    }
+    catch (Exception e)
+    {
+      if(tx!=null)
+      {
+        try
+        {
+          tx.rollback();
+        }
+        catch (SystemException e1) {}
+      }
+
+      throw new RuntimeException("Unexpected invocation exception: " + e.getMessage(), e);
+
+    }
+    finally
+    {
+      // after method invocation
+
+    }
+
+    return result;
+  }
+}
\ No newline at end of file

Modified: projects/gwt-console/trunk/war/gwt-war.iml
===================================================================
--- projects/gwt-console/trunk/war/gwt-war.iml	2009-02-19 18:15:52 UTC (rev 3953)
+++ projects/gwt-console/trunk/war/gwt-war.iml	2009-02-19 19:30:32 UTC (rev 3954)
@@ -12,7 +12,7 @@
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="module" module-name="gwt-parent" />
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:compile">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/" />
@@ -21,7 +21,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <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!/" />
@@ -30,7 +30,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: com.google.code.gson:gson:jar:1.2.2:compile">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/code/gson/gson/1.2.2/gson-1.2.2.jar!/" />
@@ -39,7 +39,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <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!/" />
@@ -48,7 +48,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: com.google.gwt:gwt-user:jar:1.5.2:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/gwt/gwt-user/1.5.2/gwt-user-1.5.2.jar!/" />
@@ -57,7 +57,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: com.google.gwt:gwt-servlet:jar:1.5.2:runtime">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/gwt/gwt-servlet/1.5.2/gwt-servlet-1.5.2.jar!/" />
@@ -66,7 +66,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: javax.xml.stream:stax-api:jar:1.0-2:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar!/" />
@@ -75,7 +75,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <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!/" />
@@ -86,7 +86,7 @@
         </SOURCES>
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: com.google.code.gwt-log:gwt-log:jar:2.5.2:compile">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/code/gwt-log/gwt-log/2.5.2/gwt-log-2.5.2.jar!/" />
@@ -95,7 +95,7 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module-library">
+    <orderEntry type="module-library" exported="">
       <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!/" />
@@ -104,7 +104,6 @@
         <SOURCES />
       </library>
     </orderEntry>
-    <orderEntry type="module" module-name="gwt-rpc" />
     <orderEntryProperties />
   </component>
 </module>

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceDetailForm.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceDetailForm.java	2009-02-19 18:15:52 UTC (rev 3953)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceDetailForm.java	2009-02-19 19:30:32 UTC (rev 3954)
@@ -72,7 +72,7 @@
 
     // ---------------
 
-    TextField idField = new TextField("Id", "instanceId", 230);
+    TextField idField = new TextField("Id", "id", 230);
     idField.setReadOnly(true);
     detailsForm.add(idField);
     TextField keyField = new TextField("Key", "key", 230);
@@ -86,6 +86,7 @@
     detailsForm.add(startDateField);
     //detailsForm.add(new DateField("End Date", "endDate", 230));
 
+
     suspendButton = new Button("Suspend",
         new ButtonListenerAdapter()
         {
@@ -109,6 +110,13 @@
         }
     );
 
+
+    // hide buttons
+    // https://jira.jboss.org/jira/browse/JBPM-2052
+
+    suspendButton.hide();
+    resumeButton.hide();
+    
     detailsForm.addButton(suspendButton);
     detailsForm.addButton(resumeButton);
 

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java	2009-02-19 18:15:52 UTC (rev 3953)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java	2009-02-19 19:30:32 UTC (rev 3954)
@@ -74,7 +74,14 @@
     if (editor.hasView(id))
       editor.showView(id);
     else
-      editor.addView(new ProcessInstanceView(parent, instance, view), true);
+      try
+      {
+        editor.addView(new ProcessInstanceView(parent, instance, view), true);
+      }
+      catch (Throwable t)
+      {
+        t.printStackTrace();  
+      }
   }
 
   public void onDelete(final int row)
@@ -215,7 +222,7 @@
     final ColumnModel columnModel = new ColumnModel(
         new ColumnConfig[]
             {
-                new ColumnConfig("Instance ID", "instanceId", 75, true),
+                new ColumnConfig("Instance ID", "id", 75, true),
                 //new ColumnConfig("Process ID", "parentId", 25, true),
                 //new ColumnConfig("Key", "key", 50, true),
                 new ColumnConfig("State", "state", 100, true,
@@ -240,7 +247,7 @@
   {
     final RecordDef recordDef = new RecordDef(
         new FieldDef[]{
-            new StringFieldDef("instanceId"),
+            new StringFieldDef("id"),
             new StringFieldDef("definitionId"),
             new StringFieldDef("key"),
             new StringFieldDef("state"),
@@ -253,7 +260,7 @@
     final JsonReader reader = new JsonReader(recordDef);
     reader.setRoot("instances");
     reader.setTotalProperty("totalCount");
-    reader.setId("instanceId");
+    reader.setId("id");
 
     return reader;
   }




More information about the jbpm-commits mailing list