[jbpm-commits] JBoss JBPM SVN: r3020 - in projects/gwt-console/trunk: server and 11 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Nov 21 05:30:26 EST 2008


Author: heiko.braun at jboss.com
Date: 2008-11-21 05:30:25 -0500 (Fri, 21 Nov 2008)
New Revision: 3020

Added:
   projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionRef.java
   projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionRefWrapper.java
   projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstanceRef.java
   projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstanceRefWrapper.java
   projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/RoleAssignmentRef.java
   projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/RoleAssignmentRefWrapper.java
   projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/TaskRef.java
   projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/TaskRefWrapper.java
Removed:
   projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinition.java
   projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionWrapper.java
   projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstance.java
   projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstanceWrapper.java
   projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/RoleAssignment.java
   projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/RoleAssignmentWrapper.java
   projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/TaskReference.java
   projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/TaskReferenceWrapper.java
Modified:
   projects/gwt-console/trunk/server/SQL.txt
   projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/JBPM3MgmtFacade.java
   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/TaskMgmtFacade.java
   projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/UserMgmtFacade.java
   projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/JBPM3Extension.java
   projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/ProcessManagement.java
   projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/TaskManagement.java
   projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/JBPM3ManagementExtension.java
   projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/JBPM3ProcessManagement.java
   projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/JBPM3TaskManagement.java
   projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/Transform.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/URLBuilder.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/DefinitionMetricEditor.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/DefinitionMetricView.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/MetricOverview.java
   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/ProcessDefinitionDAO.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/internal/MockMetricsDAO.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/internal/MockProcessDefinitionDAO.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/internal/MockProcessInstanceDAO.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessImageView.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceEditor.java
   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/ProcessInstanceListEditor.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/TokenEditor.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/TokenForm.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/AssignmentFormPanel.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskDetailsFormPanel.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskList.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskListEditor.java
   projects/gwt-console/trunk/war/src/main/resources/org/jboss/bpm/console/public/Application.html
   projects/gwt-console/trunk/war/src/test/java/org/jboss/bpm/console/client/GwtTestDTOParser.java
Log:
Rename GWT model elements to avoid naming conflicts

Deleted: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinition.java
===================================================================
--- projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinition.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinition.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -1,86 +0,0 @@
-/*
- * 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;
-
-import com.google.gwt.user.client.rpc.IsSerializable;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
- at XmlRootElement(name="processDefinition")
-public class ProcessDefinition implements IsSerializable
-{
-   private long processId;
-   private String name;
-   private String version;
-
-   public ProcessDefinition()
-   {
-   }
-
-   public ProcessDefinition(long id, String name, String version)
-   {
-      this.processId = id;
-      this.name = name;
-      this.version = version;
-   }
-
-   @XmlElement(name = "processId")
-   public long getProcessId()
-   {
-      return processId;
-   }
-
-   public void setProcessId(long processId)
-   {
-      this.processId = processId;
-   }
-
-   @XmlElement(name = "name")
-   public String getName()
-   {
-      return name;
-   }
-
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-
-   public String getVersion()
-   {
-      return version;
-   }
-
-   public void setVersion(String version)
-   {
-      this.version = version;
-   }
-
-   public String toString()
-   {
-      return "ProcessDefinition{id="+this.processId +", name="+this.name+"}";
-   }
-}

Copied: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionRef.java (from rev 2755, projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinition.java)
===================================================================
--- projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionRef.java	                        (rev 0)
+++ projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionRef.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -0,0 +1,86 @@
+/*
+ * 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;
+
+import com.google.gwt.user.client.rpc.IsSerializable;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+ at XmlRootElement(name="processDefinition")
+public class ProcessDefinitionRef implements IsSerializable
+{
+   private long processId;
+   private String name;
+   private String version;
+
+   public ProcessDefinitionRef()
+   {
+   }
+
+   public ProcessDefinitionRef(long id, String name, String version)
+   {
+      this.processId = id;
+      this.name = name;
+      this.version = version;
+   }
+
+   @XmlElement(name = "processId")
+   public long getProcessId()
+   {
+      return processId;
+   }
+
+   public void setProcessId(long processId)
+   {
+      this.processId = processId;
+   }
+
+   @XmlElement(name = "name")
+   public String getName()
+   {
+      return name;
+   }
+
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+
+   public String getVersion()
+   {
+      return version;
+   }
+
+   public void setVersion(String version)
+   {
+      this.version = version;
+   }
+
+   public String toString()
+   {
+      return "ProcessDefinitionRef{id="+this.processId +", name="+this.name+"}";
+   }
+}


Property changes on: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionRef.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Copied: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionRefWrapper.java (from rev 2755, projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionWrapper.java)
===================================================================
--- projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionRefWrapper.java	                        (rev 0)
+++ projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionRefWrapper.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -0,0 +1,57 @@
+/*
+ * 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;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+ at XmlRootElement(name = "wrapper")
+public class ProcessDefinitionRefWrapper
+{
+
+   List<ProcessDefinitionRef> definitions;
+
+   public ProcessDefinitionRefWrapper()
+   {
+   }
+
+   public ProcessDefinitionRefWrapper(List<ProcessDefinitionRef> defs)
+   {
+      this.definitions = defs;
+   }
+
+   @XmlElement
+   public List<ProcessDefinitionRef> getDefinitions()
+   {
+      return definitions;
+   }
+
+   @XmlElement(name = "totalCount")
+   public int getTotalCount()
+   {
+      return definitions.size();
+   }
+}


Property changes on: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionRefWrapper.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Deleted: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionWrapper.java
===================================================================
--- projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionWrapper.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionWrapper.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -1,57 +0,0 @@
-/*
- * 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;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.List;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
- at XmlRootElement(name = "wrapper")
-public class ProcessDefinitionWrapper
-{
-
-   List<ProcessDefinition> definitions;
-
-   public ProcessDefinitionWrapper()
-   {
-   }
-
-   public ProcessDefinitionWrapper(List<ProcessDefinition> defs)
-   {
-      this.definitions = defs;
-   }
-
-   @XmlElement
-   public List<ProcessDefinition> getDefinitions()
-   {
-      return definitions;
-   }
-
-   @XmlElement(name = "totalCount")
-   public int getTotalCount()
-   {
-      return definitions.size();
-   }
-}

Deleted: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstance.java
===================================================================
--- projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstance.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstance.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -1,261 +0,0 @@
-/*
- * 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;
-
-
-import org.jboss.bpm.console.client.model.jbpm3.TokenReference;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.Date;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
- at XmlRootElement(name="processInstance")
-public class ProcessInstance
-{
-   private long instanceId;
-   private long parentId;
-
-   private String key;
-   public enum STATE {RUNNING, SUSPENDED, ENDED};
-
-   private Date startDate;
-   private Date endDate;
-
-   private boolean suspended;
-
-   private STATE state;  // gson is field based, hence why...
-
-   private transient Lifecycle lifecycle;
-
-   private TokenReference rootToken;
-
-   public ProcessInstance()
-   {
-      initLifecycle();
-   }
-
-   public ProcessInstance(long id, long parentId, Date startDate, Date endDate, boolean suspended)
-   {
-
-      if(null==startDate)
-         throw new IllegalArgumentException("An instance requires a start date");
-      
-      if(endDate!=null && suspended)
-         throw new IllegalArgumentException("An instance cannot be ended and suspended at the same time");
-
-      this.instanceId = id;
-      this.parentId = parentId;
-      this.startDate = startDate;
-      this.endDate = endDate;
-      this.suspended = suspended;
-      initLifecycle();
-   }
-
-   /**
-    * If not ENDED or SUSPENDED the instance is RUNNING
-    */
-   private void initLifecycle()
-   {
-      if(hasEnded())
-         this.lifecycle = new Lifecycle(this, STATE.ENDED);
-      else if(isSuspended())
-         this.lifecycle = new Lifecycle(this, STATE.SUSPENDED);
-      else
-         this.lifecycle = new Lifecycle(this, STATE.RUNNING);
-
-      this.state = lifecycle.getState();
-   }
-
-   @XmlElement(name = "instanceId")
-   public long getInstanceId()
-   {
-      return instanceId;
-   }
-
-   public void setInstanceId(long instanceId)
-   {
-      this.instanceId = instanceId;
-   }
-
-   @XmlElement(name = "parentId")
-   public long getParentId()
-   {
-      return parentId;
-   }
-
-   public void setParentId(long parentId)
-   {
-      this.parentId = parentId;
-   }
-
-   @XmlElement(name = "key")
-   public String getKey()
-   {
-      return key !=null ? key : "";
-   }
-
-   public void setKey(String key)
-   {
-      this.key = key;
-   }
-
-   @XmlElement(name = "status")
-   public STATE getState()
-   {
-      return this.state;
-   }
-
-   public void setState(String nextState)
-   {
-      setState(STATE.valueOf(nextState));
-   }
-
-   public void setState(STATE nextState)
-   {
-      this.lifecycle = this.lifecycle.transitionTo(nextState);
-      this.state = this.lifecycle.getState();
-   }
-
-   @XmlElement(name = "start")
-   public Date getStartDate()
-   {
-      return startDate;
-   }
-
-   public void setStartDate(Date startDate)
-   {
-      this.startDate = startDate;
-   }
-
-   @XmlElement(name = "end")
-   public Date getEndDate()
-   {
-      return endDate;
-   }
-
-   public void setEndDate(Date endDate)
-   {
-      this.endDate = endDate;
-   }
-
-   public boolean isRunning()
-   {
-      return this.startDate!=null && !isSuspended();
-   }
-
-   public boolean hasEnded()
-   {
-      return this.startDate!=null
-        && this.endDate!=null;
-   }
-
-   public boolean isSuspended()
-   {
-      return null==this.endDate && suspended;
-   }
-   
-   private class Lifecycle
-   {
-      private STATE current;
-      private ProcessInstance instance;
-
-      public Lifecycle(ProcessInstance instance, STATE current)
-      {
-         this.instance = instance;
-         this.current = current;
-      }
-
-      public Lifecycle transitionTo(STATE next)
-      {
-         Lifecycle nextLifecycle = null;
-
-         switch(next)
-         {            
-            case SUSPENDED: // only RUNNING instances can be SUSPENDED
-               if(STATE.RUNNING.equals(current))
-               {
-                  nextLifecycle = new Lifecycle(instance, next);
-                  instance.suspended = true;
-                  break;
-               }
-               else
-               {
-                  throw new IllegalTransitionException(current, next);
-               }
-            case ENDED: // both RUNNING and SUSPENDED instances can be ENDED
-               if(STATE.RUNNING.equals(current) || STATE.SUSPENDED.equals(current))
-               {
-                  nextLifecycle =  new Lifecycle(instance, next);
-                  instance.suspended = false;
-                  instance.endDate = new Date();
-                  break;
-               }
-               else
-               {
-                  throw new IllegalTransitionException(current, next);
-               }
-            case RUNNING: // only SUSPENDED instances can become RUNNING
-               if(STATE.SUSPENDED.equals(current))
-               {
-                  nextLifecycle =  new Lifecycle(instance, next);
-                  instance.suspended = false;                  
-                  break;
-               }
-               else
-               {
-                  throw new IllegalTransitionException(current, next);
-               }
-            default:
-               throw new IllegalTransitionException(current, next);
-         }
-
-         return nextLifecycle;
-      }
-
-      public STATE getState()
-      {
-         return current;
-      }
-   }
-
-   private class IllegalTransitionException extends IllegalArgumentException
-   {
-
-      public IllegalTransitionException(STATE current, STATE next)
-      {
-         super("Illegal transition current " + current + " next " + next);
-      }
-   }
-
-   public TokenReference getRootToken()
-   {
-      return rootToken;
-   }
-
-   public void setRootToken(TokenReference rootToken)
-   {
-      this.rootToken = rootToken;
-   }
-}

