[jbpm-commits] JBoss JBPM SVN: r4313 - in jbpm4/trunk/modules: api/src/main/java/org/jbpm/activity and 21 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Mar 24 07:05:50 EDT 2009


Author: tom.baeyens at jboss.com
Date: 2009-03-24 07:05:50 -0400 (Tue, 24 Mar 2009)
New Revision: 4313

Added:
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CancelTaskCmd.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskComplete.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskDelete.java
Removed:
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteTaskCmd.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskEnd.java
Modified:
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/IdentityService.java
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/TaskService.java
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/activity/ActivityExecution.java
   jbpm4/trunk/modules/distro/src/main/resources/config-tool/hibernate/mapping.files/jbpm.history.hbm.xml
   jbpm4/trunk/modules/distro/src/main/resources/config-tool/hibernate/mapping.files/jbpm.identity.hbm.xml
   jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/assignee/TaskAssigneeTest.java
   jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/candidates/TaskCandidatesTest.java
   jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/swimlane/TaskSwimlaneTest.java
   jbpm4/trunk/modules/examples/src/test/resources/jbpm.history.hbm.xml
   jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskActivity.java
   jbpm4/trunk/modules/jpdl/src/test/resources/jbpm.cfg.xml
   jbpm4/trunk/modules/jpdl/src/test/resources/jbpm.history.hbm.xml
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CompleteTaskCmd.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/ActivityEnd.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryTaskInstanceImpl.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/CreateUser.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/IdentitySessionImpl.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/JBossIdmIdentitySessionImpl.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/UserImpl.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/spi/IdentitySession.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/IdentityServiceImpl.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/TaskServiceImpl.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskImpl.java
   jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/identity/IdentityTest.java
   jbpm4/trunk/modules/pvm/src/test/resources/jbpm.history.hbm.xml
   jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/JbpmTestCase.java
   jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/SubTaskTest.java
   jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskCandidatesTest.java
   jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskCommentsTest.java
   jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskCreateUpdateDeleteTest.java
   jbpm4/trunk/modules/test-db/src/test/resources/jbpm.cfg.xml
   jbpm4/trunk/modules/test-db/src/test/resources/jbpm.history.hbm.xml
Log:
refactored task completion and added password to userimpl

Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/IdentityService.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/IdentityService.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/IdentityService.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -34,7 +34,7 @@
 public interface IdentityService {
 
   /** create a new user */
-  void createUser(String userId, String givenName, String familyName);
+  void createUser(String userId, String password, String givenName, String familyName);
   
   /** lookup a user 
    * @return the user or null if no such user exists */

Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/TaskService.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/TaskService.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/TaskService.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -62,20 +62,41 @@
    * the call returns <code>null</code>. */
   Task getTask(long taskDbid);
 
-  /** Marks the task with the given identifier as completed.
-   * This operation may result in a process instance being triggered. */
-  void submitTask(long taskDbid);
-  
-  /** Marks the task with the given identifier as completed.
-   * This operation may result in a process instance being triggered. */
-  void submit(long taskDbid, Map<String, Object> variables);
-
-  /** Removes the task with the given identifier from persistent storage. */
-  void deleteTask(long taskDbid);
-  
   /** Takes a task from the group task list to the current user's personal task list. */
   void takeTask(long taskDbid);
 
+  /** Deletes this task, marks the related history task as completed.   
+   * If the task was created in the context 
+   * of a process execution, this operation may result in a process instance 
+   * being triggered. */
+  void completeTask(long taskDbid);
+  
+  /** Deletes this task, marks the related history task as completed 
+   * with the specified outcome.  If the task was created in the context 
+   * of a process execution, this operation may result in a process instance 
+   * being triggered. The outcome in that case corresponds to an outgoing 
+   * transition in the process. */
+  void completeTask(long taskDbid, String outcome);
+
+  /** Deletes the task.
+   * If this task was created in the context of a process execution, one 
+   * of three things might happen depending on configurations of the task 
+   * in the process definition: 
+   * a) process executions resumes 
+   * b) whole process execution is cancelled as well.
+   * c) exception is thrown */
+  void cancelTask(long taskDbid);
+
+  /** Deletes the task providing an indication of the reason.  Example reasons 
+   * could be: "failed", "error", "exited", "obsolete" or "deleted". 
+   * If this task was created in the context of a process execution, one 
+   * of three things might happen depending on configurations of the task 
+   * in the process definition: 
+   * a) process executions resumes 
+   * b) whole process execution is cancelled as well.
+   * c) exception is thrown */
+  void cancelTask(long taskDbid, String reason);
+
   /** add a role to a given task.
    * @param identityRef wither a new {@link UserRef} or a new {@link GroupRef}  
    * @param participation specifies the kind of involvement of the participant 

Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/activity/ActivityExecution.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/activity/ActivityExecution.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/activity/ActivityExecution.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -289,5 +289,5 @@
   void historyTaskStart(Task task);
 
   /** marks the end of a user task for history purposes. */
-  void historyTaskEnd(String outcome);
+  void historyTaskComplete(String outcome);
 }

Modified: jbpm4/trunk/modules/distro/src/main/resources/config-tool/hibernate/mapping.files/jbpm.history.hbm.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/resources/config-tool/hibernate/mapping.files/jbpm.history.hbm.xml	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/distro/src/main/resources/config-tool/hibernate/mapping.files/jbpm.history.hbm.xml	2009-03-24 11:05:50 UTC (rev 4313)
@@ -68,6 +68,7 @@
     
     <subclass name="HistoryTaskInstanceImpl" discriminator-value="TASK">
       <property name="assignee" column="ASSIGNEE_" />
+      <property name="state" column="STATE_" />
     </subclass>
   </class>
 

Modified: jbpm4/trunk/modules/distro/src/main/resources/config-tool/hibernate/mapping.files/jbpm.identity.hbm.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/resources/config-tool/hibernate/mapping.files/jbpm.identity.hbm.xml	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/distro/src/main/resources/config-tool/hibernate/mapping.files/jbpm.identity.hbm.xml	2009-03-24 11:05:50 UTC (rev 4313)
@@ -11,6 +11,7 @@
     <version name="dbversion" column="DBVERSION_" />
     
     <property name="id" column="ID_" />
+    <property name="password" column="PASSWORD_" />
     <property name="givenName" column="GIVENNAME_" />
     <property name="familyName" column="FAMILYNAME_" />
   </class>

Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/assignee/TaskAssigneeTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/assignee/TaskAssigneeTest.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/assignee/TaskAssigneeTest.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -50,7 +50,7 @@
     assertEquals("johndoe", task.getAssignee());
 
     // submit the task
-    taskService.submitTask(task.getDbid());
+    taskService.completeTask(task.getDbid());
     
     // verify that the task list is now empty
     taskList = taskService.getPersonalTaskList("johndoe", 0, 10);

Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/candidates/TaskCandidatesTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/candidates/TaskCandidatesTest.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/candidates/TaskCandidatesTest.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -37,10 +37,10 @@
     // create johndoe and joesmoe as members of the sales group
     String salesGroupId = identityService.createGroup("sales");
 
-    identityService.createUser("johndoe", "John", "Doe");
+    identityService.createUser("johndoe", "johndoe", "John", "Doe");
     identityService.createMembership("johndoe", salesGroupId);
 
-    identityService.createUser("joesmoe", "Joe", "Smoe");
+    identityService.createUser("joesmoe", "joesmoe", "Joe", "Smoe");
     identityService.createMembership("joesmoe", salesGroupId);
 
     // deploy the process
@@ -77,7 +77,7 @@
     assertEquals("johndoe", task.getAssignee());
     
     // submit the task
-    taskService.submitTask(task.getDbid());
+    taskService.completeTask(task.getDbid());
     
     // verify that the task list is now empty
     taskList = taskService.getPersonalTaskList("johndoe", 0, 10);

Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/swimlane/TaskSwimlaneTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/swimlane/TaskSwimlaneTest.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/task/swimlane/TaskSwimlaneTest.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -36,7 +36,7 @@
     // create johndoe and joesmoe as members of the sales group
     String salesGroupId = identityService.createGroup("sales");
 
-    identityService.createUser("johndoe", "John", "Doe");
+    identityService.createUser("johndoe", "johndoe", "John", "Doe");
     identityService.createMembership("johndoe", salesGroupId);
 
     deployJpdlResource("org/jbpm/examples/task/swimlane/process.jpdl.xml");