Copied: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstanceRef.java (from rev 2892, projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstance.java)
===================================================================
--- projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstanceRef.java	                        (rev 0)
+++ projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstanceRef.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -0,0 +1,261 @@
+/*
+ * 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;
+
+
+import org.jboss.bpm.console.client.model.jbpm3.TokenReference;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Date;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+ at XmlRootElement(name="processInstance")
+public class ProcessInstanceRef
+{
+   private long instanceId;
+   private long parentId;
+
+   private String key;
+   public enum STATE {RUNNING, SUSPENDED, ENDED};
+
+   private Date startDate;
+   private Date endDate;
+
+   private boolean suspended;
+
+   private STATE state;  // gson is field based, hence why...
+
+   private transient Lifecycle lifecycle;
+
+   private TokenReference rootToken;
+
+   public ProcessInstanceRef()
+   {
+      initLifecycle();
+   }
+
+   public ProcessInstanceRef(long id, long parentId, Date startDate, Date endDate, boolean suspended)
+   {
+
+      if(null==startDate)
+         throw new IllegalArgumentException("An instance requires a start date");
+      
+      if(endDate!=null && suspended)
+         throw new IllegalArgumentException("An instance cannot be ended and suspended at the same time");
+
+      this.instanceId = id;
+      this.parentId = parentId;
+      this.startDate = startDate;
+      this.endDate = endDate;
+      this.suspended = suspended;
+      initLifecycle();
+   }
+
+   /**
+    * If not ENDED or SUSPENDED the instance is RUNNING
+    */
+   private void initLifecycle()
+   {
+      if(hasEnded())
+         this.lifecycle = new Lifecycle(this, STATE.ENDED);
+      else if(isSuspended())
+         this.lifecycle = new Lifecycle(this, STATE.SUSPENDED);
+      else
+         this.lifecycle = new Lifecycle(this, STATE.RUNNING);
+
+      this.state = lifecycle.getState();
+   }
+
+   @XmlElement(name = "instanceId")
+   public long getInstanceId()
+   {
+      return instanceId;
+   }
+
+   public void setInstanceId(long instanceId)
+   {
+      this.instanceId = instanceId;
+   }
+
+   @XmlElement(name = "parentId")
+   public long getParentId()
+   {
+      return parentId;
+   }
+
+   public void setParentId(long parentId)
+   {
+      this.parentId = parentId;
+   }
+
+   @XmlElement(name = "key")
+   public String getKey()
+   {
+      return key !=null ? key : "";
+   }
+
+   public void setKey(String key)
+   {
+      this.key = key;
+   }
+
+   @XmlElement(name = "status")
+   public STATE getState()
+   {
+      return this.state;
+   }
+
+   public void setState(String nextState)
+   {
+      setState(STATE.valueOf(nextState));
+   }
+
+   public void setState(STATE nextState)
+   {
+      this.lifecycle = this.lifecycle.transitionTo(nextState);
+      this.state = this.lifecycle.getState();
+   }
+
+   @XmlElement(name = "start")
+   public Date getStartDate()
+   {
+      return startDate;
+   }
+
+   public void setStartDate(Date startDate)
+   {
+      this.startDate = startDate;
+   }
+
+   @XmlElement(name = "end")
+   public Date getEndDate()
+   {
+      return endDate;
+   }
+
+   public void setEndDate(Date endDate)
+   {
+      this.endDate = endDate;
+   }
+
+   public boolean isRunning()
+   {
+      return this.startDate!=null && !isSuspended();
+   }
+
+   public boolean hasEnded()
+   {
+      return this.startDate!=null
+        && this.endDate!=null;
+   }
+
+   public boolean isSuspended()
+   {
+      return null==this.endDate && suspended;
+   }
+   
+   private class Lifecycle
+   {
+      private STATE current;
+      private ProcessInstanceRef instance;
+
+      public Lifecycle(ProcessInstanceRef instance, STATE current)
+      {
+         this.instance = instance;
+         this.current = current;
+      }
+
+      public Lifecycle transitionTo(STATE next)
+      {
+         Lifecycle nextLifecycle = null;
+
+         switch(next)
+         {            
+            case SUSPENDED: // only RUNNING instances can be SUSPENDED
+               if(STATE.RUNNING.equals(current))
+               {
+                  nextLifecycle = new Lifecycle(instance, next);
+                  instance.suspended = true;
+                  break;
+               }
+               else
+               {
+                  throw new IllegalTransitionException(current, next);
+               }
+            case ENDED: // both RUNNING and SUSPENDED instances can be ENDED
+               if(STATE.RUNNING.equals(current) || STATE.SUSPENDED.equals(current))
+               {
+                  nextLifecycle =  new Lifecycle(instance, next);
+                  instance.suspended = false;
+                  instance.endDate = new Date();
+                  break;
+               }
+               else
+               {
+                  throw new IllegalTransitionException(current, next);
+               }
+            case RUNNING: // only SUSPENDED instances can become RUNNING
+               if(STATE.SUSPENDED.equals(current))
+               {
+                  nextLifecycle =  new Lifecycle(instance, next);
+                  instance.suspended = false;                  
+                  break;
+               }
+               else
+               {
+                  throw new IllegalTransitionException(current, next);
+               }
+            default:
+               throw new IllegalTransitionException(current, next);
+         }
+
+         return nextLifecycle;
+      }
+
+      public STATE getState()
+      {
+         return current;
+      }
+   }
+
+   private class IllegalTransitionException extends IllegalArgumentException
+   {
+
+      public IllegalTransitionException(STATE current, STATE next)
+      {
+         super("Illegal transition current " + current + " next " + next);
+      }
+   }
+
+   public TokenReference getRootToken()
+   {
+      return rootToken;
+   }
+
+   public void setRootToken(TokenReference rootToken)
+   {
+      this.rootToken = rootToken;
+   }
+}


Property changes on: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstanceRef.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Copied: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstanceRefWrapper.java (from rev 2755, projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstanceWrapper.java)
===================================================================
--- projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstanceRefWrapper.java	                        (rev 0)
+++ projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstanceRefWrapper.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -0,0 +1,57 @@
+/*
+ * 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;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+ at XmlRootElement(name = "wrapper")
+public class ProcessInstanceRefWrapper
+{
+
+   List<ProcessInstanceRef> instances;
+
+   public ProcessInstanceRefWrapper()
+   {
+   }
+
+   public ProcessInstanceRefWrapper(List<ProcessInstanceRef> instances)
+   {
+      this.instances = instances;
+   }
+
+   @XmlElement
+   public List<ProcessInstanceRef> getInstances()
+   {
+      return instances;
+   }
+
+   @XmlElement(name = "totalCount")
+   public int getTotalCount()
+   {
+      return instances.size();
+   }
+}


Property changes on: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstanceRefWrapper.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Deleted: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstanceWrapper.java
===================================================================
--- projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstanceWrapper.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstanceWrapper.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -1,57 +0,0 @@
-/*
- * 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;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.List;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
- at XmlRootElement(name = "wrapper")
-public class ProcessInstanceWrapper
-{
-
-   List<ProcessInstance> instances;
-
-   public ProcessInstanceWrapper()
-   {
-   }
-
-   public ProcessInstanceWrapper(List<ProcessInstance> instances)
-   {
-      this.instances = instances;
-   }
-
-   @XmlElement
-   public List<ProcessInstance> getInstances()
-   {
-      return instances;
-   }
-
-   @XmlElement(name = "totalCount")
-   public int getTotalCount()
-   {
-      return instances.size();
-   }
-}

Deleted: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/RoleAssignment.java
===================================================================
--- projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/RoleAssignment.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/RoleAssignment.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -1,68 +0,0 @@
-/*
- * 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;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
- at XmlRootElement(name = "roleAssignment")
-public class RoleAssignment
-{
-   private String role;
-   private boolean isAssigned;
-
-
-   public RoleAssignment()
-   {
-   }
-
-   public RoleAssignment(String role, boolean assigned)
-   {
-      this.role = role;
-      isAssigned = assigned;
-   }
-
-   @XmlElement(name = "role")
-   public String getRole()
-   {
-      return role;
-   }
-
-   public void setRole(String role)
-   {
-      this.role = role;
-   }
-
-   @XmlElement(name = "isAssigned")
-   public boolean isAssigned()
-   {
-      return isAssigned;
-   }
-
-   public void setAssigned(boolean assigned)
-   {
-      isAssigned = assigned;
-   }
-}

Copied: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/RoleAssignmentRef.java (from rev 2755, projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/RoleAssignment.java)
===================================================================
--- projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/RoleAssignmentRef.java	                        (rev 0)
+++ projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/RoleAssignmentRef.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -0,0 +1,68 @@
+/*
+ * 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;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+ at XmlRootElement(name = "roleAssignment")
+public class RoleAssignmentRef
+{
+   private String role;
+   private boolean isAssigned;
+
+
+   public RoleAssignmentRef()
+   {
+   }
+
+   public RoleAssignmentRef(String role, boolean assigned)
+   {
+      this.role = role;
+      isAssigned = assigned;
+   }
+
+   @XmlElement(name = "role")
+   public String getRole()
+   {
+      return role;
+   }
+
+   public void setRole(String role)
+   {
+      this.role = role;
+   }
+
+   @XmlElement(name = "isAssigned")
+   public boolean isAssigned()
+   {
+      return isAssigned;
+   }
+
+   public void setAssigned(boolean assigned)
+   {
+      isAssigned = assigned;
+   }
+}


Property changes on: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/RoleAssignmentRef.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Copied: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/RoleAssignmentRefWrapper.java (from rev 2755, projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/RoleAssignmentWrapper.java)
===================================================================
--- projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/RoleAssignmentRefWrapper.java	                        (rev 0)
+++ projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/RoleAssignmentRefWrapper.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -0,0 +1,53 @@
+/*
+ * 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;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+ at XmlRootElement(name = "wrapper")
+public class RoleAssignmentRefWrapper
+{
+   List<RoleAssignmentRef> roles;
+
+   public RoleAssignmentRefWrapper()
+   {
+   }
+
+   public RoleAssignmentRefWrapper(List<RoleAssignmentRef> roles)
+   {
+      this.roles = roles;
+   }
+
+   public List<RoleAssignmentRef> getRoles()
+   {
+      return roles;
+   }
+
+   public void setRoles(List<RoleAssignmentRef> roles)
+   {
+      this.roles = roles;
+   }
+}


Property changes on: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/RoleAssignmentRefWrapper.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Deleted: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/RoleAssignmentWrapper.java
===================================================================
--- projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/RoleAssignmentWrapper.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/RoleAssignmentWrapper.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -1,53 +0,0 @@
-/*
- * 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;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.List;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
- at XmlRootElement(name = "wrapper")
-public class RoleAssignmentWrapper
-{
-   List<RoleAssignment> roles;
-
-   public RoleAssignmentWrapper()
-   {
-   }
-
-   public RoleAssignmentWrapper(List<RoleAssignment> roles)
-   {
-      this.roles = roles;
-   }
-
-   public List<RoleAssignment> getRoles()
-   {
-      return roles;
-   }
-
-   public void setRoles(List<RoleAssignment> roles)
-   {
-      this.roles = roles;
-   }
-}

Copied: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/TaskRef.java (from rev 3011, projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/TaskReference.java)
===================================================================
--- projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/TaskRef.java	                        (rev 0)
+++ projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/TaskRef.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -0,0 +1,200 @@
+/*
+ * 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;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+ at XmlRootElement(name = "taskReference")
+public class TaskRef
+{
+   private long id;
+   private long tokenId;
+   private long processInstanceId;
+   private long processId;
+
+   private String name;
+   private String actor = "";
+
+   private boolean isBlocking;
+   private boolean isSignalling = true;
+
+   private List<String> transitionNames = new ArrayList<String>();
+   private List<String> pooledActors = new ArrayList<String>();
+
+   public enum STATE {OPEN, ASSIGNED, CLOSED};
+   private STATE currentState;
+
+   public TaskRef()
+   {
+      initOrUpdateState();
+   }
+
+   public TaskRef(
+         long taskId, long tokenId, long processInstanceId,
+         long processId,
+         String taskName, String actorName,
+         boolean blocking, boolean signalling
+   )
+   {
+      this.id = taskId;
+      this.tokenId = tokenId;
+      this.processInstanceId = processInstanceId;
+      this.processId = processId;
+      this.name = taskName;
+      setActor(actorName);
+      isBlocking = blocking;
+      isSignalling = signalling;
+
+      initOrUpdateState();
+   }
+
+   public long getId()
+   {
+      return id;
+   }
+
+   public void setId(long id)
+   {
+      this.id = id;
+   }
+
+   public long getTokenId()
+   {
+      return tokenId;
+   }
+
+   public void setTokenId(long tokenId)
+   {
+      this.tokenId = tokenId;
+   }
+
+   public long getProcessInstanceId()
+   {
+      return processInstanceId;
+   }
+
+   public void setProcessInstanceId(long processInstanceId)
+   {
+      this.processInstanceId = processInstanceId;
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+
+   public String getActor()
+   {
+      return actor;
+   }
+
+   public void setActor(String actor)
+   {
+      if(null==actor)
+         actor = "";
+      
+      this.actor = actor;
+      initOrUpdateState();
+   }
+
+   public boolean isBlocking()
+   {
+      return isBlocking;
+   }
+
+   public void setBlocking(boolean blocking)
+   {
+      isBlocking = blocking;
+   }
+
+   public boolean isSignalling()
+   {
+      return isSignalling;
+   }
+
+   public void setSignalling(boolean signalling)
+   {
+      isSignalling = signalling;
+   }
+
+   public List<String> getTransitionNames()
+   {
+      return transitionNames;
+   }
+
+   public void addPooledActor(String actorId)
+   {
+      pooledActors.add(actorId);
+
+      initOrUpdateState();
+   }
+
+   private void initOrUpdateState()
+   {
+      if(actor==null || actor.equals(""))
+      {
+         currentState = STATE.OPEN;
+      }
+      else
+      {
+         currentState = STATE.ASSIGNED;
+      }
+   }
+
+   public void close()
+   {
+      if(STATE.ASSIGNED != currentState)
+         throw new IllegalArgumentException("Cannot close task in state " + currentState);
+
+      currentState = STATE.CLOSED;
+   }
+
+   public long getProcessId()
+   {
+      return processId;
+   }
+
+   public STATE getCurrentState()
+   {
+      return currentState;
+   }
+
+   public String toString()
+   {
+      return "TaskRef{id:"+id+",state:"+currentState+"}";
+   }
+
+   public List<String> getPooledActors()
+   {
+      return pooledActors;
+   }
+}

Copied: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/TaskRefWrapper.java (from rev 2755, projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/TaskReferenceWrapper.java)
===================================================================
--- projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/TaskRefWrapper.java	                        (rev 0)
+++ projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/TaskRefWrapper.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -0,0 +1,61 @@
+/*
+ * 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;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlElement;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+ at XmlRootElement(name = "wrapper")
+public class TaskRefWrapper
+{
+   List<TaskRef> tasks = new ArrayList<TaskRef>();
+
+   public TaskRefWrapper()
+   {
+   }
+
+   public TaskRefWrapper(List<TaskRef> tasks)
+   {
+      this.tasks = tasks;
+   }
+
+   public List<TaskRef> getTasks()
+   {
+      return tasks;
+   }
+
+   public void setTasks(List<TaskRef> tasks)
+   {
+      this.tasks = tasks;
+   }
+
+   @XmlElement(name = "totalCount")
+   public int getTotalCount()
+   {
+      return tasks.size();
+   }
+}

Deleted: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/TaskReference.java
===================================================================
--- projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/TaskReference.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/TaskReference.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -1,200 +0,0 @@
-/*
- * 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;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
- at XmlRootElement(name = "taskReference")
-public class TaskReference
-{
-   private long id;
-   private long tokenId;
-   private long processInstanceId;
-   private long processId;
-
-   private String name;
-   private String actor = "";
-
-   private boolean isBlocking;
-   private boolean isSignalling = true;
-
-   private List<String> transitionNames = new ArrayList<String>();
-   private List<String> pooledActors = new ArrayList<String>();
-
-   public enum STATE {OPEN, ASSIGNED, CLOSED};
-   private STATE currentState;
-
-   public TaskReference()
-   {
-      initOrUpdateState();
-   }
-
-   public TaskReference(
-         long taskId, long tokenId, long processInstanceId,
-         long processId,
-         String taskName, String actorName,
-         boolean blocking, boolean signalling
-   )
-   {
-      this.id = taskId;
-      this.tokenId = tokenId;
-      this.processInstanceId = processInstanceId;
-      this.processId = processId;
-      this.name = taskName;
-      setActor(actorName);
-      isBlocking = blocking;
-      isSignalling = signalling;
-
-      initOrUpdateState();
-   }
-
-   public long getId()
-   {
-      return id;
-   }
-
-   public void setId(long id)
-   {
-      this.id = id;
-   }
-
-   public long getTokenId()
-   {
-      return tokenId;
-   }
-
-   public void setTokenId(long tokenId)
-   {
-      this.tokenId = tokenId;
-   }
-
-   public long getProcessInstanceId()
-   {
-      return processInstanceId;
-   }
-
-   public void setProcessInstanceId(long processInstanceId)
-   {
-      this.processInstanceId = processInstanceId;
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-
-   public String getActor()
-   {
-      return actor;
-   }
-
-   public void setActor(String actor)
-   {
-      if(null==actor)
-         actor = "";
-      
-      this.actor = actor;
-      initOrUpdateState();
-   }
-
-   public boolean isBlocking()
-   {
-      return isBlocking;
-   }
-
-   public void setBlocking(boolean blocking)
-   {
-      isBlocking = blocking;
-   }
-
-   public boolean isSignalling()
-   {
-      return isSignalling;
-   }
-
-   public void setSignalling(boolean signalling)
-   {
-      isSignalling = signalling;
-   }
-
-   public List<String> getTransitionNames()
-   {
-      return transitionNames;
-   }
-
-   public void addPooledActor(String actorId)
-   {
-      pooledActors.add(actorId);
-
-      initOrUpdateState();
-   }
-
-   private void initOrUpdateState()
-   {
-      if(actor==null || actor.equals(""))
-      {
-         currentState = STATE.OPEN;
-      }
-      else
-      {
-         currentState = STATE.ASSIGNED;
-      }
-   }
-
-   public void close()
-   {
-      if(STATE.ASSIGNED != currentState)
-         throw new IllegalArgumentException("Cannot close task in state " + currentState);
-
-      currentState = STATE.CLOSED;
-   }
-
-   public long getProcessId()
-   {
-      return processId;
-   }
-
-   public STATE getCurrentState()
-   {
-      return currentState;
-   }
-
-   public String toString()
-   {
-      return "TaskRef{id:"+id+",state:"+currentState+"}";
-   }
-
-   public List<String> getPooledActors()
-   {
-      return pooledActors;
-   }
-}

Deleted: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/TaskReferenceWrapper.java
===================================================================
--- projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/TaskReferenceWrapper.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/TaskReferenceWrapper.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -1,61 +0,0 @@
-/*
- * 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;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlElement;
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
- at XmlRootElement(name = "wrapper")
-public class TaskReferenceWrapper
-{
-   List<TaskReference> tasks = new ArrayList<TaskReference>();
-
-   public TaskReferenceWrapper()
-   {
-   }
-
-   public TaskReferenceWrapper(List<TaskReference> tasks)
-   {
-      this.tasks = tasks;
-   }
-
-   public List<TaskReference> getTasks()
-   {
-      return tasks;
-   }
-
-   public void setTasks(List<TaskReference> tasks)
-   {
-      this.tasks = tasks;
-   }
-
-   @XmlElement(name = "totalCount")
-   public int getTotalCount()
-   {
-      return tasks.size();
-   }
-}

Modified: projects/gwt-console/trunk/server/SQL.txt
===================================================================
--- projects/gwt-console/trunk/server/SQL.txt	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/server/SQL.txt	2008-11-21 10:30:25 UTC (rev 3020)
@@ -1,4 +1,21 @@
-Group membership:
+Group membership
+----------------
+select u.NAME_ as userName, g.NAME_ as groupName, m.ROLE_ as role from JBPM_ID_USER as u, JBPM_ID_GROUP as g, JBPM_ID_MEMBERSHIP as m
+where u.ID_=m.USER_ AND m.GROUP_=g.ID_
 
-select u.NAME_ as userName, g.NAME_ as groupName, m.ROLE_ as role from JBPM_ID_USER as u, JBPM_ID_GROUP as g, JBPM_ID_MEMBERSHIP as m
-where u.ID_=m.USER_ AND m.GROUP_=g.ID_
\ No newline at end of file
+Log analysis
+-------------
+
+[Instance start and end]
+
+SELECT l.CLASS_, l.DATE_, l.TOKEN_, i.ID_ as instanceID, p.NAME_ as processName, p.ID_ as processID
+ FROM JBPM_LOG l, JBPM_TOKEN t, JBPM_PROCESSINSTANCE i, JBPM_PROCESSDEFINITION p
+WHERE l.CLASS_='I' OR l.CLASS_='X'
+AND t.ID_=l.TOKEN_
+AND t.PROCESSINSTANCE_=i.ID_
+AND i.PROCESSDEFINITION_=p.ID_
+GROUP BY l.CLASS_
+ORDER BY l.DATE_ ASC, l.TOKEN_
+
+
+

Modified: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/JBPM3MgmtFacade.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/JBPM3MgmtFacade.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/JBPM3MgmtFacade.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -112,7 +112,7 @@
                // Process a file upload in memory
                byte[] data = item.get();
 
-               getProcessManagement().deployNewDefinition(data);
+               getManagementExtension().deployNewDefinition(data);
 
                // Process stream
                //InputStream uploadedStream = item.getInputStream();

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	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/ProcessMgmtFacade.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -22,11 +22,12 @@
 package org.jboss.bpm.console.server;
 
 import com.google.gson.Gson;
-import org.jboss.bpm.console.client.model.ProcessDefinitionWrapper;
-import org.jboss.bpm.console.client.model.ProcessInstanceWrapper;
-import org.jboss.bpm.console.client.model.ProcessInstance;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRefWrapper;
+import org.jboss.bpm.console.client.model.ProcessInstanceRefWrapper;
+import org.jboss.bpm.console.client.model.ProcessInstanceRef;
 import org.jboss.bpm.console.server.dao.ManagementFactory;
 import org.jboss.bpm.console.server.dao.ProcessManagement;
+import org.jboss.bpm.console.server.dao.JBPM3Extension;
 import org.jboss.bpm.console.server.gson.GsonFactory;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -42,14 +43,10 @@
 @Path("process")
 public class ProcessMgmtFacade
 {
-
    private static final Log log = LogFactory.getLog(ProcessMgmtFacade.class);
-
    private ProcessManagement processManagement;
+   private JBPM3Extension managementExtension;
 
-   /**
-    * Lazy load the {@link org.jboss.bpm.console.server.dao.ProcessManagement}
-    */
    private ProcessManagement getProcessDAO()
    {
       if(null==this.processManagement)
@@ -62,13 +59,26 @@
       return this.processManagement;
    }
 