@@ -55,7 +55,7 @@
     taskService.takeTask(taskDbid);
     
     // submit the task
-    taskService.submitTask(taskDbid);
+    taskService.completeTask(taskDbid);
 
     // the next task will be created and assigned directly to johndoe
     // this is because johndoe was the person that took the previous task 

Modified: jbpm4/trunk/modules/examples/src/test/resources/jbpm.history.hbm.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/jbpm.history.hbm.xml	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/examples/src/test/resources/jbpm.history.hbm.xml	2009-03-24 11:05:50 UTC (rev 4313)
@@ -68,6 +68,7 @@
     
     <subclass name="HistoryTaskInstanceImpl" discriminator-value="TASK">
       <property name="assignee" column="ASSIGNEE_" />
+      <property name="state" column="STATE_" />
     </subclass>
   </class>
 

Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskActivity.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskActivity.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskActivity.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -66,7 +66,6 @@
     
     Transition transition = activity.findOutgoingTransition(signalName);
     if (transition!=null) {
-      execution.historyTaskEnd(signalName);
       execution.take(transition);
     } else {
       throw new JbpmException("task outcome '"+signalName+"' doesn't match with the an outgoing transition "+activity.getOutgoingTransitions());

Modified: jbpm4/trunk/modules/jpdl/src/test/resources/jbpm.cfg.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/src/test/resources/jbpm.cfg.xml	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/jpdl/src/test/resources/jbpm.cfg.xml	2009-03-24 11:05:50 UTC (rev 4313)
@@ -38,7 +38,7 @@
                     default-script-language="juel"
                     read-contexts="execution, environment, process-engine"
                     write-context="">
-        <script-language name="juel" factory="com.sun.script.juel.JuelScriptEngineFactory" />
+        <script-language name="juel" factory="org.jbpm.pvm.internal.script.JuelScriptEngineFactory" />
     </script-manager>
     
     <authentication />

Modified: jbpm4/trunk/modules/jpdl/src/test/resources/jbpm.history.hbm.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/src/test/resources/jbpm.history.hbm.xml	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/jpdl/src/test/resources/jbpm.history.hbm.xml	2009-03-24 11:05:50 UTC (rev 4313)
@@ -68,6 +68,7 @@
     
     <subclass name="HistoryTaskInstanceImpl" discriminator-value="TASK">
       <property name="assignee" column="ASSIGNEE_" />
+      <property name="state" column="STATE_" />
     </subclass>
   </class>
 

Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CancelTaskCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CancelTaskCmd.java	                        (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CancelTaskCmd.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.cmd;
+
+import org.jbpm.JbpmException;
+import org.jbpm.cmd.Command;
+import org.jbpm.env.Environment;
+import org.jbpm.pvm.internal.task.TaskImpl;
+import org.jbpm.session.DbSession;
+import org.jbpm.task.Assignable;
+
+/**
+ * @author Alejandro Guizar
+ */
+public class CancelTaskCmd extends AbstractCommand<Void> {
+
+  private static final long serialVersionUID = 1L;
+
+  protected long taskDbid;
+  protected String reason;
+
+  public CancelTaskCmd(long taskDbid) {
+    this.taskDbid = taskDbid;
+  }
+
+  public CancelTaskCmd(long taskDbid, String reason) {
+    this.taskDbid = taskDbid;
+    this.reason = reason;
+  }
+
+  public Void execute(Environment environment) throws Exception {
+    DbSession dbSession = environment.get(DbSession.class);
+    TaskImpl task = (TaskImpl) dbSession.get(TaskImpl.class, taskDbid);
+    if (task!=null) {
+      task.cancel(reason);
+      dbSession.delete(task);
+    } else {
+      throw new JbpmException("task "+taskDbid+" doesn't exist");
+    }
+    return null;
+  }
+}


Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CancelTaskCmd.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CompleteTaskCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CompleteTaskCmd.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CompleteTaskCmd.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -33,15 +33,17 @@
   private static final long serialVersionUID = 1L;
   
   protected long taskDbid;
+  protected String outcome;
 
-  public CompleteTaskCmd(long taskDbid) {
+  public CompleteTaskCmd(long taskDbid, String outcome) {
     this.taskDbid = taskDbid;
+    this.outcome = outcome;
   }
 
   public Void execute(Environment environment) throws Exception {
     TaskDbSession taskDbession = environment.get(TaskDbSession.class);
     TaskImpl task = (TaskImpl) taskDbession.findTaskByDbid(taskDbid);
-    task.complete();
+    task.complete(outcome);
     taskDbession.delete(task);
     return null;
   }

Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteTaskCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteTaskCmd.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteTaskCmd.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -1,54 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.pvm.internal.cmd;
-
-import org.jbpm.JbpmException;
-import org.jbpm.cmd.Command;
-import org.jbpm.env.Environment;
-import org.jbpm.pvm.internal.task.TaskImpl;
-import org.jbpm.session.DbSession;
-import org.jbpm.task.Assignable;
-
-/**
- * @author Alejandro Guizar
- */
-public class DeleteTaskCmd extends AbstractCommand<Void> {
-
-  private static final long serialVersionUID = 1L;
-
-  protected long taskDbid;
-
-  public DeleteTaskCmd(long taskDbid) {
-    this.taskDbid = taskDbid;
-  }
-
-  public Void execute(Environment environment) throws Exception {
-    DbSession dbSession = environment.get(DbSession.class);
-    Assignable task = (Assignable) dbSession.get(TaskImpl.class, taskDbid);
-    if (task!=null) {
-      dbSession.delete(task);
-    } else {
-      throw new JbpmException("task "+taskDbid+" doesn't exist");
-    }
-    return null;
-  }
-}

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/ActivityEnd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/ActivityEnd.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/ActivityEnd.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -23,7 +23,6 @@
 
 import org.hibernate.Session;
 import org.jbpm.env.Environment;
-import org.jbpm.history.HistoryActivityInstance;
 import org.jbpm.pvm.internal.history.HistoryEvent;
 import org.jbpm.pvm.internal.history.model.HistoryActivityInstanceImpl;
 import org.jbpm.pvm.internal.util.Clock;
@@ -50,16 +49,16 @@
     Long historyActivityInstanceDbId = execution.getHistoryActivityInstanceDbid();
     HistoryActivityInstanceImpl historyActivityInstance = (HistoryActivityInstanceImpl) 
         session.load(getHistoryActivityInstanceClass(), historyActivityInstanceDbId); 
+    updateHistoryActivityInstance(historyActivityInstance);
+    session.update(historyActivityInstance);
+  }
+
+  protected void updateHistoryActivityInstance(HistoryActivityInstanceImpl historyActivityInstance) {
     historyActivityInstance.setEndTime(Clock.getCurrentTime());
     historyActivityInstance.setTransitionName(transitionName);
-    updateActivitySpecificProperties(historyActivityInstance);
-    session.update(historyActivityInstance);
   }
 
   protected Class<? extends HistoryActivityInstanceImpl> getHistoryActivityInstanceClass() {
     return HistoryActivityInstanceImpl.class;
   }
-
-  protected void updateActivitySpecificProperties(HistoryActivityInstance historyActivityInstanceImpl) {
-  }
 }

Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskComplete.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskComplete.java	                        (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskComplete.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.history.events;
+
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class TaskComplete extends ActivityEnd {
+
+  private static final long serialVersionUID = 1L;
+  
+  protected String outcome;
+
+  public TaskComplete(String outcome) {
+    this.transitionName = outcome;
+  }
+}


Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskComplete.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskDelete.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskDelete.java	                        (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskDelete.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.history.events;
+
+import org.jbpm.pvm.internal.history.model.HistoryActivityInstanceImpl;
+import org.jbpm.pvm.internal.history.model.HistoryTaskInstanceImpl;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class TaskDelete extends ActivityEnd {
+
+  private static final long serialVersionUID = 1L;
+
+  protected String reason;
+  
+  public TaskDelete(String reason) {
+    this.reason = reason;
+  }
+
+  protected void updateHistoryActivityInstance(HistoryActivityInstanceImpl historyActivityInstance) {
+    super.updateHistoryActivityInstance(historyActivityInstance);
+
+    HistoryTaskInstanceImpl historyTaskInstance = (HistoryTaskInstanceImpl) historyActivityInstance;
+    historyTaskInstance.setState(reason);
+  }
+
+  protected Class<? extends HistoryActivityInstanceImpl> getHistoryActivityInstanceClass() {
+    return HistoryTaskInstanceImpl.class;
+  }
+}


Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskDelete.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskEnd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskEnd.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskEnd.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.pvm.internal.history.events;
-
-import org.jbpm.history.HistoryActivityInstance;
-import org.jbpm.pvm.internal.history.model.HistoryActivityInstanceImpl;
-import org.jbpm.pvm.internal.history.model.HistoryTaskInstanceImpl;
-
-
-/**
- * @author Tom Baeyens
- */
-public class TaskEnd extends ActivityEnd {
-
-  private static final long serialVersionUID = 1L;
-  
-  protected String outcome;
-
-  public TaskEnd(String outcome) {
-    this.outcome = outcome;
-  }
-
-  protected Class<? extends HistoryActivityInstanceImpl> getHistoryActivityInstanceClass() {
-    return HistoryTaskInstanceImpl.class;
-  }
-
-  protected void updateActivitySpecificProperties(HistoryActivityInstance historyActivityInstanceImpl) {
-    HistoryTaskInstanceImpl historyTaskInstanceImpl = (HistoryTaskInstanceImpl) historyActivityInstanceImpl;
-    historyTaskInstanceImpl.setTransitionName(outcome);
-  }
-}

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryTaskInstanceImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryTaskInstanceImpl.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryTaskInstanceImpl.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -33,12 +33,27 @@
   private static final long serialVersionUID = 1L;
 
   protected String assignee;
+  protected String state;
   
   public HistoryTaskInstanceImpl() {
+    this.state = "active";
   }
 
   public HistoryTaskInstanceImpl(HistoryProcessInstance historyProcessInstanceImpl, ExecutionImpl execution, String assignee) {
     super(historyProcessInstanceImpl, execution);
     this.assignee = assignee;
   }
+  
+  public String getAssignee() {
+    return assignee;
+  }
+  public void setAssignee(String assignee) {
+    this.assignee = assignee;
+  }
+  public String getState() {
+    return state;
+  }
+  public void setState(String state) {
+    this.state = state;
+  }
 }

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/CreateUser.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/CreateUser.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/CreateUser.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -34,11 +34,13 @@
   private static final long serialVersionUID = 1L;
 
   protected String userId;
+  protected String password;
   protected String givenName;
   protected String familyName;
   
-  public CreateUser(String userId, String givenName, String familyName) {
+  public CreateUser(String userId, String password, String givenName, String familyName) {
     this.userId = userId;
+    this.password = password;
     this.givenName = givenName;
     this.familyName = familyName;
   }
@@ -46,7 +48,7 @@
 
   public Void execute(Environment environment) throws Exception {
     IdentitySession identitySession = environment.get(IdentitySession.class);
-    identitySession.createUser(userId, givenName, familyName);
+    identitySession.createUser(userId, password, givenName, familyName);
     return null;
   }
 

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/IdentitySessionImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/IdentitySessionImpl.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/IdentitySessionImpl.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -37,9 +37,10 @@
   
   protected Session session;
 
-  public void createUser(String userName, String givenName, String familyName) {
+  public void createUser(String userName, String password, String givenName, String familyName) {
     UserImpl user = new UserImpl();
     user.setId(userName);
+    user.setPassword(password);
     user.setGivenName(givenName);
     user.setFamilyName(familyName);
     session.save(user);

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/JBossIdmIdentitySessionImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/JBossIdmIdentitySessionImpl.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/JBossIdmIdentitySessionImpl.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -60,8 +60,11 @@
     transaction.enlistResource(identitySessionResource);
   }
 
-  public void createUser(String userName, String givenName, String lastName) {
+  public void createUser(String userName, String password, String givenName, String lastName) {
     try {
+      
+      // TODO add the password
+      
       Identity identity = identitySession.getPersistenceManager().createIdentity(userName);
       Attribute[] attributes = new Attribute[] { 
         new SimpleAttribute(P3PConstants.INFO_USER_NAME_GIVEN, new String[] { givenName }),

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/UserImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/UserImpl.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/impl/UserImpl.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -37,6 +37,7 @@
   protected int dbversion;
 
   protected String id;
+  protected String password;
   protected String givenName;
   protected String familyName;
 
@@ -77,4 +78,10 @@
   public void setFamilyName(String familyName) {
     this.familyName = familyName;
   }
+  public String getPassword() {
+    return password;
+  }
+  public void setPassword(String password) {
+    this.password = password;
+  }
 }

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/spi/IdentitySession.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/spi/IdentitySession.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/spi/IdentitySession.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -33,7 +33,7 @@
 public interface IdentitySession {
 
   /** create a new user */
-  void createUser(String userId, String givenName, String familyName);
+  void createUser(String userId, String password, String givenName, String familyName);
   
   /** lookup a user 
    * @return the user or null if no such user exists */

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -62,7 +62,8 @@
 import org.jbpm.pvm.internal.history.events.ExclusiveEnd;
 import org.jbpm.pvm.internal.history.events.ProcessInstanceEnd;
 import org.jbpm.pvm.internal.history.events.ProcessInstanceStart;
-import org.jbpm.pvm.internal.history.events.TaskEnd;
+import org.jbpm.pvm.internal.history.events.TaskComplete;
+import org.jbpm.pvm.internal.history.events.TaskDelete;
 import org.jbpm.pvm.internal.history.events.TaskStart;
 import org.jbpm.pvm.internal.job.MessageImpl;
 import org.jbpm.pvm.internal.model.op.AtomicOperation;
@@ -993,10 +994,15 @@
     fireHistoryEvent(new TaskStart(task));
   }
 
-  public void historyTaskEnd(String outcome) {
-    fireHistoryEvent(new TaskEnd(outcome));
+  public void historyTaskComplete(String outcome) {
+    fireHistoryEvent(new TaskComplete(outcome));
   }
   
+  public void historyTaskDelete(String reason) {
+    fireHistoryEvent(new TaskDelete(reason));
+  }
+
+  
   // extensions ///////////////////////////////////////////////////////////////
 
   public <T> T getExtension(Class<T> extensionClass) {

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/IdentityServiceImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/IdentityServiceImpl.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/IdentityServiceImpl.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -46,8 +46,8 @@
   
   protected CommandService commandService;
 
-  public void createUser(String userId, String givenName, String familyName) {
-    commandService.execute(new CreateUser(userId, givenName, familyName));
+  public void createUser(String userId, String password, String givenName, String familyName) {
+    commandService.execute(new CreateUser(userId, password, givenName, familyName));
   }
 
   public User findUserById(String userId) {

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/TaskServiceImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/TaskServiceImpl.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/TaskServiceImpl.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -32,9 +32,9 @@
 import org.jbpm.pvm.internal.cmd.AddParticipantCmd;
 import org.jbpm.pvm.internal.cmd.AddReplyCommentCmd;
 import org.jbpm.pvm.internal.cmd.AddTaskCommentCmd;
-import org.jbpm.pvm.internal.cmd.CompositeCmd;
+import org.jbpm.pvm.internal.cmd.CancelTaskCmd;
+import org.jbpm.pvm.internal.cmd.CompleteTaskCmd;
 import org.jbpm.pvm.internal.cmd.DeleteCommentCmd;
-import org.jbpm.pvm.internal.cmd.DeleteTaskCmd;
 import org.jbpm.pvm.internal.cmd.GetParticipantsCmd;
 import org.jbpm.pvm.internal.cmd.GetSubTasksCmd;
 import org.jbpm.pvm.internal.cmd.GetTaskCmd;
@@ -45,7 +45,6 @@
 import org.jbpm.pvm.internal.cmd.RemoveParticipantCmd;
 import org.jbpm.pvm.internal.cmd.SaveTaskCmd;
 import org.jbpm.pvm.internal.cmd.SetVariablesCmd;
-import org.jbpm.pvm.internal.cmd.CompleteTaskCmd;
 import org.jbpm.pvm.internal.cmd.TakeTaskCmd;
 import org.jbpm.pvm.internal.task.TaskImpl;
 import org.jbpm.pvm.internal.task.TaskQueryImpl;
@@ -54,7 +53,7 @@
 import org.jbpm.task.Task;
 
 /**
- * @author Alejandro Guizar
+ * @author Alejandro Guizar, Tom Baeyens
  */
 public class TaskServiceImpl extends AbstractServiceImpl implements TaskService {
 
@@ -74,23 +73,23 @@
     return commandService.execute(cmd);
   }
 
-  public void deleteTask(long taskDbid) {
-    DeleteTaskCmd cmd = new DeleteTaskCmd(taskDbid);
+  public void cancelTask(long taskDbid) {
+    CancelTaskCmd cmd = new CancelTaskCmd(taskDbid);
     commandService.execute(cmd);
   }
 
-  public void submitTask(long taskDbid) {
-    CompleteTaskCmd cmd = new CompleteTaskCmd(taskDbid);
+  public void cancelTask(long taskDbid, String reason) {
+    CancelTaskCmd cmd = new CancelTaskCmd(taskDbid, reason);
     commandService.execute(cmd);
   }
+
+  public void completeTask(long taskDbid) {
+    completeTask(taskDbid, null);
+  }
   
-  public void submit(long taskDbid, Map<String, Object> variables) {
-    CompositeCmd compositeCmd = new CompositeCmd();
-    SetVariablesCmd setVariablesCommand = new SetVariablesCmd(taskDbid);
-    setVariablesCommand.setVariables(variables);
-    compositeCmd.addCommand(setVariablesCommand);
-    compositeCmd.addCommand(new CompleteTaskCmd(taskDbid));
-    commandService.execute(compositeCmd);
+  public void completeTask(long taskDbid, String outcome) {
+    CompleteTaskCmd cmd = new CompleteTaskCmd(taskDbid, outcome);
+    commandService.execute(cmd);
   }
 
   public void addTaskParticipant(long taskDbid, IdentityRef identityRef, String participation) {

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskImpl.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskImpl.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -191,21 +191,25 @@
   // completion ///////////////////////////////////////////////////////////////
 
   public void complete() {
+    complete(null);
+  }
+
+  public void complete(String outcome) {
     if (execution!=null) {
-      // the outcome is dynamically calculated based on e.g. a 
-      // variable or a decision table on a variable.  an 
-      // interface OutcomeEvaluator for user defined outcome calculation 
-      // could be envisioned.
-      String outcome = evaluateOutcome();
+      execution.historyTaskComplete(outcome);
+      execution.historyTaskDelete("completed");
+      
+      // TODO propagate the outjected variables to the execution
 
       // the outcome serves as the signal given to the execution.
       execution.signal(outcome);
     }
   }
 
-  public String evaluateOutcome() {
-    // for now, only the default signal can be given.
-    return null;
+  public void cancel(String reason) {
+    if (execution!=null) {
+      execution.historyTaskDelete(reason);
+    }
   }
 
   // comments /////////////////////////////////////////////////////////////////

Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/identity/IdentityTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/identity/IdentityTest.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/identity/IdentityTest.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -37,7 +37,7 @@
   public void testSingleUser() throws Exception {
     IdentityService identityService = processEngine.get(IdentityService.class);
     
-    identityService.createUser("johndoe", "John", "Doe");
+    identityService.createUser("johndoe", "johndoe", "John", "Doe");
     
     List<User> users = identityService.findUsers();
     assertNotNull(users);
@@ -57,9 +57,9 @@
   public void testSingleGroup() throws Exception {
     IdentityService identityService = processEngine.get(IdentityService.class);
     
-    identityService.createUser("johndoe", "John", "Doe");
-    identityService.createUser("joesmoe", "Joe", "Smoe");
-    identityService.createUser("jackblack", "Jack", "Black");
+    identityService.createUser("johndoe", "johndoe", "John", "Doe");
+    identityService.createUser("joesmoe", "joesmoe", "Joe", "Smoe");
+    identityService.createUser("jackblack", "jackblack", "Jack", "Black");
     
     String redhatId = identityService.createGroup("redhat", Group.TYPE_UNIT, null);
     String jbossId = identityService.createGroup("jboss", Group.TYPE_UNIT, "redhat");

Modified: jbpm4/trunk/modules/pvm/src/test/resources/jbpm.history.hbm.xml
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/resources/jbpm.history.hbm.xml	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/pvm/src/test/resources/jbpm.history.hbm.xml	2009-03-24 11:05:50 UTC (rev 4313)
@@ -68,6 +68,7 @@
     
     <subclass name="HistoryTaskInstanceImpl" discriminator-value="TASK">
       <property name="assignee" column="ASSIGNEE_" />
+      <property name="state" column="STATE_" />
     </subclass>
   </class>
 

Modified: jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/JbpmTestCase.java
===================================================================
--- jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/JbpmTestCase.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/JbpmTestCase.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -121,7 +121,7 @@
 
     if (registeredTaskIds != null) {
       for (Long taskDbid : registeredTaskIds) {
-        taskService.deleteTask(taskDbid);
+        taskService.cancelTask(taskDbid);
       }
     }
 

Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/SubTaskTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/SubTaskTest.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/SubTaskTest.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -116,7 +116,7 @@
     assertEquals(expectedTaskNames, subTaskNames);
     
     // delete task dishes
-    taskService.deleteTask(dishesTaskDbid);
+    taskService.cancelTask(dishesTaskDbid);
 
     // verify all the sub tasks of 'clean da house' and 'sweep floor'
     
@@ -139,8 +139,8 @@
 
     // delete laundry and delete sweep floor
     // NOTE: deleting sweep floor should recursively delete the subtasks
-    taskService.deleteTask(laundryTaskDbid);
-    taskService.deleteTask(sweepFloorTaskDbid);
+    taskService.cancelTask(laundryTaskDbid);
+    taskService.cancelTask(sweepFloorTaskDbid);
 
     subTaskNames = getTaskNames(taskService.getSubTasks(taskDbid));
 

Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskCandidatesTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskCandidatesTest.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskCandidatesTest.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -80,7 +80,7 @@
     assertEquals("johndoe", task.getAssignee());
     
     // submit the task
-    taskService.submitTask(task.getDbid());
+    taskService.completeTask(task.getDbid());
     
     // verify that the task list is now empty
     taskList = taskService.getPersonalTaskList("johndoe", 0, 10);
@@ -139,7 +139,7 @@
     assertEquals("johndoe", task.getAssignee());
     
     // submit the task
-    taskService.submitTask(task.getDbid());
+    taskService.completeTask(task.getDbid());
     
     // verify that the task list is now empty
     taskList = taskService.getPersonalTaskList("johndoe", 0, 10);

Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskCommentsTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskCommentsTest.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskCommentsTest.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -67,6 +67,6 @@
     
     // the following should delete the remaining comment.  if not, this 
     // will show up as a fixme.
-    taskService.deleteTask(taskDbid);
+    taskService.cancelTask(taskDbid);
   }
 }

Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskCreateUpdateDeleteTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskCreateUpdateDeleteTest.java	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskCreateUpdateDeleteTest.java	2009-03-24 11:05:50 UTC (rev 4313)
@@ -64,7 +64,7 @@
     // task was made persistent
     assertNotNull("expected non-null task", taskService.getTask(taskDbid));
     // delete task and verify it does not exist
-    taskService.deleteTask(taskDbid);
+    taskService.cancelTask(taskDbid);
     task = taskService.getTask(taskDbid);
     assertNull("expected null, but was " + task, task);
   }

Modified: jbpm4/trunk/modules/test-db/src/test/resources/jbpm.cfg.xml
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/resources/jbpm.cfg.xml	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/test-db/src/test/resources/jbpm.cfg.xml	2009-03-24 11:05:50 UTC (rev 4313)
@@ -38,7 +38,7 @@
                     default-script-language="juel"
                     read-contexts="execution, environment, process-engine"
                     write-context="">
-        <script-language name="juel" factory="com.sun.script.juel.JuelScriptEngineFactory" />
+        <script-language name="juel" factory="org.jbpm.pvm.internal.script.JuelScriptEngineFactory" />
     </script-manager>
     
     <authentication />

Modified: jbpm4/trunk/modules/test-db/src/test/resources/jbpm.history.hbm.xml
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/resources/jbpm.history.hbm.xml	2009-03-24 09:01:40 UTC (rev 4312)
+++ jbpm4/trunk/modules/test-db/src/test/resources/jbpm.history.hbm.xml	2009-03-24 11:05:50 UTC (rev 4313)
@@ -68,6 +68,7 @@
     
     <subclass name="HistoryTaskInstanceImpl" discriminator-value="TASK">
       <property name="assignee" column="ASSIGNEE_" />
+      <property name="state" column="STATE_" />
     </subclass>
   </class>
 




More information about the jbpm-commits mailing list