+   private JBPM3Extension getManagementExtension()
+   {
+      if(null==this.managementExtension)
+      {
+         ManagementFactory factory = ManagementFactory.newInstance();
+         this.managementExtension = factory.createExtensionManagement();
+      }
+
+      return this.managementExtension;
+
+   }
+
+
    @GET
    @Path("definitions")
    @Produces("application/json")
    public Response getDefinitionsJSON()
    {
-      ProcessDefinitionWrapper wrapper =
-        new ProcessDefinitionWrapper(getProcessDAO().getAllDefinitions());
+      ProcessDefinitionRefWrapper wrapper =
+            new ProcessDefinitionRefWrapper(getProcessDAO().getAllDefinitions());
       return createJsonResponse(wrapper);
    }
 
@@ -76,12 +86,12 @@
    @Path("definitions/{id}/remove")
    @Produces("application/json")
    public Response removeDefinitionsJSON(
-     @PathParam("id")
-     long processId
+         @PathParam("id")
+         long processId
    )
    {
-      ProcessDefinitionWrapper wrapper =
-        new ProcessDefinitionWrapper( getProcessDAO().removeDefinition(processId));
+      ProcessDefinitionRefWrapper wrapper =
+            new ProcessDefinitionRefWrapper( getProcessDAO().removeDefinition(processId));
       return createJsonResponse(wrapper);
    }
 
@@ -89,13 +99,13 @@
    @Path("definitions/{id}/instances")
    @Produces("application/json")
    public Response getInstancesJSON(
-     @PathParam("id")
-     long processId
+         @PathParam("id")
+         long processId
    )
    {
 
-      ProcessInstanceWrapper wrapper =
-        new ProcessInstanceWrapper(getProcessDAO().getInstancesByProcessId(processId));
+      ProcessInstanceRefWrapper wrapper =
+            new ProcessInstanceRefWrapper(getProcessDAO().getInstancesByProcessId(processId));
       return createJsonResponse(wrapper);
    }
 
@@ -103,11 +113,11 @@
    @Path("definitions/{id}/instances/new")
    @Produces("application/json")
    public Response newInstance(
-     @PathParam("id")
-     long processId)
+         @PathParam("id")
+         long processId)
    {
 
-      ProcessInstance instance = getProcessDAO().newInstance(processId);
+      ProcessInstanceRef instance = getProcessDAO().newInstance(processId);
       return createJsonResponse(instance);
    }
 
@@ -115,13 +125,13 @@
    @Path("instances/{id}/state/{next}")
    @Produces("application/json")
    public Response changeState(
-     @PathParam("id")
-     long instanceId,
-     @PathParam("next")
-     String next)
+         @PathParam("id")
+         long instanceId,
+         @PathParam("next")
+         String next)
    {
       log.debug("Change instance (ID "+instanceId+") to state " +next);
-      getProcessDAO().changeState(instanceId, next);
+      getManagementExtension().changeState(instanceId, next);
       return Response.ok().type("application/json").build();
    }
 

Modified: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/TaskMgmtFacade.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/TaskMgmtFacade.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/TaskMgmtFacade.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -24,7 +24,7 @@
 import com.google.gson.Gson;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.jboss.bpm.console.client.model.TaskReferenceWrapper;
+import org.jboss.bpm.console.client.model.TaskRefWrapper;
 import org.jboss.bpm.console.client.model.forms.FieldDef;
 import org.jboss.bpm.console.client.model.forms.FormDef;
 import org.jboss.bpm.console.client.model.util.MapEntry;
@@ -89,8 +89,8 @@
          String actorName
    )
    {
-      TaskReferenceWrapper wrapper =
-            new TaskReferenceWrapper(getTaskManagement().getTasksByActor(actorName));
+      TaskRefWrapper wrapper =
+            new TaskRefWrapper(getTaskManagement().getTasksByActor(actorName));
       return createJsonResponse(wrapper);
    }
 

Modified: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/UserMgmtFacade.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/UserMgmtFacade.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/UserMgmtFacade.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -21,8 +21,8 @@
  */
 package org.jboss.bpm.console.server;
 
-import org.jboss.bpm.console.client.model.RoleAssignment;
-import org.jboss.bpm.console.client.model.RoleAssignmentWrapper;
+import org.jboss.bpm.console.client.model.RoleAssignmentRef;
+import org.jboss.bpm.console.client.model.RoleAssignmentRefWrapper;
 import org.jboss.bpm.console.server.gson.GsonFactory;
 import org.jboss.bpm.console.server.dao.UserManagement;
 import org.jboss.bpm.console.server.dao.ManagementFactory;
@@ -78,15 +78,15 @@
 
       log.debug("Role check user: " + request.getRemoteUser() + ", actualRoles requested: " + roleCheck);
 
-      List<RoleAssignment> actualRoles = new ArrayList<RoleAssignment>();
+      List<RoleAssignmentRef> actualRoles = new ArrayList<RoleAssignmentRef>();
 
       StringTokenizer tok = new StringTokenizer(roleCheck, ",");
       while(tok.hasMoreTokens())
       {
          String possibleRole = tok.nextToken();
-         actualRoles.add( new RoleAssignment(possibleRole, request.isUserInRole(possibleRole)));         
+         actualRoles.add( new RoleAssignmentRef(possibleRole, request.isUserInRole(possibleRole)));
       }
-      return createJsonResponse( new RoleAssignmentWrapper(actualRoles));
+      return createJsonResponse( new RoleAssignmentRefWrapper(actualRoles));
    }
 
    @GET

Modified: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/JBPM3Extension.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/JBPM3Extension.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/JBPM3Extension.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -23,6 +23,7 @@
 
 import org.jboss.bpm.console.client.model.jbpm3.ActiveNodeInfo;
 import org.jboss.bpm.console.client.model.jbpm3.DiagramInfo;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
 
 import java.util.Map;
 
@@ -39,10 +40,14 @@
 
    ActiveNodeInfo getActivNodeInfo(long instanceId);
 
+   // TODO: move to process management
    void signalToken(long tokenId, String signal);
 
    Map<String, String> getAvailableTaskForms(long processId);
 
    byte[] getTaskFormByTaskName(long processId, long taskId);
 
+   void changeState(long instanceId, String nextState);
+
+   ProcessDefinitionRef deployNewDefinition(byte[] data);
 }

Modified: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/ProcessManagement.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/ProcessManagement.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/ProcessManagement.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -21,9 +21,8 @@
  */
 package org.jboss.bpm.console.server.dao;
 
-import org.jboss.bpm.console.client.model.ProcessDefinition;
-import org.jboss.bpm.console.client.model.ProcessInstance;
-import org.jboss.bpm.console.client.model.TaskReference;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+import org.jboss.bpm.console.client.model.ProcessInstanceRef;
 
 import java.util.List;
 
@@ -34,20 +33,16 @@
  */
 public interface ProcessManagement
 {
-   List<ProcessDefinition> getAllDefinitions();
+   List<ProcessDefinitionRef> getAllDefinitions();
 
-   ProcessDefinition getDefinitionById(long processId);
+   ProcessDefinitionRef getDefinitionById(long processId);
 
-   List<ProcessDefinition> removeDefinition(long processId);
+   List<ProcessDefinitionRef> removeDefinition(long processId);
 
-   List<ProcessInstance> getInstancesByProcessId(long processId);
+   List<ProcessInstanceRef> getInstancesByProcessId(long processId);
 
-   ProcessInstance getInstanceById(long instanceId);
-   
-   void changeState(long instanceId, String nextState);
+   ProcessInstanceRef getInstanceById(long instanceId);
 
-   ProcessInstance newInstance(long processId);
+   ProcessInstanceRef newInstance(long processId);
 
-   ProcessDefinition deployNewDefinition(byte[] data);
-
 }

Modified: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/TaskManagement.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/TaskManagement.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/TaskManagement.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -21,18 +21,17 @@
  */
 package org.jboss.bpm.console.server.dao;
 
-import org.jboss.bpm.console.client.model.TaskReference;
+import org.jboss.bpm.console.client.model.TaskRef;
 
 import java.util.List;
-import java.util.Map;
 
 /**
  * @author Heiko.Braun <heiko.braun at jboss.com>
  */
 public interface TaskManagement
 {
-   List<TaskReference> getTasksByActor(String actorName);
-   TaskReference getTaskById(long taskId);
+   List<TaskRef> getTasksByActor(String actorName);
+   TaskRef getTaskById(long taskId);
    void reassignTask(long taskId, String actorId);
 
    // TODO: If signaling resides with an extension then closeTask() should as well

Modified: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/JBPM3ManagementExtension.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/JBPM3ManagementExtension.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/JBPM3ManagementExtension.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -153,4 +153,18 @@
          throw new RuntimeException("No form definition for taskId '"+taskId+"'");
 
    }
+
+   public void changeState(long instanceId, String nextState)
+   {
+      org.jbpm.graph.exe.ProcessInstance p0 = delegate.getActualInstance(instanceId);
+      Transform.doTransition(p0, nextState);  // modifies the actual PI
+
+      // TX commit will persist changes to the actual PI      
+   }
+
+   public org.jboss.bpm.console.client.model.ProcessDefinitionRef deployNewDefinition(byte[] data)
+   {
+      org.jbpm.graph.def.ProcessDefinition p0 = delegate.deploy(data);
+      return Transform.processDefinition(p0);
+   }
 }

Modified: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/JBPM3ProcessManagement.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/JBPM3ProcessManagement.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/JBPM3ProcessManagement.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -21,8 +21,8 @@
  */
 package org.jboss.bpm.console.server.dao.internal;
 
-import org.jboss.bpm.console.client.model.ProcessDefinition;
-import org.jboss.bpm.console.client.model.ProcessInstance;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+import org.jboss.bpm.console.client.model.ProcessInstanceRef;
 import org.jboss.bpm.console.server.dao.ProcessManagement;
 
 import java.util.ArrayList;
@@ -40,11 +40,11 @@
       this.delegate = new JBPM3CommandDelegate();
    }
 
-   public List<ProcessDefinition> getAllDefinitions()
+   public List<ProcessDefinitionRef> getAllDefinitions()
    {
       List<org.jbpm.graph.def.ProcessDefinition> defs = delegate.getActualDefinitions();
 
-      List<ProcessDefinition> results = new ArrayList<ProcessDefinition>(defs.size());
+      List<ProcessDefinitionRef> results = new ArrayList<ProcessDefinitionRef>(defs.size());
       for(org.jbpm.graph.def.ProcessDefinition p0 : defs)
       {
          results.add( Transform.processDefinition(p0) );
@@ -52,29 +52,29 @@
       return results;
    }
 
-   public ProcessDefinition getDefinitionById(long processId)
+   public ProcessDefinitionRef getDefinitionById(long processId)
    {
       org.jbpm.graph.def.ProcessDefinition p0 = delegate.getActualDefinition(processId);
       return Transform.processDefinition(p0);
    }
 
-   public List<ProcessDefinition> removeDefinition(long processId)
+   public List<ProcessDefinitionRef> removeDefinition(long processId)
    {
       delegate.removeActualDefinition(processId);
       return getAllDefinitions();
    }
 
 
-   public ProcessInstance newInstance(long processId)
+   public ProcessInstanceRef newInstance(long processId)
    {
       org.jbpm.graph.exe.ProcessInstance instance = delegate.startNewInstance(processId);
       return Transform.processInstance(instance);  
    }
 
-   public List<ProcessInstance> getInstancesByProcessId(long processId)
+   public List<ProcessInstanceRef> getInstancesByProcessId(long processId)
    {
       List<org.jbpm.graph.exe.ProcessInstance> instances = delegate.getActualInstances(processId);
-      List<ProcessInstance> results = new ArrayList<ProcessInstance>(instances.size());
+      List<ProcessInstanceRef> results = new ArrayList<ProcessInstanceRef>(instances.size());
       for(org.jbpm.graph.exe.ProcessInstance i0 : instances)
       {
          results.add( Transform.processInstance(i0) );
@@ -82,26 +82,10 @@
       return results;
    }
 
-   public ProcessInstance getInstanceById(long instanceId)
+   public ProcessInstanceRef getInstanceById(long instanceId)
    {
       org.jbpm.graph.exe.ProcessInstance instance = delegate.getActualInstance(instanceId);
       return Transform.processInstance(instance);
    }
 
-
-   public void changeState(long instanceId, String nextState)
-   {
-      org.jbpm.graph.exe.ProcessInstance p0 = delegate.getActualInstance(instanceId);
-      Transform.doTransition(p0, nextState);  // modifies the actual PI
-
-      // TX commit will persist changes to the actual PI
-
-      
-   }
-
-   public ProcessDefinition deployNewDefinition(byte[] data)
-   {
-      org.jbpm.graph.def.ProcessDefinition p0 = delegate.deploy(data);
-      return Transform.processDefinition(p0);  
-   }
 }

Modified: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/JBPM3TaskManagement.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/JBPM3TaskManagement.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/JBPM3TaskManagement.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -21,7 +21,7 @@
  */
 package org.jboss.bpm.console.server.dao.internal;
 
-import org.jboss.bpm.console.client.model.TaskReference;
+import org.jboss.bpm.console.client.model.TaskRef;
 import org.jboss.bpm.console.server.dao.TaskManagement;
 
 import java.util.ArrayList;
@@ -40,13 +40,13 @@
       this.delegate = new JBPM3CommandDelegate();
    }
 
-   public List<TaskReference> getTasksByActor(String actorName)
+   public List<TaskRef> getTasksByActor(String actorName)
    {
 
       List<org.jbpm.taskmgmt.exe.TaskInstance> actualTasks =
             delegate.getActualTasksForActor(actorName);
 
-      List<TaskReference> taskRefs = new ArrayList<TaskReference>();
+      List<TaskRef> taskRefs = new ArrayList<TaskRef>();
       for(org.jbpm.taskmgmt.exe.TaskInstance t0 : actualTasks)
       {
          taskRefs.add( Transform.taskInstance(t0));
@@ -55,10 +55,10 @@
       return taskRefs;
    }
 
-   public TaskReference getTaskById(long taskId)
+   public TaskRef getTaskById(long taskId)
    {
       org.jbpm.taskmgmt.exe.TaskInstance t0 = delegate.getTaskById(taskId);
-      TaskReference taskRef = Transform.taskInstance(t0);
+      TaskRef taskRef = Transform.taskInstance(t0);
       return taskRef; 
    }
 

Modified: projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/Transform.java
===================================================================
--- projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/Transform.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/dao/internal/Transform.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -21,9 +21,9 @@
  */
 package org.jboss.bpm.console.server.dao.internal;
 
-import org.jboss.bpm.console.client.model.ProcessDefinition;
-import org.jboss.bpm.console.client.model.ProcessInstance;
-import org.jboss.bpm.console.client.model.TaskReference;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+import org.jboss.bpm.console.client.model.ProcessInstanceRef;
+import org.jboss.bpm.console.client.model.TaskRef;
 import org.jboss.bpm.console.client.model.jbpm3.TokenReference;
 import org.jbpm.graph.def.Transition;
 import org.jbpm.graph.exe.Token;
@@ -39,19 +39,19 @@
  */
 class Transform
 {
-   public static ProcessDefinition processDefinition(org.jbpm.graph.def.ProcessDefinition p0)
+   public static ProcessDefinitionRef processDefinition(org.jbpm.graph.def.ProcessDefinition p0)
    {
-      return new ProcessDefinition(p0.getId(), p0.getName(), String.valueOf(p0.getVersion()));
+      return new ProcessDefinitionRef(p0.getId(), p0.getName(), String.valueOf(p0.getVersion()));
    }
 
-   public static ProcessInstance processInstance(org.jbpm.graph.exe.ProcessInstance i0)
+   public static ProcessInstanceRef processInstance(org.jbpm.graph.exe.ProcessInstance i0)
    {      
       Date start = i0.getStart();      
       Date end = i0.getEnd();
       boolean suspended = i0.isSuspended();
       long processId = i0.getProcessDefinition().getId();
       long instanceId = i0.getId();
-      ProcessInstance processInstance = new ProcessInstance(instanceId, processId, start, end, suspended);
+      ProcessInstanceRef processInstance = new ProcessInstanceRef(instanceId, processId, start, end, suspended);
 
       // token
       Token t0 = i0.getRootToken();
@@ -88,7 +88,7 @@
 
    public static void doTransition(org.jbpm.graph.exe.ProcessInstance p0, String nextState)
    {
-      ProcessInstance instance = Transform.processInstance(p0);
+      ProcessInstanceRef instance = Transform.processInstance(p0);
       instance.setState(nextState);  // has lifecycle build in, hence the extra round
 
       switch(instance.getState())
@@ -107,9 +107,9 @@
             
    }
 
-   public static TaskReference taskInstance(org.jbpm.taskmgmt.exe.TaskInstance t0)
+   public static TaskRef taskInstance(org.jbpm.taskmgmt.exe.TaskInstance t0)
    {
-      TaskReference taskRef = new TaskReference(
+      TaskRef taskRef = new TaskRef(
             t0.getId(),
             t0.getToken().getId(),
             t0.getProcessInstance().getId(),

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/URLBuilder.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/URLBuilder.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/URLBuilder.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -23,7 +23,7 @@
 
 import com.allen_sauer.gwt.log.client.Log;
 import com.google.gwt.http.client.URL;
-import org.jboss.bpm.console.client.model.ProcessInstance;
+import org.jboss.bpm.console.client.model.ProcessInstanceRef;
 import org.jboss.bpm.console.client.model.jbpm3.TokenReference;
 
 /**
@@ -100,7 +100,7 @@
       return getBaseUrl() + "/rs/jbpm3/instances/" + instanceId + "/activeNodeInfo";
    }
 
-   public String getStateChangeURL(long instanceId, ProcessInstance.STATE state)
+   public String getStateChangeURL(long instanceId, ProcessInstanceRef.STATE state)
    {
       return getBaseUrl() + "/rs/process/instances/" + instanceId + "/state/"+state;
    }

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/DefinitionMetricEditor.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/DefinitionMetricEditor.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/DefinitionMetricEditor.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -25,7 +25,7 @@
 import org.jboss.bpm.console.client.UIConstants;
 import org.jboss.bpm.console.client.widgets.TeaserPanel;
 import org.jboss.bpm.console.client.widgets.HelpPanel;
-import org.jboss.bpm.console.client.model.ProcessDefinition;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
 import org.jboss.bpm.console.client.MainView;
 import org.jboss.bpm.console.client.process.ProcessInstanceEditor;
 import org.jboss.bpm.console.client.process.ProcessInstanceListEditor;
@@ -44,11 +44,11 @@
 public class DefinitionMetricEditor extends Editor
 {
 
-   private ProcessDefinition parent;
+   private ProcessDefinitionRef parent;
    private MainView view;
    private Panel teaserPanel;
 
-   public DefinitionMetricEditor(final MainView view, final ProcessDefinition proc)
+   public DefinitionMetricEditor(final MainView view, final ProcessDefinitionRef proc)
    {
       super();
       this.view = view;

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/DefinitionMetricView.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/DefinitionMetricView.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/DefinitionMetricView.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -29,7 +29,7 @@
 import org.jboss.bpm.console.client.MainView;
 import org.jboss.bpm.console.client.UIConstants;
 import org.jboss.bpm.console.client.model.DAOFactory;
-import org.jboss.bpm.console.client.model.ProcessDefinition;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
 import org.jboss.bpm.console.client.model.ProcessInstancePerformance;
 import org.jboss.bpm.console.client.widgets.LineChart;
 
@@ -41,11 +41,11 @@
  */
 public class DefinitionMetricView extends Panel
 {
-   private ProcessDefinition parent;
+   private ProcessDefinitionRef parent;
 
    private MainView view;
       
-   public DefinitionMetricView(MainView view, ProcessDefinition parent)
+   public DefinitionMetricView(MainView view, ProcessDefinitionRef parent)
    {
       super();
       this.view = view;

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/MetricOverview.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/MetricOverview.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/MetricOverview.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -35,7 +35,7 @@
 import org.jboss.bpm.console.client.MainView;
 import org.jboss.bpm.console.client.UIConstants;
 import org.jboss.bpm.console.client.model.DAOFactory;
-import org.jboss.bpm.console.client.model.ProcessDefinition;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
 import org.jboss.bpm.console.client.model.ProcessDefinitionDAO;
 import org.jboss.bpm.console.client.widgets.BarChart;
 
@@ -138,7 +138,7 @@
          {
             if(currentSelection!=-1)
             {
-               ProcessDefinition def = (ProcessDefinition)row2ProcessMap.get(new Integer(currentSelection));
+               ProcessDefinitionRef def = (ProcessDefinitionRef)row2ProcessMap.get(new Integer(currentSelection));
 
                String editorId = MetricOverviewEditor.ID+"."+def.getName();
                if(view.hasEditor(editorId))
@@ -183,7 +183,7 @@
       int row = 0;
       while(it.hasNext())
       {
-         ProcessDefinition pd = (ProcessDefinition)it.next();
+         ProcessDefinitionRef pd = (ProcessDefinitionRef)it.next();
          records[row] = new Object[3];
          records[row][0] = new Long(pd.getProcessId());
          records[row][1] = pd.getName();

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-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -64,9 +64,9 @@
       return roles;
    }
 
-   public static List<TaskReference> parseTaskReferenceList(String json)
+   public static List<TaskRef> parseTaskReferenceList(String json)
    {
-      List<TaskReference> results = new ArrayList<TaskReference>();
+      List<TaskRef> results = new ArrayList<TaskRef>();
 
       // {"tasks":[{"id":14,"name":"manager evaluation","isSignalling":true,
       // "isBlocking":false,"tokenId":6,"processInstanceId":4,"actor":"manager",
@@ -78,14 +78,14 @@
       for (int i = 0; i < array.size(); ++i)
       {
          JSONObject item = array.get(i).isObject();
-         TaskReference ref = parseTaskReference(item);
+         TaskRef ref = parseTaskReference(item);
          results.add(ref);
       }
 
       return results;
    }
 
-   public static TaskReference parseTaskReference(JSONObject item)
+   public static TaskRef parseTaskReference(JSONObject item)
    {
       
       long id = JSONWalk.on(item).next("id").asLong();
@@ -97,7 +97,7 @@
       boolean isBlocking = JSONWalk.on(item).next("isBlocking").asBool();
       boolean isSignalling = JSONWalk.on(item).next("isSignalling").asBool();
 
-      TaskReference ref = new TaskReference(
+      TaskRef ref = new TaskRef(
             id, tokenId, instanceId,
             processId,
             name, actor,
@@ -180,7 +180,7 @@
       return formDef;
    }
 
-   public static ProcessInstance parseProcessInstance(JSONObject root)
+   public static ProcessInstanceRef parseProcessInstance(JSONObject root)
    {
       Log.debug("parse " + root);
 
@@ -195,7 +195,7 @@
 
       boolean suspended = JSONWalk.on(root).next("suspended").asBool();
 
-      ProcessInstance processInstance = new ProcessInstance(
+      ProcessInstanceRef processInstance = new ProcessInstanceRef(
             id, parentId,
             start, end,
             suspended

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionDAO.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionDAO.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionDAO.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -31,5 +31,5 @@
 {
    List getAllProcessDefinitions();
 
-   ProcessDefinition getProcessDefinitionById(long id);   
+   ProcessDefinitionRef getProcessDefinitionById(long id);
 }

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/internal/MockMetricsDAO.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/internal/MockMetricsDAO.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/internal/MockMetricsDAO.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -37,7 +37,7 @@
 
    public ProcessInstancePerformance getProcessInstancePerformance(long processId)
    {
-      ProcessDefinition pd = DAOFactory.createProcessDefinitionDAO().getProcessDefinitionById(processId);
+      ProcessDefinitionRef pd = DAOFactory.createProcessDefinitionDAO().getProcessDefinitionById(processId);
       
       ProcessInstancePerformance performance = new ProcessInstancePerformance(
         pd.getProcessId(), pd.getName(), generateInstanceMetrics(processId)
@@ -53,7 +53,7 @@
       Map metrics = new HashMap();
       for(int i=0; i<instances.size(); i++)
       {
-         ProcessInstance pi = (ProcessInstance)instances.get(i);
+         ProcessInstanceRef pi = (ProcessInstanceRef)instances.get(i);
          metrics.put( new Long(pi.getInstanceId()) , new Double(Math.random()* MAX_EXEC_TIME) );
       }
 

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/internal/MockProcessDefinitionDAO.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/internal/MockProcessDefinitionDAO.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/internal/MockProcessDefinitionDAO.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -22,7 +22,7 @@
 package org.jboss.bpm.console.client.model.internal;
 
 import org.jboss.bpm.console.client.model.ProcessDefinitionDAO;
-import org.jboss.bpm.console.client.model.ProcessDefinition;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -35,14 +35,14 @@
    public final static List defs = new ArrayList();
    static
    {
-      defs.add( new ProcessDefinition(1, "OrderProcess", "1"));
-      defs.add( new ProcessDefinition(2, "VacationManagement", "1"));
-      defs.add( new ProcessDefinition(3, "New Employee walkthrough", "1"));
-      defs.add( new ProcessDefinition(4, "Source code review", "2"));
-      defs.add( new ProcessDefinition(5, "Loan application", "1"));
-      defs.add( new ProcessDefinition(6, "Expense report review", "4"));
-      defs.add( new ProcessDefinition(7, "Expense claim", "4"));
-      defs.add( new ProcessDefinition(8, "Credit approval", "4"));
+      defs.add( new ProcessDefinitionRef(1, "OrderProcess", "1"));
+      defs.add( new ProcessDefinitionRef(2, "VacationManagement", "1"));
+      defs.add( new ProcessDefinitionRef(3, "New Employee walkthrough", "1"));
+      defs.add( new ProcessDefinitionRef(4, "Source code review", "2"));
+      defs.add( new ProcessDefinitionRef(5, "Loan application", "1"));
+      defs.add( new ProcessDefinitionRef(6, "Expense report review", "4"));
+      defs.add( new ProcessDefinitionRef(7, "Expense claim", "4"));
+      defs.add( new ProcessDefinitionRef(8, "Credit approval", "4"));
 
    }
 
@@ -51,12 +51,12 @@
       return defs;  
    }
 
-   public ProcessDefinition getProcessDefinitionById(long id)
+   public ProcessDefinitionRef getProcessDefinitionById(long id)
    {
-      ProcessDefinition result = null;
+      ProcessDefinitionRef result = null;
       for(int i=0; i<defs.size(); i++)
       {
-         ProcessDefinition pd = (ProcessDefinition)defs.get(i);
+         ProcessDefinitionRef pd = (ProcessDefinitionRef)defs.get(i);
          if(pd.getProcessId() == id)
          {
             result = pd;

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/internal/MockProcessInstanceDAO.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/internal/MockProcessInstanceDAO.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/internal/MockProcessInstanceDAO.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -21,7 +21,7 @@
  */
 package org.jboss.bpm.console.client.model.internal;
 
-import org.jboss.bpm.console.client.model.ProcessInstance;
+import org.jboss.bpm.console.client.model.ProcessInstanceRef;
 import org.jboss.bpm.console.client.model.ProcessInstanceDAO;
 
 import java.util.ArrayList;
@@ -37,12 +37,12 @@
    final static List instances = new ArrayList();
    static
    {
-      instances.add( new ProcessInstance(2, -1, new Date(), null, false));
-      instances.add( new ProcessInstance(3, -1, new Date(System.currentTimeMillis()-(1000*60*120)), new Date(System.currentTimeMillis()-(1000*60*12)), false));
-      instances.add( new ProcessInstance(4, -1, new Date(System.currentTimeMillis()-(1000*60*60)), new Date(System.currentTimeMillis()-(1000*60*24)), false));
-      instances.add( new ProcessInstance(5, -1, new Date(System.currentTimeMillis()-(1000*60*90)), new Date(System.currentTimeMillis()-(1000*60*17)), false));
-      instances.add( new ProcessInstance(6, -1, new Date(), null, false));
-      instances.add( new ProcessInstance(7, -1, new Date(), null, false));
+      instances.add( new ProcessInstanceRef(2, -1, new Date(), null, false));
+      instances.add( new ProcessInstanceRef(3, -1, new Date(System.currentTimeMillis()-(1000*60*120)), new Date(System.currentTimeMillis()-(1000*60*12)), false));
+      instances.add( new ProcessInstanceRef(4, -1, new Date(System.currentTimeMillis()-(1000*60*60)), new Date(System.currentTimeMillis()-(1000*60*24)), false));
+      instances.add( new ProcessInstanceRef(5, -1, new Date(System.currentTimeMillis()-(1000*60*90)), new Date(System.currentTimeMillis()-(1000*60*17)), false));
+      instances.add( new ProcessInstanceRef(6, -1, new Date(), null, false));
+      instances.add( new ProcessInstanceRef(7, -1, new Date(), null, false));
    }
 
 

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -25,13 +25,11 @@
 import com.gwtext.client.data.*;
 import com.gwtext.client.widgets.MessageBox;
 import com.gwtext.client.widgets.MessageBoxConfig;
-import com.gwtext.client.widgets.Component;
-import com.gwtext.client.widgets.event.PanelListenerAdapter;
 import com.gwtext.client.widgets.grid.ColumnConfig;
 import com.gwtext.client.widgets.grid.ColumnModel;
 import com.allen_sauer.gwt.log.client.Log;
 import org.jboss.bpm.console.client.MainView;
-import org.jboss.bpm.console.client.model.ProcessDefinition;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
 import org.jboss.bpm.console.client.widgets.RemoteListView;
 
 import java.util.*;
@@ -41,7 +39,7 @@
  */
 public class ProcessDefinitionList extends RemoteListView
 {
-   private Map<Integer, ProcessDefinition> row2ProcessMap = new HashMap<Integer,ProcessDefinition>();
+   private Map<Integer, ProcessDefinitionRef> row2ProcessMap = new HashMap<Integer, ProcessDefinitionRef>();
 
    public ProcessDefinitionList(String titleName, final MainView view)
    {
@@ -86,7 +84,7 @@
 
    protected void onExamine(int row)
    {
-      ProcessDefinition proc = row2ProcessMap.get(row);
+      ProcessDefinitionRef proc = row2ProcessMap.get(row);
       String editorId = ProcessInstanceEditor.createWidgetID(proc);
 
       if(view.hasEditor(editorId))
@@ -108,7 +106,7 @@
                {
                   if("yes".equals( btnID) )
                   {
-                     ProcessDefinition proc = (ProcessDefinition)row2ProcessMap.get(row);
+                     ProcessDefinitionRef proc = (ProcessDefinitionRef)row2ProcessMap.get(row);
                      String url = view.getUrlBuilder().getRemoveDefinitionURL(proc.getProcessId());
                      RequestBuilder rb = new RequestBuilder(RequestBuilder.POST, url);
 
@@ -154,7 +152,7 @@
       for(Record r : records)
       {
          Long id = Long.valueOf(r.getAsString("processId"));
-         ProcessDefinition pd = new ProcessDefinition(
+         ProcessDefinitionRef pd = new ProcessDefinitionRef(
            id,
            r.getAsString("name"),
            r.getAsString("version")
@@ -167,9 +165,9 @@
       Log.debug("Loaded " + row2ProcessMap.size() + " process definitions");
    }
 
-   public List<ProcessDefinition> getAvailableProcessDefinitions()
+   public List<ProcessDefinitionRef> getAvailableProcessDefinitions()
    {
-      List<ProcessDefinition> results = new ArrayList<ProcessDefinition>();
+      List<ProcessDefinitionRef> results = new ArrayList<ProcessDefinitionRef>();
       Iterator<Integer> keys = row2ProcessMap.keySet().iterator();
       while(keys.hasNext())
       {

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessImageView.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessImageView.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessImageView.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -29,7 +29,7 @@
 import com.gwtext.client.widgets.event.PanelListenerAdapter;
 import com.allen_sauer.gwt.log.client.Log;
 import org.jboss.bpm.console.client.MainView;
-import org.jboss.bpm.console.client.model.ProcessInstance;
+import org.jboss.bpm.console.client.model.ProcessInstanceRef;
 import org.jboss.bpm.console.client.model.jbpm3.ActiveNodeInfo;
 import org.jboss.bpm.console.client.model.jbpm3.DiagramNodeInfo;
 import org.jboss.bpm.console.client.util.JSONRequest;
@@ -49,11 +49,11 @@
  */
 public class ProcessImageView extends Panel
 {
-   private ProcessInstance instance;
+   private ProcessInstanceRef instance;
    private MainView view;
    private ActiveNodeInfo activeNodeInfo = null;
 
-   public ProcessImageView(final ProcessInstance instance, final MainView view)
+   public ProcessImageView(final ProcessInstanceRef instance, final MainView view)
    {
       super();
       this.instance = instance;

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceEditor.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceEditor.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceEditor.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -29,8 +29,8 @@
 import org.jboss.bpm.console.client.MainView;
 import org.jboss.bpm.console.client.Editor;
 import org.jboss.bpm.console.client.UIConstants;
-import org.jboss.bpm.console.client.model.ProcessDefinition;
-import org.jboss.bpm.console.client.model.ProcessInstance;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+import org.jboss.bpm.console.client.model.ProcessInstanceRef;
 import org.jboss.bpm.console.client.widgets.TeaserPanel;
 import org.jboss.bpm.console.client.widgets.HelpPanel;
 
@@ -43,15 +43,15 @@
 {
    public final static String ID = "org.jboss.bpm.process.ProcessInstance";
 
-   private ProcessDefinition processDefinition;
+   private ProcessDefinitionRef processDefinition;
 
-   private ProcessInstance processInstance;
+   private ProcessInstanceRef processInstance;
 
    private MainView view;
 
    private Panel teaserPanel;
 
-   public ProcessInstanceEditor(final ProcessDefinition proc, final ProcessInstance instance, final MainView view)
+   public ProcessInstanceEditor(final ProcessDefinitionRef proc, final ProcessInstanceRef instance, final MainView view)
    {
       super();
       this.setId(ProcessInstanceEditor.ID+"."+instance.getInstanceId());
@@ -170,7 +170,7 @@
       return "bpm-instance-icon";
    }
 
-   public static String createWidgetID(ProcessDefinition parent)
+   public static String createWidgetID(ProcessDefinitionRef parent)
    {
       return ProcessInstanceEditor.ID+"."+parent.getName()+"."+parent.getVersion();
    }

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	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -32,8 +32,8 @@
 import com.allen_sauer.gwt.log.client.Log;
 import org.jboss.bpm.console.client.MainView;
 import org.jboss.bpm.console.client.util.DateRenderer;
-import org.jboss.bpm.console.client.model.ProcessDefinition;
-import org.jboss.bpm.console.client.model.ProcessInstance;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+import org.jboss.bpm.console.client.model.ProcessInstanceRef;
 import org.jboss.bpm.console.client.model.DTOParser;
 import org.jboss.bpm.console.client.widgets.RemoteListView;
 
@@ -46,24 +46,24 @@
 public class ProcessInstanceList extends RemoteListView
 {
 
-   private Map<Integer, ProcessInstance> row2InstanceMap = new HashMap<Integer, ProcessInstance>();
-   private ProcessDefinition parent;
+   private Map<Integer, ProcessInstanceRef> row2InstanceMap = new HashMap<Integer, ProcessInstanceRef>();
+   private ProcessDefinitionRef parent;
    private static final String DATE_FORMAT = "yyyy-m-j H:i:s";  //08-10-02 13:51:27
 
-   public ProcessInstanceList(ProcessDefinition procDef, String titleName, MainView view)
+   public ProcessInstanceList(ProcessDefinitionRef procDef, String titleName, MainView view)
    {
       super(titleName, view, getResourceUrl(view, procDef.getProcessId()));
       this.parent = procDef;
    }
 
-   ProcessDefinition getProcessDefinition()
+   ProcessDefinitionRef getProcessDefinition()
    {
       return parent;
    }
 
    protected void onExamine(final int row)
    {
-      ProcessInstance instance = row2InstanceMap.get(row);
+      ProcessInstanceRef instance = row2InstanceMap.get(row);
       String id = ProcessInstanceEditor.ID+"."+instance.getInstanceId();
       if(view.hasEditor(id))
          view.showEditor(id);
@@ -83,8 +83,8 @@
                {
                   if("yes".equals( btnID) )
                   {
-                     ProcessInstance instance = row2InstanceMap.get(row);
-                     instance.setState(ProcessInstance.STATE.ENDED);
+                     ProcessInstanceRef instance = row2InstanceMap.get(row);
+                     instance.setState(ProcessInstanceRef.STATE.ENDED);
                      String url = view.getUrlBuilder().getStateChangeURL(instance.getInstanceId(), instance.getState());
                      RequestBuilder rb = new RequestBuilder(RequestBuilder.POST, url);
 
@@ -166,7 +166,7 @@
       int i = 0;
       for(Record r : records)
       {
-         ProcessInstance pd = transform(r);
+         ProcessInstanceRef pd = transform(r);
          row2InstanceMap.put(i, pd);
          i++;
       }
@@ -174,9 +174,9 @@
       Log.debug("Loaded " + row2InstanceMap.size() + " records");
    }
 
-   public static ProcessInstance transform(Record r)
+   public static ProcessInstanceRef transform(Record r)
    {
-      ProcessInstance processInstance = null;
+      ProcessInstanceRef processInstance = null;
       try
       {
          JavaScriptObject js = r.getDataAsJsObject();

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceListEditor.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceListEditor.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceListEditor.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -40,8 +40,8 @@
 import org.jboss.bpm.console.client.Editor;
 import org.jboss.bpm.console.client.MainView;
 import org.jboss.bpm.console.client.UIConstants;
-import org.jboss.bpm.console.client.model.ProcessDefinition;
-import org.jboss.bpm.console.client.model.ProcessInstance;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+import org.jboss.bpm.console.client.model.ProcessInstanceRef;
 import org.jboss.bpm.console.client.model.jbpm3.TokenReference;
 import org.jboss.bpm.console.client.widgets.*;
 
@@ -53,17 +53,17 @@
 public class ProcessInstanceListEditor extends Editor
 {
    private MainView view;
-   private ProcessDefinition parent;
+   private ProcessDefinitionRef parent;
    private ProcessInstanceList instanceList;
 
    private FormPanel detailsForm;
    private Panel tokenEditorPanel;
-   private ProcessInstance selectedInstance;
+   private ProcessInstanceRef selectedInstance;
    private TokenEditor currentTokenEditor;
 
    private TabPanel tabPanel;
    
-   public ProcessInstanceListEditor(ProcessDefinition proc, MainView view)
+   public ProcessInstanceListEditor(ProcessDefinitionRef proc, MainView view)
    {
       super();
 
@@ -157,7 +157,7 @@
             {
                public void onClick(Button button, EventObject eventObject)
                {
-                  selectedInstance.setState(ProcessInstance.STATE.SUSPENDED);
+                  selectedInstance.setState(ProcessInstanceRef.STATE.SUSPENDED);
                   persistStateChange();
                }
             }
@@ -169,7 +169,7 @@
 
                public void onClick(Button button, EventObject eventObject)
                {
-                  selectedInstance.setState(ProcessInstance.STATE.RUNNING);
+                  selectedInstance.setState(ProcessInstanceRef.STATE.RUNNING);
                   persistStateChange();
                }
             }

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/TokenEditor.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/TokenEditor.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/TokenEditor.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -29,7 +29,7 @@
 import com.gwtext.client.widgets.tree.TreeNode;
 import com.gwtext.client.widgets.tree.TreePanel;
 import com.gwtext.client.widgets.tree.event.TreeNodeListenerAdapter;
-import org.jboss.bpm.console.client.model.ProcessInstance;
+import org.jboss.bpm.console.client.model.ProcessInstanceRef;
 import org.jboss.bpm.console.client.model.jbpm3.TokenReference;
 
 /**
@@ -41,7 +41,7 @@
    private TokenForm tokenForm;
    private TokenTree tokenTree;
 
-   public TokenEditor(final ProcessInstance instance, final SignalCallback callback)
+   public TokenEditor(final ProcessInstanceRef instance, final SignalCallback callback)
    {
       super();
 

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/TokenForm.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/TokenForm.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/TokenForm.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -33,7 +33,7 @@
 import com.gwtext.client.widgets.form.TextField;
 import org.jboss.bpm.console.client.UIConstants;
 import org.jboss.bpm.console.client.widgets.RefreshableComboBox;
-import org.jboss.bpm.console.client.model.ProcessInstance;
+import org.jboss.bpm.console.client.model.ProcessInstanceRef;
 import org.jboss.bpm.console.client.model.jbpm3.TokenReference;
 
 /**
@@ -106,7 +106,7 @@
    /**
     * display the root token
     */
-   void display(ProcessInstance processInstance)
+   void display(ProcessInstanceRef processInstance)
    {
       display(processInstance, processInstance.getRootToken());
    }
@@ -114,7 +114,7 @@
    /**
     * display a particular token
     */
-   void display(final ProcessInstance processInstance, final TokenReference tok)
+   void display(final ProcessInstanceRef processInstance, final TokenReference tok)
    {
       Form form = tokenForm.getForm();
 

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/AssignmentFormPanel.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/AssignmentFormPanel.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/AssignmentFormPanel.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -34,7 +34,7 @@
 import com.gwtext.client.widgets.form.FormPanel;
 import org.jboss.bpm.console.client.MainView;
 import org.jboss.bpm.console.client.model.DTOParser;
-import org.jboss.bpm.console.client.model.TaskReference;
+import org.jboss.bpm.console.client.model.TaskRef;
 import org.jboss.bpm.console.client.widgets.FormWidgets;
 import org.jboss.bpm.console.client.widgets.ModelChangeListener;
 import org.jboss.bpm.console.client.widgets.ModelListenerRegistry;
@@ -55,7 +55,7 @@
    private AssignmentCallback callback;
 
    private List<String> availableActors;
-   private TaskReference selectedInstance;
+   private TaskRef selectedInstance;
 
    public AssignmentFormPanel(MainView mainView, AssignmentCallback callback)
    {
@@ -118,7 +118,7 @@
    public void onModelChange(ModelListenerRegistry parent, Object changeEvent)
    {
       TaskListEditor editor = (TaskListEditor)parent.getUnderlying();
-      selectedInstance= (TaskReference)changeEvent;
+      selectedInstance= (TaskRef)changeEvent;
       availableActors = null;
 
       boolean hasPooledActors = selectedInstance.getPooledActors().size()>0;
@@ -128,7 +128,7 @@
          availableActors = selectedInstance.getPooledActors();
       }
       else if(!hasPooledActors &&
-            TaskReference.STATE.ASSIGNED ==selectedInstance.getCurrentState())
+            TaskRef.STATE.ASSIGNED ==selectedInstance.getCurrentState())
       {
          // no pooled actors but an assigned actor
          loadActors();

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskDetailsFormPanel.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskDetailsFormPanel.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskDetailsFormPanel.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -35,7 +35,7 @@
 import com.gwtext.client.widgets.form.TextField;
 import org.jboss.bpm.console.client.MainView;
 import org.jboss.bpm.console.client.UIConstants;
-import org.jboss.bpm.console.client.model.TaskReference;
+import org.jboss.bpm.console.client.model.TaskRef;
 import org.jboss.bpm.console.client.widgets.FormWidgets;
 import org.jboss.bpm.console.client.widgets.ModelChangeListener;
 import org.jboss.bpm.console.client.widgets.ModelListenerRegistry;
@@ -48,7 +48,7 @@
 {
 
    private FormPanel formPanel;
-   private TaskReference selectedInstance;
+   private TaskRef selectedInstance;
    private MainView mainView;
 
    private Button startBtn;
@@ -242,7 +242,7 @@
          startBtn.disable();
          stopBtn.disable();
       }
-      else if(TaskReference.STATE.ASSIGNED == selectedInstance.getCurrentState())
+      else if(TaskRef.STATE.ASSIGNED == selectedInstance.getCurrentState())
       {
          startBtn.disable();
          stopBtn.enable();

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskList.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskList.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskList.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -30,18 +30,13 @@
 import com.gwtext.client.data.*;
 import com.gwtext.client.data.event.StoreListenerAdapter;
 import com.gwtext.client.widgets.*;
-import com.gwtext.client.widgets.event.ButtonListenerAdapter;
 import com.gwtext.client.widgets.event.PanelListenerAdapter;
-import com.gwtext.client.widgets.form.*;
 import com.gwtext.client.widgets.grid.*;
 import com.gwtext.client.widgets.grid.event.GridCellListener;
 import org.jboss.bpm.console.client.MainView;
 import org.jboss.bpm.console.client.UIConstants;
 import org.jboss.bpm.console.client.model.DTOParser;
-import org.jboss.bpm.console.client.model.TaskReference;
-import org.jboss.bpm.console.client.model.forms.FormDef;
-import org.jboss.bpm.console.client.util.JSONRequest;
-import org.jboss.bpm.console.client.util.JSONRequestHandler;
+import org.jboss.bpm.console.client.model.TaskRef;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -51,7 +46,7 @@
  */
 public class TaskList extends Panel
 {
-   private Map<Integer,TaskReference> row2taskref = new HashMap<Integer,TaskReference>();
+   private Map<Integer, TaskRef> row2taskref = new HashMap<Integer, TaskRef>();
    private MainView mainView;
    private GridPanel grid;
    private GroupingStore store;
@@ -105,7 +100,7 @@
          int i=0;
          for(Record r : records)
          {
-            TaskReference ref = transform(r);
+            TaskRef ref = transform(r);
             row2taskref.put(i, ref);
             i++;
          }
@@ -118,11 +113,11 @@
       Log.debug("Loaded " + row2taskref.size() + " tasks");
    }
 
-   public static TaskReference transform(Record r)
+   public static TaskRef transform(Record r)
    {
       JavaScriptObject js = r.getDataAsJsObject();
       JSONObject jso = new JSONObject(js);
-      TaskReference ref = DTOParser.parseTaskReference(jso);
+      TaskRef ref = DTOParser.parseTaskReference(jso);
       return ref;
    }
 

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskListEditor.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskListEditor.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskListEditor.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -34,7 +34,7 @@
 import org.jboss.bpm.console.client.Editor;
 import org.jboss.bpm.console.client.MainView;
 import org.jboss.bpm.console.client.UIConstants;
-import org.jboss.bpm.console.client.model.TaskReference;
+import org.jboss.bpm.console.client.model.TaskRef;
 import org.jboss.bpm.console.client.widgets.ModelChangeListener;
 import org.jboss.bpm.console.client.widgets.ModelListenerRegistry;
 import org.jboss.bpm.console.client.widgets.TeaserPanel;
@@ -124,7 +124,7 @@
                {
                   public void onRowSelect(RowSelectionModel sm, int rowIndex, Record record)
                   {
-                     TaskReference taskRef = TaskList.transform(record);
+                     TaskRef taskRef = TaskList.transform(record);
                      modelListeners.fireRecordChangeEvent(record);
                      modelListeners.fireModelChangeEvent(taskRef);
                   }

Modified: projects/gwt-console/trunk/war/src/main/resources/org/jboss/bpm/console/public/Application.html
===================================================================
--- projects/gwt-console/trunk/war/src/main/resources/org/jboss/bpm/console/public/Application.html	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/war/src/main/resources/org/jboss/bpm/console/public/Application.html	2008-11-21 10:30:25 UTC (rev 3020)
@@ -8,6 +8,7 @@
 <!--                                           -->
 <script language='javascript'
 	src='org.jboss.bpm.console.Application.nocache.js'></script>
+      <meta name="gwt:property" id="bpm-server-url" content="localhost:8080"/>
  <link rel="stylesheet" href="console.css" type="text/css">
 </head>
 

Modified: projects/gwt-console/trunk/war/src/test/java/org/jboss/bpm/console/client/GwtTestDTOParser.java
===================================================================
--- projects/gwt-console/trunk/war/src/test/java/org/jboss/bpm/console/client/GwtTestDTOParser.java	2008-11-21 10:10:35 UTC (rev 3019)
+++ projects/gwt-console/trunk/war/src/test/java/org/jboss/bpm/console/client/GwtTestDTOParser.java	2008-11-21 10:30:25 UTC (rev 3020)
@@ -23,7 +23,7 @@
 
 import com.google.gwt.junit.client.GWTTestCase;
 import org.jboss.bpm.console.client.model.DTOParser;
-import org.jboss.bpm.console.client.model.TaskReference;
+import org.jboss.bpm.console.client.model.TaskRef;
 import org.jboss.bpm.console.client.model.forms.FormDef;
 
 import java.util.List;
@@ -47,7 +47,7 @@
    public void testTaskRefParsing()
    {    
       String json = "{\"tasks\":[{\"id\":14,\"tokenId\":6,\"processInstanceId\":4,\"processId\":2,\"name\":\"manager evaluation\",\"actor\":\"manager\",\"isBlocking\":false,\"isSignalling\":true,\"transitionNames\":[\"reject\",\"approve\"],\"pooledActors\":[\"hr\",\"sales\"]}]}";
-      List<TaskReference> result = DTOParser.parseTaskReferenceList(json);
+      List<TaskRef> result = DTOParser.parseTaskReferenceList(json);
       assertTrue("Failed to parse TaskReferenceList", result.size()==1);
       assertTrue("Failed to parse transitionNames", result.get(0).getTransitionNames().size()==2);
       assertFalse("Failed to parse pooledActors", result.get(0).getPooledActors().isEmpty());




More information about the jbpm-commits mailing list