JBoss JBPM SVN: r5254 - in jbpm4/trunk: modules/api/src/main/java/org/jbpm/api/history and 33 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-07-07 14:00:05 -0400 (Tue, 07 Jul 2009)
New Revision: 5254
Added:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryComment.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryTask.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryTaskQuery.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateHistoryTaskQueryCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskActivityStart.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskCreated.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskUpdated.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryCommentImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryTaskImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryTaskQueryImpl.java
Removed:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Comment.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskStart.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/CommentImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskHandler.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskHandlerTest.java
Modified:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ExecutionService.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/HistoryService.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/TaskService.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryProcessInstanceQuery.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Discussable.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/Task.java
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/jbpm.erd.png
jbpm4/trunk/modules/distro/src/main/files/readme.html
jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/custom/InsertCommentCmd.java
jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/custom/RemoveCommentCmd.java
jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/hql/HqlTest.java
jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/sql/SqlTest.java
jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/console/ModelAdaptor.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SubProcessActivity.java
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/xml/JpdlParser.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AddReplyCommentCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AddTaskCommentCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AssignTaskCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteCommentCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteDeploymentCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteProcessInstance.java
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/GetTaskCommentsCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SaveTaskCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/DbSessionImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/HistoryEvent.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/HistorySessionImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/ActivityStart.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/ProcessInstanceEnd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskAssign.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
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryProcessInstanceImpl.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/job/JobImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.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/model/ScopeInstanceImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryProcessInstanceQueryImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/session/DbSession.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/session/TimerSession.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/ExecutionServiceImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/HistoryServiceImpl.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/TaskDefinitionImpl.java
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/test/JobTestHelper.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/WireContext.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ObjectDescriptor.java
jbpm4/trunk/modules/pvm/src/main/resources/jbpm.execution.hbm.xml
jbpm4/trunk/modules/pvm/src/main/resources/jbpm.history.hbm.xml
jbpm4/trunk/modules/pvm/src/main/resources/jbpm.task.hbm.xml
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/AutoWireTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/tx/BasicTransactionTest.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/eventlistener/HqlEventListenerTest.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/TaskCommentsTest.java
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/TaskListTest.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskParticipationsTest.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskQueryCandidatesTest.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskQueryTest.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskVariablesTest.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/taskactivity/TaskReassignTest.java
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailOnceMessageTest.java
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailOnceTestCommand.java
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailingMessageTest.java
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailingTestCommand.java
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/NormalMessageCommand.java
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/NormalMessageTest.java
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/messages/AddCommentCmd.java
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/messages/MessageProcessingTest.java
jbpm4/trunk/qa/hudson-jbpm4-jboss.bat
Log:
JBPM-2390 fix tasks and task comments the history
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ExecutionService.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ExecutionService.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ExecutionService.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -119,6 +119,10 @@
/** end a process instance */
void endProcessInstance(String processInstanceId, String state);
- /** delete a process instance */
+ /** delete a process instance. The history information will still be
+ * in the database. */
void deleteProcessInstance(String processInstanceId);
+
+ /** delete a process instance, including the history information. */
+ void deleteProcessInstanceCascade(String processInstanceId);
}
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/HistoryService.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/HistoryService.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/HistoryService.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -25,6 +25,7 @@
import org.jbpm.api.history.HistoryActivityInstanceQuery;
import org.jbpm.api.history.HistoryProcessInstanceQuery;
+import org.jbpm.api.history.HistoryTaskQuery;
/** exposes the history information for ongoing and past
@@ -40,6 +41,9 @@
/** search in history activity instance information */
HistoryActivityInstanceQuery createHistoryActivityInstanceQuery();
+ /** search in history task information */
+ HistoryTaskQuery createHistoryTaskQuery();
+
/** returns the average duration in milliseconds for each activity in the given process definition */
Map<String, Long> avgDurationPerActivity(String processDefinitionId);
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/TaskService.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/TaskService.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/TaskService.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -21,8 +21,8 @@
*/
package org.jbpm.api;
+import org.jbpm.api.history.HistoryComment;
import org.jbpm.api.history.HistoryActivityInstance;
-import org.jbpm.api.model.Comment;
import org.jbpm.api.task.Participation;
import org.jbpm.api.task.Task;
@@ -32,7 +32,7 @@
/** task management.
*
- * @author Tome Baeyens
+ * @author Tom Baeyens
* @author Alejandro Guizar
* @author Heiko Braun <heiko.braun(a)jboss.com>
*/
@@ -87,13 +87,18 @@
void completeTask(String taskId, String outcome);
/** Deletes the task without completing it.
+ * The history information is kept in the DB.
* If this task was created in the context of a process execution,
* the execution remains active and the {@link ExecutionService#signalExecutionById(String)}
* is to be given explicitly. */
void deleteTask(String taskId);
+ /** deletes this task, including all history information */
+ void deleteTaskCascade(String taskId);
+
/** Deletes the task without completing indicating the reason. Example reasons
* could be: "failed", "error", "exited", "obsolete" or "deleted".
+ * The history information is kept in the DB.
* The reason ends up as the state in the {@link HistoryActivityInstance}.
* If this task was created in the context of a process execution,
* the execution remains active and the {@link ExecutionService#signalExecutionById(String)}
@@ -140,15 +145,15 @@
List<Task> getSubTasks(String taskId);
/** add a comment to a task */
- Comment addTaskComment(String taskId, String message);
+ HistoryComment addTaskComment(String taskId, String message);
/** get the list of comments made to a task. this will
* fetch all the comments and recursively all replies to those
* comments. */
- List<Comment> getTaskComments(String taskId);
+ List<HistoryComment> getTaskComments(String taskId);
/** add a reply to another comment */
- Comment addReplyComment(String commentId, String message);
+ HistoryComment addReplyComment(String commentId, String message);
/** delete a comment.
* this will recursively delete all replies to this comment. */
Copied: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryComment.java (from rev 5230, jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Comment.java)
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryComment.java (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryComment.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -0,0 +1,56 @@
+/*
+ * 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.api.history;
+
+import java.util.Date;
+import java.util.List;
+
+import org.jbpm.api.Execution;
+import org.jbpm.api.model.Discussable;
+
+/** a free text comment that can be made to an {@link Execution}
+ * or a task.
+ *
+ * This class also supports threaded discussions with the
+ * {@link #getComments() parent-child relation}.
+ *
+ * @author Tom Baeyens
+ */
+public interface HistoryComment extends Discussable {
+
+ /** the unique id for this comment that is used as a reference in the service methods */
+ String getId();
+
+ /** the id of the user that made this comment. The term actorId is an abstract
+ * reference to an entity in an external identity component. */
+ String getUserId();
+
+ /** the actual message. Both plain text as well as HTML can be stored
+ * as the message. */
+ String getMessage();
+
+ /** time that specifies when the comment was made */
+ Date getTime();
+
+ /** threaded replies to this comment */
+ List<HistoryComment> getComments();
+}
\ No newline at end of file
Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryComment.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryProcessInstanceQuery.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryProcessInstanceQuery.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryProcessInstanceQuery.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -41,12 +41,18 @@
/** duration property to be used as property in {@link #orderAsc(String)} and {@link #orderDesc(String)} */
String PROPERTY_DURATION = "duration";
+ /** select only the process instances with the given id */
HistoryProcessInstanceQuery processInstanceId(String processInstanceId);
+
+ /** select only process instances within the given process definition */
HistoryProcessInstanceQuery processDefinitionId(String processDefinitionId);
+
+ /** select only process instances in the given state */
HistoryProcessInstanceQuery state(String state);
/** order selected process instances ascending for certain {@link #PROPERTY_STARTTIME properties} */
HistoryProcessInstanceQuery orderAsc(String property);
+
/** order selected process instances ascending for certain {@link #PROPERTY_STARTTIME properties} */
HistoryProcessInstanceQuery orderDesc(String property);
Added: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryTask.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryTask.java (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryTask.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -0,0 +1,66 @@
+/*
+ * 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.api.history;
+
+import java.util.Date;
+import java.util.List;
+
+import org.jbpm.api.task.Task;
+
+
+/** history record for a task instance.
+ *
+ * In contrast to the {@link Task}, this entity will remain
+ * after the task has been completed for history purposes.
+ *
+ * @author Tom Baeyens
+ */
+public interface HistoryTask {
+
+ String STATE_COMPLETED = "completed";
+
+ /** the unique id for this task that is used as a reference in the service methods */
+ String getId();
+
+ List<? extends HistoryComment> getComments();
+
+ /** the execution that was related to this activity occurrence */
+ String getExecutionId();
+
+ /** time when the activity was entered */
+ Date getCreateTime();
+
+ /** might be null in case the activity is still active */
+ Date getEndTime();
+
+ /** duration in milleseconds */
+ long getDuration();
+
+ /** history task state */
+ String getState();
+
+ /** userId of the person that is responsible for this task */
+ String getAssignee();
+
+ /** the outcome of this task */
+ String getOutcome();
+}
\ No newline at end of file
Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryTask.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryTaskQuery.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryTaskQuery.java (rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryTaskQuery.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -0,0 +1,92 @@
+/*
+ * 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.api.history;
+
+import java.util.Date;
+import java.util.List;
+
+
+/** query for history tasks.
+ *
+ * @author Tom Baeyens
+ */
+public interface HistoryTaskQuery {
+
+ /** id property to be used as property in {@link #orderAsc(String)} and {@link #orderDesc(String)} */
+ String PROPERTY_ID = "dbid";
+ /** starttime property to be used as property in {@link #orderAsc(String)} and {@link #orderDesc(String)} */
+ String PROPERTY_STARTTIME = "startTime";
+ /** endtime property to be used as property in {@link #orderAsc(String)} and {@link #orderDesc(String)} */
+ String PROPERTY_ENDTIME = "endTime";
+ /** executionId property to be used as property in {@link #orderAsc(String)} and {@link #orderDesc(String)} */
+ String PROPERTY_EXECUTIONID = "executionId";
+ /** outcome property to be used as property in {@link #orderAsc(String)} and {@link #orderDesc(String)} */
+ String PROPERTY_OUTCOME = "outcome";
+ /** outcome property to be used as property in {@link #orderAsc(String)} and {@link #orderDesc(String)} */
+ String PROPERTY_ASSIGNEE = "assignee";
+ /** state property to be used as property in {@link #orderAsc(String)} and {@link #orderDesc(String)} */
+ String PROPERTY_STATE = "state";
+ /** duration property to be used as property in {@link #orderAsc(String)} and {@link #orderDesc(String)} */
+ String PROPERTY_DURATION = "duration";
+
+ /** only select the history task for the given id */
+ HistoryTaskQuery taskId(String taskId);
+
+ /** only select history tasks within the given execution */
+ HistoryTaskQuery executionId(String executionId);
+
+ /** only select history tasks for the given assignee */
+ HistoryTaskQuery assignee(String assignee);
+
+ /** only select history tasks in the given state */
+ HistoryTaskQuery state(String state);
+
+ /** only select history tasks that have the given outcome */
+ HistoryTaskQuery outcome(String outcome);
+
+ /** order selected history tasks ascending for certain {@link #PROPERTY_ID properties} */
+ HistoryTaskQuery orderAsc(String property);
+
+ /** order selected process definitions descending for certain {@link #PROPERTY_ID properties} */
+ HistoryTaskQuery orderDesc(String property);
+
+ /** select a specific page in the result set */
+ HistoryTaskQuery page(int firstResult, int maxResults);
+
+ /** only select history tasks started after the given time */
+ HistoryTaskQuery startedAfter(Date time);
+
+ /** only select history tasks started before the given time */
+ HistoryTaskQuery startedBefore(Date time);
+
+ /** only select history tasks that took less then the given duration in milliseconds */
+ HistoryTaskQuery tookLessThen(long durationInMillis);
+
+ /** only select history tasks that took longer then the given duration in milliseconds */
+ HistoryTaskQuery tookLongerThen(long durationInMillis);
+
+ /** execute the query and obtain the list of {@link HistoryTask}s */
+ List<HistoryTask> list();
+
+ /** execute the query and obtain the unique {@link HistoryTask} */
+ HistoryTask uniqueResult();
+}
Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryTaskQuery.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Comment.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Comment.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Comment.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -1,55 +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.api.model;
-
-import java.util.Date;
-import java.util.List;
-
-import org.jbpm.api.Execution;
-
-/** a free text comment that can be made to an {@link Execution}
- * or a task.
- *
- * This class also supports threaded discussions with the
- * {@link #getComments() parent-child relation}.
- *
- * @author Tom Baeyens
- */
-public interface Comment extends Discussable {
-
- /** the unique id for this comment that is used as a reference in the service methods */
- String getId();
-
- /** the id of the user that made this comment. The term actorId is an abstract
- * reference to an entity in an external identity component. */
- String getUserId();
-
- /** the actual message. Both plain text as well as HTML can be stored
- * as the message. */
- String getMessage();
-
- /** time that specifies when the comment was made */
- Date getTime();
-
- /** threaded replies to this comment */
- List<Comment> getComments();
-}
\ No newline at end of file
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Discussable.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Discussable.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/Discussable.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -24,6 +24,7 @@
import java.util.List;
import org.jbpm.api.TaskService;
+import org.jbpm.api.history.HistoryComment;
/** something that people can discuss like a task
@@ -37,11 +38,11 @@
public interface Discussable {
/** all comments. */
- List<Comment> getComments();
+ List<HistoryComment> getComments();
/** create a comment */
- Comment createComment(String message);
+ HistoryComment createComment(String message);
/** remove a comment */
- void removeComment(Comment comment);
+ void removeComment(HistoryComment comment);
}
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/Task.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/Task.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/Task.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -25,9 +25,13 @@
import java.util.Date;
import org.jbpm.api.TaskService;
+import org.jbpm.api.history.HistoryTask;
-/** a task.
+/** a runtime task.
*
+ * In contrast to {@link HistoryTask}, a Task only represents the runtime
+ * state of a task and hence it will be deleted after it is completed.
+ *
* @author Tom Baeyens
*/
public interface Task extends Serializable {
@@ -70,14 +74,14 @@
void setAssignee(String assignee);
/** date and time when this task was created */
- Date getCreate();
+ Date getCreateTime();
/** date and time when this task must be completed. This might be null. */
- Date getDueDate();
+ Date getDuedate();
/** update the date and time when this task must be completed.
* Updates like this require you to invoke {@link TaskService#saveTask(Task)} afterwards. */
- void setDueDate(Date dueDate);
+ void setDuedate(Date duedate);
/** the priority of this task. This is only a data item for user purposes.
* The engine doesn't do anything different for different priorities. */
Modified: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/jbpm.erd.png
===================================================================
(Binary files differ)
Modified: jbpm4/trunk/modules/distro/src/main/files/readme.html
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/readme.html 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/distro/src/main/files/readme.html 2009-07-07 18:00:05 UTC (rev 5254)
@@ -76,6 +76,8 @@
</li>
<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2389'>JBPM-2389</a>] - Reassignment is not reflected in task history
</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2390'>JBPM-2390</a>] - add tasks and task comments the history
+</li>
</ul>
<h2> Feature Request
Modified: jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/custom/InsertCommentCmd.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/custom/InsertCommentCmd.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/custom/InsertCommentCmd.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -25,7 +25,7 @@
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.env.Environment;
-import org.jbpm.pvm.internal.model.CommentImpl;
+import org.jbpm.pvm.internal.history.model.HistoryCommentImpl;
import org.jbpm.pvm.internal.session.DbSession;
/**
@@ -48,7 +48,7 @@
}
public Void execute(Environment environment) throws Exception {
- CommentImpl comment = new CommentImpl();
+ HistoryCommentImpl comment = new HistoryCommentImpl();
comment.setMessage(message);
environment.get(DbSession.class).save(comment);
if (fail)
Modified: jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/custom/RemoveCommentCmd.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/custom/RemoveCommentCmd.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/custom/RemoveCommentCmd.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -28,7 +28,7 @@
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.env.Environment;
-import org.jbpm.pvm.internal.model.CommentImpl;
+import org.jbpm.pvm.internal.history.model.HistoryCommentImpl;
/**
* @author Alejandro Guizar
@@ -45,13 +45,13 @@
public Boolean execute(Environment environment) throws Exception {
Session session = environment.get(Session.class);
- List<?> comments = session.createCriteria(CommentImpl.class)
+ List<?> comments = session.createCriteria(HistoryCommentImpl.class)
.add(Restrictions.eq("message", message))
.setMaxResults(1)
.list();
if (comments.isEmpty())
return false;
- CommentImpl phrase = (CommentImpl) comments.get(0);
+ HistoryCommentImpl phrase = (HistoryCommentImpl) comments.get(0);
session.delete(phrase);
return true;
}
Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/hql/HqlTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/hql/HqlTest.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/hql/HqlTest.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -67,9 +67,9 @@
protected void tearDown() throws Exception {
repositoryService.deleteDeploymentCascade(deploymentId);
- taskService.deleteTask(taskLaundryId);
- taskService.deleteTask(taskDishesId);
- taskService.deleteTask(taskIronId);
+ taskService.deleteTaskCascade(taskLaundryId);
+ taskService.deleteTaskCascade(taskDishesId);
+ taskService.deleteTaskCascade(taskIronId);
super.tearDown();
}
Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/sql/SqlTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/sql/SqlTest.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/sql/SqlTest.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -67,9 +67,9 @@
protected void tearDown() throws Exception {
repositoryService.deleteDeploymentCascade(deploymentId);
- taskService.deleteTask(taskLaundryId);
- taskService.deleteTask(taskDishesId);
- taskService.deleteTask(taskIronId);
+ taskService.deleteTaskCascade(taskLaundryId);
+ taskService.deleteTaskCascade(taskDishesId);
+ taskService.deleteTaskCascade(taskIronId);
super.tearDown();
}
Modified: jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/console/ModelAdaptor.java
===================================================================
--- jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/console/ModelAdaptor.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/console/ModelAdaptor.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -158,8 +158,8 @@
// prio and duedate
task.setPriority(t0.getPriority());
- task.setDueDate(t0.getDueDate());
- task.setCreateDate(t0.getCreate());
+ task.setDueDate(t0.getDuedate());
+ task.setCreateDate(t0.getCreateTime());
// task formResourceName url
String url = t0.getFormResourceName()!=null ? t0.getFormResourceName() : "";
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SubProcessActivity.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SubProcessActivity.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SubProcessActivity.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -81,6 +81,8 @@
inParameter.produce(executionImpl, subProcessInstance);
}
+ executionImpl.historyActivityStart();
+
subProcessInstance.start();
execution.waitForSignal();
}
@@ -143,6 +145,8 @@
environment.setContext(originalExecutionContext);
}
}
+
+ executionImpl.historyActivityEnd();
if (transitionName!=null) {
execution.take(transitionName);
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-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskActivity.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -28,12 +28,16 @@
import org.jbpm.api.task.Task;
import org.jbpm.internal.log.Log;
import org.jbpm.pvm.internal.env.Environment;
+import org.jbpm.pvm.internal.history.HistoryEvent;
+import org.jbpm.pvm.internal.history.events.TaskActivityStart;
import org.jbpm.pvm.internal.model.Activity;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.model.Transition;
import org.jbpm.pvm.internal.session.DbSession;
+import org.jbpm.pvm.internal.task.ParticipationImpl;
+import org.jbpm.pvm.internal.task.SwimlaneDefinitionImpl;
+import org.jbpm.pvm.internal.task.SwimlaneImpl;
import org.jbpm.pvm.internal.task.TaskDefinitionImpl;
-import org.jbpm.pvm.internal.task.TaskHandler;
import org.jbpm.pvm.internal.task.TaskImpl;
@@ -49,8 +53,47 @@
protected TaskDefinitionImpl taskDefinition;
public void execute(ActivityExecution execution) {
- ExecutionImpl executionImpl = (ExecutionImpl) execution;
- TaskImpl task = executionImpl.createTask(taskDefinition);
+ execute((ExecutionImpl)execution);
+ }
+
+ public void execute(ExecutionImpl execution) {
+ DbSession dbSession = Environment.getFromCurrent(DbSession.class);
+ TaskImpl task = (TaskImpl) dbSession.createTask();
+ task.setTaskDefinition(taskDefinition);
+ task.setExecution(execution);
+ task.setProcessInstance(execution.getProcessInstance());
+ task.setSignalling(true);
+
+ // initialize the name
+ if (taskDefinition.getName()!=null) {
+ task.setName(taskDefinition.getName());
+ } else {
+ task.setName(execution.getActivityName());
+ }
+
+ task.setDescription(taskDefinition.getDescription());
+ task.setPriority(taskDefinition.getPriority());
+ task.setFormResourceName(taskDefinition.getFormResourceName());
+
+ // save task so that TaskDbSession.findTaskByExecution works for assign event listeners
+ dbSession.save(task);
+
+ SwimlaneDefinitionImpl swimlaneDefinition = taskDefinition.getSwimlaneDefinition();
+ if (swimlaneDefinition!=null) {
+ SwimlaneImpl swimlane = execution.getInitializedSwimlane(swimlaneDefinition);
+ task.setSwimlane(swimlane);
+
+ // copy the swimlane assignments to the task
+ task.setAssignee(swimlane.getAssignee());
+ for (ParticipationImpl participant: swimlane.getParticipations()) {
+ task.addParticipation(participant.getUserId(), participant.getGroupId(), participant.getType());
+ }
+ }
+
+ execution.initializeAssignments(taskDefinition, task);
+
+ HistoryEvent.fire(new TaskActivityStart(task), execution);
+
execution.waitForSignal();
}
@@ -70,8 +113,7 @@
DbSession taskDbSession = Environment
.getFromCurrent(DbSession.class);
TaskImpl task = (TaskImpl) taskDbSession.findTaskByExecution(execution);
- TaskHandler taskHandler = task.getTaskHandler();
- taskHandler.executionSignal(task);
+ task.setSignalling(false);
Transition transition = null;
List<Transition> outgoingTransitions = activity.getOutgoingTransitions();
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlParser.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlParser.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlParser.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -61,7 +61,6 @@
import org.jbpm.pvm.internal.task.AssignableDefinitionImpl;
import org.jbpm.pvm.internal.task.SwimlaneDefinitionImpl;
import org.jbpm.pvm.internal.task.TaskDefinitionImpl;
-import org.jbpm.pvm.internal.task.TaskHandler;
import org.jbpm.pvm.internal.util.ReflectUtil;
import org.jbpm.pvm.internal.util.XmlUtil;
import org.jbpm.pvm.internal.wire.Descriptor;
@@ -490,13 +489,6 @@
}
}
- Element taskHandlerElement = XmlUtil.element(element, "task-handler");
- if (taskHandlerElement!=null) {
- ObjectDescriptor objectDescriptor = parseObjectDescriptor(taskHandlerElement, parse);
- TaskHandler taskHandler = (TaskHandler) WireContext.create(objectDescriptor);
- taskDefinition.setTaskHandler(taskHandler);
- }
-
JpdlParser.parseAssignmentAttributes(element, taskDefinition, parse);
// parse notification mail producer
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AddReplyCommentCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AddReplyCommentCmd.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AddReplyCommentCmd.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -22,16 +22,16 @@
package org.jbpm.pvm.internal.cmd;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.model.Comment;
+import org.jbpm.api.history.HistoryComment;
import org.jbpm.pvm.internal.env.Environment;
-import org.jbpm.pvm.internal.model.CommentImpl;
+import org.jbpm.pvm.internal.history.model.HistoryCommentImpl;
import org.jbpm.pvm.internal.session.DbSession;
/**
* @author Tom Baeyens
*/
-public class AddReplyCommentCmd extends AbstractCommand<Comment> {
+public class AddReplyCommentCmd extends AbstractCommand<HistoryComment> {
private static final long serialVersionUID = 1L;
@@ -46,13 +46,13 @@
this.message = message;
}
- public Comment execute(Environment environment) throws Exception {
+ public HistoryComment execute(Environment environment) throws Exception {
DbSession dbSession = environment.get(DbSession.class);
- CommentImpl parentComment = dbSession.get(CommentImpl.class, Long.parseLong(commentId));
+ HistoryCommentImpl parentComment = dbSession.get(HistoryCommentImpl.class, Long.parseLong(commentId));
if (parentComment==null) {
throw new JbpmException("parent comment doesn't exist: "+commentId);
}
- Comment replyComment = parentComment.createComment(message);
+ HistoryComment replyComment = parentComment.createComment(message);
return replyComment;
}
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AddTaskCommentCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AddTaskCommentCmd.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AddTaskCommentCmd.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -21,16 +21,18 @@
*/
package org.jbpm.pvm.internal.cmd;
-import org.jbpm.api.model.Comment;
+import org.jbpm.api.JbpmException;
+import org.jbpm.api.history.HistoryComment;
import org.jbpm.pvm.internal.env.Environment;
+import org.jbpm.pvm.internal.history.model.HistoryCommentImpl;
+import org.jbpm.pvm.internal.history.model.HistoryTaskImpl;
import org.jbpm.pvm.internal.session.DbSession;
-import org.jbpm.pvm.internal.task.TaskImpl;
/**
* @author Tom Baeyens
*/
-public class AddTaskCommentCmd extends AbstractCommand<Comment> {
+public class AddTaskCommentCmd extends AbstractCommand<HistoryComment> {
private static final long serialVersionUID = 1L;
@@ -42,10 +44,13 @@
this.message = message;
}
- public Comment execute(Environment environment) throws Exception {
+ public HistoryComment execute(Environment environment) throws Exception {
DbSession dbSession = environment.get(DbSession.class);
- TaskImpl task = dbSession.get(TaskImpl.class, taskDbid);
- Comment comment = task.createComment(message);
+ HistoryTaskImpl historyTask = dbSession.get(HistoryTaskImpl.class, taskDbid);
+ if (historyTask==null) {
+ throw new JbpmException("task "+taskDbid+" doesn't exist");
+ }
+ HistoryCommentImpl comment = historyTask.createComment(message);
return comment;
}
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AssignTaskCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AssignTaskCmd.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AssignTaskCmd.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -23,6 +23,8 @@
import org.jbpm.api.JbpmException;
import org.jbpm.pvm.internal.env.Environment;
+import org.jbpm.pvm.internal.history.HistoryEvent;
+import org.jbpm.pvm.internal.history.events.TaskAssign;
import org.jbpm.pvm.internal.session.DbSession;
import org.jbpm.pvm.internal.task.TaskImpl;
@@ -60,6 +62,9 @@
} else {
task.setAssignee(userId, true);
}
+
+ HistoryEvent.fire(new TaskAssign(task, userId));
+
return null;
}
}
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateHistoryTaskQueryCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateHistoryTaskQueryCmd.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateHistoryTaskQueryCmd.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -0,0 +1,39 @@
+/*
+ * 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.pvm.internal.env.Environment;
+import org.jbpm.pvm.internal.query.HistoryTaskQueryImpl;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class CreateHistoryTaskQueryCmd implements Command<HistoryTaskQueryImpl> {
+
+ private static final long serialVersionUID = 1L;
+
+ public HistoryTaskQueryImpl execute(Environment environment) throws Exception {
+ return new HistoryTaskQueryImpl();
+ }
+
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateHistoryTaskQueryCmd.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteCommentCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteCommentCmd.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteCommentCmd.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -23,7 +23,7 @@
import org.jbpm.api.JbpmException;
import org.jbpm.pvm.internal.env.Environment;
-import org.jbpm.pvm.internal.model.CommentImpl;
+import org.jbpm.pvm.internal.history.model.HistoryCommentImpl;
import org.jbpm.pvm.internal.session.DbSession;
@@ -45,7 +45,7 @@
public Object execute(Environment environment) throws Exception {
DbSession dbSession = environment.get(DbSession.class);
- CommentImpl comment = (CommentImpl) dbSession.get(CommentImpl.class, Long.parseLong(commentId));
+ HistoryCommentImpl comment = (HistoryCommentImpl) dbSession.get(HistoryCommentImpl.class, Long.parseLong(commentId));
if (comment!=null) {
dbSession.delete(comment);
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteDeploymentCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteDeploymentCmd.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteDeploymentCmd.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -29,7 +29,7 @@
import org.jbpm.api.ProcessInstance;
import org.jbpm.internal.log.Log;
import org.jbpm.pvm.internal.env.Environment;
-import org.jbpm.pvm.internal.query.ProcessInstanceQueryImpl;
+import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.repository.DeploymentImpl;
import org.jbpm.pvm.internal.repository.RepositoryCache;
import org.jbpm.pvm.internal.session.DbSession;
@@ -67,20 +67,18 @@
for (ProcessDefinition processDefinition: processDefinitions) {
String processDefinitionId = processDefinition.getId();
- List<ProcessInstance> processInstances = dbSession.createProcessInstanceQuery()
- .processDefinitionId(processDefinitionId)
- .list();
+ List<String> processInstanceIds = dbSession.findProcessInstanceIds(processDefinitionId);
if (cascade) {
- for (ProcessInstance processInstance: processInstances) {
- dbSession.deleteProcessInstance(processInstance.getId(), true);
+ for (String processInstanceId: processInstanceIds) {
+ dbSession.deleteProcessInstance(processInstanceId, true);
}
dbSession.deleteProcessDefinitionHistory(processDefinitionId);
} else {
- if (!processInstances.isEmpty()) {
- throw new JbpmException("cannot delete deployment "+deploymentId+": still executions for "+processDefinition+": "+processInstances);
+ if (!processInstanceIds.isEmpty()) {
+ throw new JbpmException("cannot delete deployment "+deploymentId+": still executions for "+processDefinition+": "+processInstanceIds);
}
}
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteProcessInstance.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteProcessInstance.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteProcessInstance.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -33,14 +33,20 @@
private static final long serialVersionUID = 1L;
String processInstanceId;
+ boolean cascade = false;
public DeleteProcessInstance(String processInstanceId) {
this.processInstanceId = processInstanceId;
}
+ public DeleteProcessInstance(String processInstanceId, boolean cascade) {
+ this.processInstanceId = processInstanceId;
+ this.cascade = cascade;
+ }
+
public Void execute(Environment environment) throws Exception {
DbSession dbSession = Environment.getFromCurrent(DbSession.class);
- dbSession.deleteProcessInstance(processInstanceId);
+ dbSession.deleteProcessInstance(processInstanceId, cascade);
return null;
}
Modified: 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-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteTaskCmd.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -23,36 +23,50 @@
import org.jbpm.api.JbpmException;
import org.jbpm.pvm.internal.env.Environment;
+import org.jbpm.pvm.internal.history.model.HistoryTaskImpl;
import org.jbpm.pvm.internal.session.DbSession;
import org.jbpm.pvm.internal.task.TaskImpl;
/**
+ * @author Tom Baeyens
* @author Alejandro Guizar
*/
public class DeleteTaskCmd extends AbstractCommand<Void> {
private static final long serialVersionUID = 1L;
- protected String taskId;
+ protected long taskDbid;
protected String reason;
+ protected boolean deleteHistory = false;
public DeleteTaskCmd(String taskId) {
- this.taskId = taskId;
+ this.taskDbid = Long.parseLong(taskId);
}
public DeleteTaskCmd(String taskId, String reason) {
- this.taskId = taskId;
+ this.taskDbid = Long.parseLong(taskId);
this.reason = reason;
}
+ public DeleteTaskCmd(String taskId, boolean deleteHistory) {
+ this.taskDbid = Long.parseLong(taskId);
+ this.deleteHistory = deleteHistory;
+ }
+
public Void execute(Environment environment) throws Exception {
DbSession dbSession = environment.get(DbSession.class);
- TaskImpl task = (TaskImpl) dbSession.get(TaskImpl.class, Long.parseLong(taskId));
+ TaskImpl task = (TaskImpl) dbSession.get(TaskImpl.class, taskDbid);
if (task!=null) {
task.delete(reason);
dbSession.delete(task);
+ if (deleteHistory) {
+ HistoryTaskImpl historyTask = (HistoryTaskImpl) dbSession.get(HistoryTaskImpl.class, taskDbid);
+ if (historyTask!=null) {
+ dbSession.delete(historyTask);
+ }
+ }
} else {
- throw new JbpmException("task "+taskId+" doesn't exist");
+ throw new JbpmException("task "+taskDbid+" doesn't exist");
}
return null;
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetTaskCommentsCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetTaskCommentsCmd.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetTaskCommentsCmd.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -25,16 +25,17 @@
import java.util.Collections;
import java.util.List;
-import org.jbpm.api.model.Comment;
+import org.jbpm.api.history.HistoryComment;
import org.jbpm.pvm.internal.env.Environment;
+import org.jbpm.pvm.internal.history.model.HistoryCommentImpl;
+import org.jbpm.pvm.internal.history.model.HistoryTaskImpl;
import org.jbpm.pvm.internal.session.DbSession;
-import org.jbpm.pvm.internal.task.TaskImpl;
/**
* @author Tom Baeyens
*/
-public class GetTaskCommentsCmd extends AbstractCommand<List<Comment>> {
+public class GetTaskCommentsCmd extends AbstractCommand<List<HistoryComment>> {
private static final long serialVersionUID = 1L;
@@ -44,12 +45,12 @@
this.taskId = taskId;
}
- public List<Comment> execute(Environment environment) throws Exception {
+ public List<HistoryComment> execute(Environment environment) throws Exception {
DbSession dbSession = environment.get(DbSession.class);
- TaskImpl task = dbSession.get(TaskImpl.class, Long.parseLong(taskId));
+ HistoryTaskImpl historyTask = dbSession.get(HistoryTaskImpl.class, Long.parseLong(taskId));
- if (task != null) {
- List<Comment> comments = task.getComments();
+ if (historyTask != null) {
+ List<HistoryComment> comments = historyTask.getComments();
forceInitializationAndClean(comments);
return comments;
} else {
@@ -57,12 +58,12 @@
}
}
- protected void forceInitializationAndClean(List<Comment> comments) {
+ protected void forceInitializationAndClean(List<HistoryComment> comments) {
if (comments!=null) {
comments.size();
- List<Comment> copy = new ArrayList<Comment>(comments);
+ List<HistoryComment> copy = new ArrayList<HistoryComment>(comments);
for (int i=0; i<copy.size(); i++) {
- Comment comment = copy.get(i);
+ HistoryComment comment = copy.get(i);
// when comments get deleted, it's possible that we
// get null values in the list as the indexes of the
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SaveTaskCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SaveTaskCmd.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SaveTaskCmd.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -22,10 +22,15 @@
package org.jbpm.pvm.internal.cmd;
import org.jbpm.pvm.internal.env.Environment;
+import org.jbpm.pvm.internal.history.HistoryEvent;
+import org.jbpm.pvm.internal.history.HistorySession;
+import org.jbpm.pvm.internal.history.events.TaskCreated;
+import org.jbpm.pvm.internal.history.events.TaskUpdated;
import org.jbpm.pvm.internal.session.DbSession;
import org.jbpm.pvm.internal.task.TaskImpl;
/**
+ * @author Tom Baeyens
* @author Alejandro Guizar
*/
public class SaveTaskCmd extends AbstractCommand<String> {
@@ -40,9 +45,24 @@
public String execute(Environment environment) throws Exception {
DbSession dbSession = environment.get(DbSession.class);
-
- dbSession.saveTask(task);
-
+
+ if (task.isNew()) {
+ if (task.getSuperTaskDbid()!=null) {
+ TaskImpl parentTask = (TaskImpl) dbSession.get(TaskImpl.class, task.getSuperTaskDbid());
+ parentTask.addSubTask(task);
+ task.setSuperTaskDbid(null);
+ }
+
+ dbSession.save(task);
+
+ HistoryEvent.fire(new TaskCreated(task));
+
+ } else {
+ dbSession.update(task);
+
+ HistoryEvent.fire(new TaskUpdated(task));
+ }
+
return task.getId();
}
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/DbSessionImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/DbSessionImpl.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/DbSessionImpl.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -37,8 +37,9 @@
import org.jbpm.pvm.internal.client.ClientExecution;
import org.jbpm.pvm.internal.client.ClientProcessDefinition;
import org.jbpm.pvm.internal.env.Environment;
-import org.jbpm.pvm.internal.history.model.HistoryActivityInstanceImpl;
+import org.jbpm.pvm.internal.history.HistorySession;
import org.jbpm.pvm.internal.history.model.HistoryProcessInstanceImpl;
+import org.jbpm.pvm.internal.history.model.HistoryTaskImpl;
import org.jbpm.pvm.internal.job.JobImpl;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.query.DeploymentQueryImpl;
@@ -84,6 +85,10 @@
session.save(entity);
}
+ public void update(Object entity) {
+ session.update(entity);
+ }
+
public void merge(Object entity) {
session.merge(entity);
}
@@ -144,7 +149,7 @@
if (deleteProcessInstances) {
for (String processInstanceId : processInstanceIds) {
- deleteProcessInstance(processInstanceId);
+ deleteProcessInstance(processInstanceId, deleteHistory);
}
} else {
if (processInstanceIds.size()>0) {
@@ -167,11 +172,6 @@
.list();
for (HistoryProcessInstanceImpl hpi: historyProcessInstances) {
- session.createQuery(
- "delete "+HistoryActivityInstanceImpl.class.getName()+" hai " +
- "where hai.historyProcessInstance = :historyProcessInstance ")
- .setEntity("historyProcessInstance", hpi)
- .executeUpdate();
session.delete(hpi);
}
}
@@ -219,7 +219,7 @@
query.setString("processDefinitionId", processDefinitionId);
return query.list();
}
-
+
public void deleteProcessInstance(String processInstanceId) {
deleteProcessInstance(processInstanceId, true);
}
@@ -234,8 +234,7 @@
&& (isHistoryEnabled())
) {
// try to get the history
- HistoryProcessInstanceImpl historyProcessInstance = (HistoryProcessInstanceImpl)
- session.get(HistoryProcessInstanceImpl.class, processInstanceId);
+ HistoryProcessInstanceImpl historyProcessInstance = findHistoryProcessInstanceById(processInstanceId);
// if there is a history process instance in the db
if (historyProcessInstance!=null) {
@@ -271,6 +270,15 @@
}
}
+ public HistoryProcessInstanceImpl findHistoryProcessInstanceById(String processInstanceId) {
+ return (HistoryProcessInstanceImpl) session
+ .createQuery(
+ "select hpi " +
+ "from "+HistoryProcessInstance.class.getName()+" as hpi " +
+ "where hpi.processInstanceId = '"+processInstanceId+"'"
+ ).uniqueResult();
+ }
+
List<TaskImpl> findTasks(String processInstanceId) {
Query query = session.createQuery(
"select task " +
@@ -349,12 +357,14 @@
public Task createTask() {
TaskImpl task = newTask();
- task.setCreate(Clock.getCurrentTime());
+ task.setCreateTime(Clock.getCurrentTime());
return task;
}
protected TaskImpl newTask() {
- return new TaskImpl();
+ TaskImpl task = new TaskImpl();
+ task.setNew(true);
+ return task;
}
public TaskImpl findTaskByDbid(long taskDbid) {
@@ -372,18 +382,6 @@
return (Task) query.uniqueResult();
}
- public void saveTask(Task task) {
- TaskImpl taskImpl = (TaskImpl) task;
-
- if (taskImpl.getSuperTaskDbid()!=null) {
- TaskImpl parentTask = (TaskImpl) session.load(TaskImpl.class, taskImpl.getSuperTaskDbid());
- parentTask.addSubTask(taskImpl);
- taskImpl.setSuperTaskDbid(null);
- }
-
- session.saveOrUpdate(task);
- }
-
public JobImpl<?> findFirstAcquirableJob() {
Query query = session.getNamedQuery("findFirstAcquirableJob");
query.setTimestamp("now", Clock.getCurrentTime());
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/HistoryEvent.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/HistoryEvent.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/HistoryEvent.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -23,6 +23,7 @@
import java.io.Serializable;
+import org.jbpm.pvm.internal.env.Environment;
import org.jbpm.pvm.internal.model.ExecutionImpl;
/** base class for process logs. Process logs are dispatched to the
@@ -46,4 +47,19 @@
}
public abstract void process();
+
+ public static void fire(HistoryEvent historyEvent) {
+ fire(historyEvent, null);
+ }
+
+ public static void fire(HistoryEvent historyEvent, ExecutionImpl execution) {
+ Environment environment = Environment.getCurrent();
+ if (environment!=null) {
+ HistorySession historySession = environment.get(HistorySession.class);
+ if (historySession!=null) {
+ historyEvent.setExecution(execution);
+ historySession.process(historyEvent);
+ }
+ }
+ }
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/HistorySessionImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/HistorySessionImpl.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/HistorySessionImpl.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -28,8 +28,6 @@
public class HistorySessionImpl implements HistorySession {
public void process(HistoryEvent historyEvent) {
- if (historyEvent.execution.getId()!=null) {
- historyEvent.process();
- }
+ historyEvent.process();
}
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/ActivityStart.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/ActivityStart.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/ActivityStart.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -21,12 +21,12 @@
*/
package org.jbpm.pvm.internal.history.events;
-import org.hibernate.Session;
import org.jbpm.api.history.HistoryProcessInstance;
import org.jbpm.pvm.internal.env.Environment;
import org.jbpm.pvm.internal.history.HistoryEvent;
import org.jbpm.pvm.internal.history.model.HistoryActivityInstanceImpl;
import org.jbpm.pvm.internal.history.model.HistoryProcessInstanceImpl;
+import org.jbpm.pvm.internal.session.DbSession;
/**
@@ -37,22 +37,22 @@
private static final long serialVersionUID = 1L;
public void process() {
- Session session = Environment.getFromCurrent(Session.class);
+ DbSession dbSession = Environment.getFromCurrent(DbSession.class);
- String processInstanceId = execution.getProcessInstance().getId();
+ long processInstanceDbid = execution.getProcessInstance().getDbid();
HistoryProcessInstance historyProcessInstanceImpl = (HistoryProcessInstance)
- session.load(HistoryProcessInstanceImpl.class, processInstanceId);
+ dbSession.get(HistoryProcessInstanceImpl.class, processInstanceDbid);
- HistoryActivityInstanceImpl historyActivityInstanceImpl =
+ HistoryActivityInstanceImpl historyActivityInstance =
createHistoryActivityInstance(historyProcessInstanceImpl);
String activityType = execution.getActivity().getType();
- historyActivityInstanceImpl.setType(activityType);
+ historyActivityInstance.setType(activityType);
- session.save(historyActivityInstanceImpl);
+ dbSession.save(historyActivityInstance);
- execution.setHistoryActivityInstanceDbid(historyActivityInstanceImpl.getDbid());
+ execution.setHistoryActivityInstanceDbid(historyActivityInstance.getDbid());
}
protected HistoryActivityInstanceImpl createHistoryActivityInstance(HistoryProcessInstance historyProcessInstanceImpl) {
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/ProcessInstanceEnd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/ProcessInstanceEnd.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/ProcessInstanceEnd.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -37,7 +37,7 @@
public void process() {
Session session = Environment.getFromCurrent(Session.class);
HistoryProcessInstanceImpl historyProcessInstanceImpl = (HistoryProcessInstanceImpl)
- session.load(HistoryProcessInstanceImpl.class, execution.getId());
+ session.load(HistoryProcessInstanceImpl.class, execution.getDbid());
historyProcessInstanceImpl.setEndTime(Clock.getCurrentTime());
historyProcessInstanceImpl.setState(execution.getState());
historyProcessInstanceImpl.setEndActivityName(execution.getActivityName());
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskActivityStart.java (from rev 5226, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskStart.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskActivityStart.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskActivityStart.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -0,0 +1,72 @@
+/*
+ * 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.api.history.HistoryProcessInstance;
+import org.jbpm.pvm.internal.env.Environment;
+import org.jbpm.pvm.internal.history.HistoryEvent;
+import org.jbpm.pvm.internal.history.model.HistoryActivityInstanceImpl;
+import org.jbpm.pvm.internal.history.model.HistoryProcessInstanceImpl;
+import org.jbpm.pvm.internal.history.model.HistoryTaskImpl;
+import org.jbpm.pvm.internal.history.model.HistoryTaskInstanceImpl;
+import org.jbpm.pvm.internal.model.ExecutionImpl;
+import org.jbpm.pvm.internal.session.DbSession;
+import org.jbpm.pvm.internal.task.TaskImpl;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class TaskActivityStart extends HistoryEvent {
+
+ private static final long serialVersionUID = 1L;
+
+ protected TaskImpl task;
+
+ public TaskActivityStart(TaskImpl task) {
+ this.task = task;
+ }
+
+ public void process() {
+ DbSession dbSession = Environment.getFromCurrent(DbSession.class);
+
+ ExecutionImpl processInstance = execution.getProcessInstance();
+ long processInstanceDbid = processInstance.getDbid();
+
+ HistoryProcessInstance historyProcessInstance =
+ dbSession.get(HistoryProcessInstanceImpl.class, processInstanceDbid);
+
+ HistoryTaskImpl historyTask = new HistoryTaskImpl(task);
+ historyTask.setExecutionId(execution.getId());
+
+ HistoryActivityInstanceImpl historyActivityInstance =
+ new HistoryTaskInstanceImpl(historyProcessInstance, execution, historyTask);
+
+ String activityType = execution.getActivity().getType();
+ historyActivityInstance.setType(activityType);
+
+ dbSession.save(historyActivityInstance);
+
+ execution.setHistoryActivityInstanceDbid(historyActivityInstance.getDbid());
+ }
+
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskActivityStart.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskAssign.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskAssign.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskAssign.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -23,7 +23,7 @@
import org.jbpm.pvm.internal.env.Environment;
import org.jbpm.pvm.internal.history.HistoryEvent;
-import org.jbpm.pvm.internal.history.model.HistoryTaskInstanceImpl;
+import org.jbpm.pvm.internal.history.model.HistoryTaskImpl;
import org.jbpm.pvm.internal.session.DbSession;
import org.jbpm.pvm.internal.task.TaskImpl;
@@ -34,18 +34,18 @@
private static final long serialVersionUID = 1L;
- protected TaskImpl taskImpl;
+ protected TaskImpl task;
protected String assignee;
- public TaskAssign(TaskImpl taskImpl, String assignee) {
+ public TaskAssign(TaskImpl task, String assignee) {
+ this.task = task;
this.assignee = assignee;
}
public void process() {
DbSession dbSession = Environment.getFromCurrent(DbSession.class);
- Long historyActivityInstanceDbId = execution.getHistoryActivityInstanceDbid();
- HistoryTaskInstanceImpl historyTaskInstance = (HistoryTaskInstanceImpl)
- dbSession.get(HistoryTaskInstanceImpl.class, historyActivityInstanceDbId);
+ HistoryTaskImpl historyTaskInstance = (HistoryTaskImpl)
+ dbSession.get(HistoryTaskImpl.class, task.getDbid());
historyTaskInstance.setAssignee(assignee);
}
}
Modified: 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 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskComplete.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -21,18 +21,42 @@
*/
package org.jbpm.pvm.internal.history.events;
+import org.hibernate.Session;
+import org.jbpm.api.history.HistoryTask;
+import org.jbpm.pvm.internal.env.Environment;
+import org.jbpm.pvm.internal.history.HistoryEvent;
+import org.jbpm.pvm.internal.history.model.HistoryTaskImpl;
+import org.jbpm.pvm.internal.history.model.HistoryTaskInstanceImpl;
+import org.jbpm.pvm.internal.util.Clock;
+
/**
* @author Tom Baeyens
*/
-public class TaskComplete extends ActivityEnd {
+public class TaskComplete extends HistoryEvent {
private static final long serialVersionUID = 1L;
protected String outcome;
public TaskComplete(String outcome) {
- this.transitionName = outcome;
+ this.outcome = outcome;
}
+
+ public void process() {
+ Session session = Environment.getFromCurrent(Session.class);
+ Long historyActivityInstanceDbId = execution.getHistoryActivityInstanceDbid();
+ HistoryTaskInstanceImpl historyTaskInstance = (HistoryTaskInstanceImpl)
+ session.load(HistoryTaskInstanceImpl.class, historyActivityInstanceDbId);
+ historyTaskInstance.setEndTime(Clock.getCurrentTime());
+ historyTaskInstance.setTransitionName(outcome);
+
+ HistoryTaskImpl historyTask = historyTaskInstance.getHistoryTask();
+ historyTask.setOutcome(outcome);
+ historyTask.setEndTime(Clock.getCurrentTime());
+ historyTask.setState(HistoryTask.STATE_COMPLETED);
+
+ session.update(historyTaskInstance);
+ }
}
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskCreated.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskCreated.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskCreated.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -0,0 +1,54 @@
+/*
+ * 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.env.Environment;
+import org.jbpm.pvm.internal.history.HistoryEvent;
+import org.jbpm.pvm.internal.history.model.HistoryTaskImpl;
+import org.jbpm.pvm.internal.session.DbSession;
+import org.jbpm.pvm.internal.task.TaskImpl;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class TaskCreated extends HistoryEvent {
+
+ private static final long serialVersionUID = 1L;
+
+ protected TaskImpl task;
+
+ public TaskCreated(TaskImpl task) {
+ this.task = task;
+ }
+
+ public void process() {
+ DbSession dbSession = Environment.getFromCurrent(DbSession.class);
+ HistoryTaskImpl historyTask = new HistoryTaskImpl(task);
+ dbSession.save(historyTask);
+
+ if (task.getSuperTask()!=null) {
+ HistoryTaskImpl superHistoryTask = dbSession.get(HistoryTaskImpl.class, task.getSuperTask().getDbid());
+ superHistoryTask.addSubTask(historyTask);
+ }
+ }
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskCreated.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: 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 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskDelete.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -21,8 +21,14 @@
*/
package org.jbpm.pvm.internal.history.events;
+import org.jbpm.api.JbpmException;
+import org.jbpm.pvm.internal.env.Environment;
import org.jbpm.pvm.internal.history.model.HistoryActivityInstanceImpl;
+import org.jbpm.pvm.internal.history.model.HistoryTaskImpl;
import org.jbpm.pvm.internal.history.model.HistoryTaskInstanceImpl;
+import org.jbpm.pvm.internal.session.DbSession;
+import org.jbpm.pvm.internal.task.TaskImpl;
+import org.jbpm.pvm.internal.util.Clock;
/**
@@ -32,17 +38,25 @@
private static final long serialVersionUID = 1L;
+ protected TaskImpl task;
protected String reason;
- public TaskDelete(String reason) {
+ public TaskDelete(TaskImpl task, String reason) {
+ if (task.getExecution()!=null) {
+ throw new JbpmException("tasks related to an execution must be completed. they cannot just be deleted");
+ }
+
+ this.task = task;
this.reason = reason;
}
protected void updateHistoryActivityInstance(HistoryActivityInstanceImpl historyActivityInstance) {
super.updateHistoryActivityInstance(historyActivityInstance);
- HistoryTaskInstanceImpl historyTaskInstance = (HistoryTaskInstanceImpl) historyActivityInstance;
- historyTaskInstance.setState(reason);
+ DbSession dbSession = Environment.getFromCurrent(DbSession.class);
+ HistoryTaskImpl historyTask = (HistoryTaskImpl) dbSession.get(HistoryTaskImpl.class, task.getDbid());
+ historyTask.setState(reason);
+ historyTask.setEndTime(Clock.getCurrentTime());
}
protected Class<? extends HistoryActivityInstanceImpl> getHistoryActivityInstanceClass() {
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskStart.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskStart.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskStart.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -1,46 +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.api.history.HistoryProcessInstance;
-import org.jbpm.api.task.Task;
-import org.jbpm.pvm.internal.history.model.HistoryActivityInstanceImpl;
-import org.jbpm.pvm.internal.history.model.HistoryTaskInstanceImpl;
-
-
-/**
- * @author Tom Baeyens
- */
-public class TaskStart extends ActivityStart {
-
- private static final long serialVersionUID = 1L;
-
- protected String assignee;
-
- public TaskStart(Task task) {
- this.assignee = task.getAssignee();
- }
-
- protected HistoryActivityInstanceImpl createHistoryActivityInstance(HistoryProcessInstance historyProcessInstanceImpl) {
- return new HistoryTaskInstanceImpl(historyProcessInstanceImpl, execution, assignee);
- }
-}
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskUpdated.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskUpdated.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskUpdated.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -0,0 +1,50 @@
+/*
+ * 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.env.Environment;
+import org.jbpm.pvm.internal.history.HistoryEvent;
+import org.jbpm.pvm.internal.history.model.HistoryTaskImpl;
+import org.jbpm.pvm.internal.session.DbSession;
+import org.jbpm.pvm.internal.task.TaskImpl;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class TaskUpdated extends HistoryEvent {
+
+ private static final long serialVersionUID = 1L;
+
+ protected TaskImpl task;
+
+ public TaskUpdated(TaskImpl task) {
+ this.task = task;
+ }
+
+ public void process() {
+ DbSession dbSession = Environment.getFromCurrent(DbSession.class);
+ HistoryTaskImpl historyTask = dbSession.get(HistoryTaskImpl.class, task.getDbid());
+
+ historyTask.updated(task);
+ }
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskUpdated.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryCommentImpl.java (from rev 5226, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/CommentImpl.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryCommentImpl.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryCommentImpl.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -0,0 +1,124 @@
+/*
+ * 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.model;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import org.jbpm.api.JbpmException;
+import org.jbpm.api.history.HistoryComment;
+import org.jbpm.pvm.internal.env.Environment;
+import org.jbpm.pvm.internal.util.Clock;
+import org.jbpm.pvm.internal.util.EqualsUtil;
+
+public class HistoryCommentImpl implements Serializable, HistoryComment {
+
+ private static final long serialVersionUID = 1L;
+
+ protected long dbid;
+ protected int dbversion;
+ protected String userId = null;
+ protected Date time = null;
+ protected String message = null;
+ protected List<HistoryCommentImpl> comments = new ArrayList<HistoryCommentImpl>();
+
+ public HistoryCommentImpl() {
+ }
+
+ public HistoryCommentImpl(String message) {
+ this.message = message;
+ this.time = Clock.getCurrentTime();
+
+ Environment environment = Environment.getCurrent();
+ if (environment!=null) {
+ this.userId = environment.getUserId();
+ }
+ }
+
+ // replies //////////////////////////////////////////////////////////////////
+
+ public HistoryComment createComment(String message) {
+ if (message==null) {
+ throw new JbpmException("message is null");
+ }
+ HistoryCommentImpl reply = new HistoryCommentImpl(message);
+ comments.add(reply);
+ return reply;
+ }
+
+ public void removeComment(HistoryComment comment) {
+ if (comment==null) {
+ throw new JbpmException("reply is null");
+ }
+ if (comments.contains(comment)) {
+ comments.remove(comment);
+ }
+ }
+
+ public List<HistoryComment> getComments() {
+ return (List)comments;
+ }
+
+
+ public void setComments(List<HistoryCommentImpl> replies) {
+ this.comments = replies;
+ }
+
+ // equals ///////////////////////////////////////////////////////////////////
+ // hack to support comparing hibernate proxies against the real objects
+ // since this always falls back to ==, we don't need to overwrite the hashcode
+ public boolean equals(Object o) {
+ return EqualsUtil.equals(this, o);
+ }
+
+ // cusomtized getters and setters ////////////////////////////////////////////
+
+ public String getId() {
+ return Long.toString(dbid);
+ }
+
+ // getters and setters //////////////////////////////////////////////////////
+
+ public long getDbid() {
+ return dbid;
+ }
+ public String getUserId() {
+ return userId;
+ }
+ public String getMessage() {
+ return message;
+ }
+ public Date getTime() {
+ return time;
+ }
+ public void setUserId(String userId) {
+ this.userId = userId;
+ }
+ public void setTime(Date time) {
+ this.time = time;
+ }
+ public void setMessage(String message) {
+ this.message = message;
+ }
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryCommentImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryProcessInstanceImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryProcessInstanceImpl.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryProcessInstanceImpl.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -58,9 +58,9 @@
}
public HistoryProcessInstanceImpl(ExecutionImpl processInstance) {
+ this.dbid = processInstance.getDbid();
this.processDefinition = processInstance.getProcessDefinition();
this.processDefinitionId = processDefinition.getId();
- this.dbid = processInstance.getDbid();
this.processInstanceId = processInstance.getId();
this.key = processInstance.getKey();
this.state = "active";
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryTaskImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryTaskImpl.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryTaskImpl.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -0,0 +1,163 @@
+/*
+ * 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.model;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.jbpm.api.JbpmException;
+import org.jbpm.api.history.HistoryComment;
+import org.jbpm.api.history.HistoryTask;
+import org.jbpm.pvm.internal.task.TaskImpl;
+import org.jbpm.pvm.internal.util.Clock;
+import org.jbpm.pvm.internal.util.EqualsUtil;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class HistoryTaskImpl implements Serializable, HistoryTask {
+
+ private static final long serialVersionUID = 1L;
+
+ protected long dbid;
+ protected int dbversion;
+ protected String executionId;
+ protected String assignee;
+ protected String state;
+ protected String outcome;
+ protected Integer priority;
+ protected Date duedate;
+ protected Date createTime;
+ protected Date endTime;
+ protected long duration;
+ protected Set<HistoryTaskImpl> subTasks = new HashSet<HistoryTaskImpl>();
+ protected List<HistoryCommentImpl> comments = new ArrayList<HistoryCommentImpl>();
+
+ public HistoryTaskImpl() {
+ }
+
+ public HistoryTaskImpl(TaskImpl task) {
+ this.dbid = task.getDbid();
+ this.assignee = task.getAssignee();
+ this.priority = task.getPriority();
+ this.duedate = task.getDuedate();
+ this.createTime = Clock.getCurrentTime();
+ }
+
+ public void updated(TaskImpl task) {
+ this.assignee = task.getAssignee();
+ this.priority = task.getPriority();
+ this.duedate = task.getDuedate();
+ }
+
+ // comments /////////////////////////////////////////////////////////////////
+ public List<HistoryComment> getComments() {
+ return (List)comments;
+ }
+
+ public HistoryCommentImpl createComment(String commentText) {
+ HistoryCommentImpl comment = new HistoryCommentImpl(commentText);
+ comments.add(comment);
+ return comment;
+ }
+
+ public void removeComment(HistoryCommentImpl comment) {
+ if (comment == null) {
+ throw new JbpmException("comment is null");
+ }
+ if (comments.contains(comment)) {
+ comments.remove(comment);
+ }
+ }
+
+ // subtasks /////////////////////////////////////////////////////////////////
+
+ public Set<HistoryTask> getSubTasks() {
+ return (Set)subTasks;
+ }
+
+ public void addSubTask(HistoryTaskImpl historyTask) {
+ subTasks.add(historyTask);
+ }
+
+ // equals ///////////////////////////////////////////////////////////////////
+ // hack to support comparing hibernate proxies against the real objects
+ // since this always falls back to ==, we don't need to overwrite the hashcode
+ public boolean equals(Object o) {
+ return EqualsUtil.equals(this, o);
+ }
+
+ // customized getters and setters ///////////////////////////////////////////
+
+ public String getId() {
+ return Long.toString(dbid);
+ }
+
+ public void setEndTime(Date endTime) {
+ this.endTime = endTime;
+ this.duration = endTime.getTime() - createTime.getTime();
+ }
+
+ // getters and setters //////////////////////////////////////////////////////
+
+ public String getState() {
+ return state;
+ }
+ public String getAssignee() {
+ return assignee;
+ }
+ public String getOutcome() {
+ return outcome;
+ }
+ public void setOutcome(String outcome) {
+ this.outcome = outcome;
+ }
+ public void setAssignee(String assignee) {
+ this.assignee = assignee;
+ }
+ public Date getCreateTime() {
+ return createTime;
+ }
+ public Date getEndTime() {
+ return endTime;
+ }
+ public long getDuration() {
+ return duration;
+ }
+ public void setDuration(long duration) {
+ this.duration = duration;
+ }
+ public String getExecutionId() {
+ return executionId;
+ }
+ public void setState(String state) {
+ this.state = state;
+ }
+ public void setExecutionId(String executionId) {
+ this.executionId = executionId;
+ }
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryTaskImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
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-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryTaskInstanceImpl.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -31,29 +31,18 @@
public class HistoryTaskInstanceImpl extends HistoryActivityInstanceImpl {
private static final long serialVersionUID = 1L;
-
- protected String assignee;
- protected String state;
+ HistoryTaskImpl historyTask;
+
public HistoryTaskInstanceImpl() {
- this.state = "active";
}
- public HistoryTaskInstanceImpl(HistoryProcessInstance historyProcessInstanceImpl, ExecutionImpl execution, String assignee) {
+ public HistoryTaskInstanceImpl(HistoryProcessInstance historyProcessInstanceImpl, ExecutionImpl execution, HistoryTaskImpl historyTask) {
super(historyProcessInstanceImpl, execution);
- this.assignee = assignee;
+ this.historyTask = historyTask;
}
-
- public String getAssignee() {
- return assignee;
+
+ public HistoryTaskImpl getHistoryTask() {
+ return historyTask;
}
- 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/job/JobImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/JobImpl.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/JobImpl.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -28,7 +28,7 @@
protected int dbversion;
/** date until which the command should not be executed
- * for async messages, this dueDate should be set to null. */
+ * for async messages, this duedate should be set to null. */
protected Date dueDate = null;
/** job state. */
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -84,7 +84,7 @@
) {
Environment environment = Environment.getCurrent();
if (environment==null) {
- throw new JbpmException("no environment to get business calendar for calculating dueDate "+dueDateDescription);
+ throw new JbpmException("no environment to get business calendar for calculating duedate "+dueDateDescription);
}
BusinessCalendar businessCalendar = environment.get(BusinessCalendar.class);
dueDate = businessCalendar.add(now, duration);
@@ -132,7 +132,7 @@
} else { // there is a repeat on this timer
deleteThisJob = false;
// suppose that it took the timer runner thread a very long time to execute the timers
- // then the repeat action dueDate could already have passed
+ // then the repeat action duedate could already have passed
do {
setDueDateDescription(repeat);
} while (dueDate.getTime() <= Clock.getCurrentTime().getTime());
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/CommentImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/CommentImpl.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/CommentImpl.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -1,124 +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.model;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import org.jbpm.api.JbpmException;
-import org.jbpm.api.model.Comment;
-import org.jbpm.pvm.internal.env.Environment;
-import org.jbpm.pvm.internal.util.Clock;
-import org.jbpm.pvm.internal.util.EqualsUtil;
-
-public class CommentImpl implements Serializable, Comment {
-
- private static final long serialVersionUID = 1L;
-
- protected long dbid;
- protected int dbversion;
- protected String userId = null;
- protected Date time = null;
- protected String message = null;
- protected List<CommentImpl> comments = new ArrayList<CommentImpl>();
-
- public CommentImpl() {
- }
-
- public CommentImpl(String message) {
- this.message = message;
- this.time = Clock.getCurrentTime();
-
- Environment environment = Environment.getCurrent();
- if (environment!=null) {
- this.userId = environment.getUserId();
- }
- }
-
- // replies //////////////////////////////////////////////////////////////////
-
- public Comment createComment(String message) {
- if (message==null) {
- throw new JbpmException("message is null");
- }
- CommentImpl reply = new CommentImpl(message);
- comments.add(reply);
- return reply;
- }
-
- public void removeComment(Comment comment) {
- if (comment==null) {
- throw new JbpmException("reply is null");
- }
- if (comments.contains(comment)) {
- comments.remove(comment);
- }
- }
-
- public List<Comment> getComments() {
- return (List)comments;
- }
-
-
- public void setComments(List<CommentImpl> replies) {
- this.comments = replies;
- }
-
- // equals ///////////////////////////////////////////////////////////////////
- // hack to support comparing hibernate proxies against the real objects
- // since this always falls back to ==, we don't need to overwrite the hashcode
- public boolean equals(Object o) {
- return EqualsUtil.equals(this, o);
- }
-
- // cusomtized getters and setters ////////////////////////////////////////////
-
- public String getId() {
- return Long.toString(dbid);
- }
-
- // getters and setters //////////////////////////////////////////////////////
-
- public long getDbid() {
- return dbid;
- }
- public String getUserId() {
- return userId;
- }
- public String getMessage() {
- return message;
- }
- public Date getTime() {
- return time;
- }
- public void setUserId(String userId) {
- this.userId = userId;
- }
- public void setTime(Date time) {
- this.time = time;
- }
- public void setMessage(String message) {
- this.message = message;
- }
-}
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-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -27,7 +27,6 @@
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@@ -41,7 +40,6 @@
import org.jbpm.api.job.Job;
import org.jbpm.api.job.Timer;
import org.jbpm.api.listener.EventListenerExecution;
-import org.jbpm.api.model.Comment;
import org.jbpm.api.model.Event;
import org.jbpm.api.model.OpenExecution;
import org.jbpm.api.task.Assignable;
@@ -60,6 +58,7 @@
import org.jbpm.pvm.internal.history.events.DecisionEnd;
import org.jbpm.pvm.internal.history.events.ProcessInstanceEnd;
import org.jbpm.pvm.internal.history.events.ProcessInstanceStart;
+import org.jbpm.pvm.internal.history.events.TaskActivityStart;
import org.jbpm.pvm.internal.job.JobImpl;
import org.jbpm.pvm.internal.job.MessageImpl;
import org.jbpm.pvm.internal.model.op.AtomicOperation;
@@ -75,13 +74,10 @@
import org.jbpm.pvm.internal.task.SwimlaneDefinitionImpl;
import org.jbpm.pvm.internal.task.SwimlaneImpl;
import org.jbpm.pvm.internal.task.TaskDefinitionImpl;
-import org.jbpm.pvm.internal.task.TaskHandler;
import org.jbpm.pvm.internal.task.TaskImpl;
import org.jbpm.pvm.internal.type.Variable;
import org.jbpm.pvm.internal.util.EqualsUtil;
import org.jbpm.pvm.internal.util.Priority;
-import org.jbpm.pvm.internal.wire.Descriptor;
-import org.jbpm.pvm.internal.wire.WireContext;
/**
* @author Tom Baeyens
@@ -125,9 +121,6 @@
/** swimlanes */
protected Map<String, SwimlaneImpl> swimlanes = new HashMap<String, SwimlaneImpl>();
- /** the free text comments users make on this execution */
- protected Set<CommentImpl> comments = new LinkedHashSet<CommentImpl>();
-
/** reference to the current activity instance history record */
protected Long historyActivityInstanceDbid;
@@ -206,7 +199,7 @@
this.state = STATE_ACTIVE_ROOT;
ExecutionImpl scopedExecution = initializeScopes();
- fireHistoryEvent(new ProcessInstanceStart());
+ HistoryEvent.fire(new ProcessInstanceStart(), this);
fire(Event.START, getProcessDefinition());
if (getActivity()!=null) {
scopedExecution.performAtomicOperation(AtomicOperation.EXECUTE_ACTIVITY);
@@ -361,7 +354,7 @@
parent.removeExecution(this);
} else { // this is a process instance
- fireHistoryEvent(new ProcessInstanceEnd());
+ HistoryEvent.fire(new ProcessInstanceEnd(), this);
fire(Event.END, getProcessDefinition());
if (superProcessExecution!=null) {
@@ -708,49 +701,7 @@
// tasks ////////////////////////////////////////////////////////////////////
-
- public TaskImpl createTask(TaskDefinitionImpl taskDefinition) {
- DbSession dbSession = Environment.getFromCurrent(DbSession.class);
- TaskImpl task = (TaskImpl) dbSession.createTask();
- task.setTaskDefinition(taskDefinition);
- task.setExecution(this);
- task.setProcessInstance(processInstance);
- task.setSignalling(true);
-
- // initialize the name
- if (taskDefinition.getName()!=null) {
- task.setName(taskDefinition.getName());
- } else {
- task.setName(getActivityName());
- }
- task.setDescription(taskDefinition.getDescription());
- task.setPriority(taskDefinition.getPriority());
- task.setFormResourceName(taskDefinition.getFormResourceName());
-
- // save task so that TaskDbSession.findTaskByExecution works for assign event listeners
- dbSession.saveTask(task);
-
- TaskHandler taskHandler = task.getTaskHandler();
- boolean wait = taskHandler.executionCreateTask(task);
-
- SwimlaneDefinitionImpl swimlaneDefinition = taskDefinition.getSwimlaneDefinition();
- if (swimlaneDefinition!=null) {
- SwimlaneImpl swimlane = getInitializedSwimlane(swimlaneDefinition);
- task.setSwimlane(swimlane);
-
- // copy the swimlane assignments to the task
- task.setAssignee(swimlane.getAssignee());
- for (ParticipationImpl participant: swimlane.getParticipations()) {
- task.addParticipation(participant.getUserId(), participant.getGroupId(), participant.getType());
- }
- }
-
- initializeAssignments(taskDefinition, task);
-
- return task;
- }
-
/** tasks and swimlane assignment.
* SwimlaneDefinitionImpl is base class for TaskDefinitionImpl.
* Both Task and Swimlane implement Assignable. */
@@ -844,28 +795,6 @@
return swimlane;
}
- // comments /////////////////////////////////////////////////////////////////
-
- public Comment createComment(String message) {
- if (message==null) {
- throw new JbpmException("message is null");
- }
- CommentImpl comment = new CommentImpl(message);
- addComment(comment);
- return comment;
- }
-
- public void removeComment(Comment comment) {
- throw new UnsupportedOperationException("please implement me");
- }
-
- public void addComment(CommentImpl comment) {
- if (comment==null) {
- throw new JbpmException("comment is null");
- }
- comments.add(comment);
- }
-
// child executions /////////////////////////////////////////////////////////
public ExecutionImpl createExecution() {
@@ -1105,17 +1034,6 @@
////////////////////////////////////////////////////////////////////////////////
- public void fireHistoryEvent(HistoryEvent historyEvent) {
- Environment environment = Environment.getCurrent();
- if (environment!=null) {
- HistorySession historySession = environment.get(HistorySession.class);
- if (historySession!=null) {
- historyEvent.setExecution(this);
- historySession.process(historyEvent);
- }
- }
- }
-
// overriding the ScopeInstanceImpl methods /////////////////////////////////
public ScopeInstanceImpl getParentVariableScope() {
@@ -1143,23 +1061,23 @@
// history //////////////////////////////////////////////////////////////////
public void historyAutomatic() {
- fireHistoryEvent(new AutomaticEnd());
+ HistoryEvent.fire(new AutomaticEnd(), this);
}
public void historyDecision(String transitionName) {
- fireHistoryEvent(new DecisionEnd(transitionName));
+ HistoryEvent.fire(new DecisionEnd(transitionName), this);
}
public void historyActivityStart() {
- fireHistoryEvent(new ActivityStart());
+ HistoryEvent.fire(new ActivityStart(), this);
}
public void historyActivityEnd() {
- fireHistoryEvent(new ActivityEnd());
+ HistoryEvent.fire(new ActivityEnd(), this);
}
public void historyActivityEnd(String transitionName) {
- fireHistoryEvent(new ActivityEnd(transitionName));
+ HistoryEvent.fire(new ActivityEnd(transitionName), this);
}
// equals ///////////////////////////////////////////////////////////////////
@@ -1233,10 +1151,6 @@
return false;
}
- public List<Comment> getComments() {
- return new ArrayList<Comment>(comments);
- }
-
public boolean isProcessInstance() {
return parent==null;
}
@@ -1282,9 +1196,6 @@
public void setProcessInstance(ExecutionImpl processInstance) {
this.processInstance = processInstance;
}
- public void setComments(Set<CommentImpl> comments) {
- this.comments = comments;
- }
public String getKey() {
return key;
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ScopeInstanceImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ScopeInstanceImpl.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ScopeInstanceImpl.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -86,7 +86,7 @@
variables.put(variable.getKey(), variable);
hasVariables = true;
- // TODO add create-variable-log
+ // TODO add createTime-variable-log
}
protected Variable createVariableObject(String key, Object value, String typeName) {
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryProcessInstanceQueryImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryProcessInstanceQueryImpl.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryProcessInstanceQueryImpl.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -26,7 +26,6 @@
import org.hibernate.Query;
import org.jbpm.api.history.HistoryProcessInstance;
import org.jbpm.api.history.HistoryProcessInstanceQuery;
-import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.history.model.HistoryProcessInstanceImpl;
/**
@@ -48,7 +47,7 @@
hql.append(" as hpi ");
if (processInstanceId!=null) {
- appendWhereClause(" hpi.id = '"+processInstanceId+"' ", hql);
+ appendWhereClause(" hpi.processInstanceId = '"+processInstanceId+"' ", hql);
}
if (processDefinitionId!=null) {
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryTaskQueryImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryTaskQueryImpl.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryTaskQueryImpl.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -0,0 +1,179 @@
+/*
+ * 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.query;
+
+import java.util.Date;
+import java.util.List;
+
+import org.hibernate.Query;
+import org.jbpm.api.history.HistoryTask;
+import org.jbpm.api.history.HistoryTaskQuery;
+import org.jbpm.pvm.internal.history.model.HistoryTaskImpl;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class HistoryTaskQueryImpl extends AbstractQuery implements HistoryTaskQuery {
+
+ protected String taskId;
+ protected String executionId;
+ protected String assignee;
+ protected String state;
+ protected String outcome;
+ protected Long tookLessThen;
+ protected Long tookLongerThen;
+ protected Date startedBefore;
+ protected Date startedAfter;
+
+ public String hql() {
+ StringBuilder hql = new StringBuilder();
+ hql.append("select ht ");
+ hql.append("from ");
+ hql.append(HistoryTaskImpl.class.getName());
+ hql.append(" as ht ");
+
+ if (taskId!=null) {
+ appendWhereClause(" ht.dbid = "+taskId+" ", hql);
+ }
+
+ if (executionId!=null) {
+ appendWhereClause(" ht.executionId = '"+executionId+"' ", hql);
+ }
+
+ if (assignee!=null) {
+ appendWhereClause(" ht.assignee = '"+assignee+"' ", hql);
+ }
+
+ if (state!=null) {
+ appendWhereClause(" ht.state = '"+state+"' ", hql);
+ }
+
+ if (outcome!=null) {
+ appendWhereClause(" ht.outcome = '"+outcome+"' ", hql);
+ }
+
+ if (tookLessThen!=null) {
+ appendWhereClause(" ht.duration < :tookLessThen ", hql);
+ }
+
+ if (tookLongerThen!=null) {
+ appendWhereClause(" ht.duration > :tookLongerThen ", hql);
+ }
+
+ if (startedBefore!=null) {
+ appendWhereClause(" ht.startTime < :startedBefore ", hql);
+ }
+
+ if (startedAfter!=null) {
+ appendWhereClause(" ht.startTime > :startedAfter ", hql);
+ }
+
+ return hql.toString();
+ }
+
+ protected void applyParameters(Query query) {
+ if (tookLessThen!=null) {
+ query.setLong("tookLessThen", tookLessThen);
+ }
+
+ if (tookLongerThen!=null) {
+ query.setLong("tookLongerThen", tookLongerThen);
+ }
+
+ if (startedBefore!=null) {
+ query.setTime("startedBefore", startedBefore);
+ }
+
+ if (startedAfter!=null) {
+ query.setTime("startedAfter", startedAfter);
+ }
+ }
+
+ public List<HistoryTask> list() {
+ return (List) untypedList();
+ }
+
+ public HistoryTask uniqueResult() {
+ return (HistoryTask) untypedUniqueResult();
+ }
+
+ public HistoryTaskQuery taskId(String taskId) {
+ this.taskId = taskId;
+ return this;
+ }
+
+ public HistoryTaskQuery executionId(String executionId) {
+ this.executionId = executionId;
+ return this;
+ }
+
+ public HistoryTaskQuery assignee(String assignee) {
+ this.assignee = assignee;
+ return this;
+ }
+
+ public HistoryTaskQuery state(String state) {
+ this.state = state;
+ return this;
+ }
+
+ public HistoryTaskQuery outcome(String outcome) {
+ this.outcome = outcome;
+ return this;
+ }
+
+ public HistoryTaskQuery orderAsc(String property) {
+ addOrderByClause("ht."+property+" asc");
+ return this;
+ }
+
+ public HistoryTaskQuery orderDesc(String property) {
+ addOrderByClause("ht."+property+" desc");
+ return this;
+ }
+
+ public HistoryTaskQuery page(int firstResult, int maxResults) {
+ this.page = new Page(firstResult, maxResults);
+ return this;
+ }
+
+ public HistoryTaskQuery startedAfter(Date time) {
+ this.startedAfter = time;
+ return this;
+ }
+
+ public HistoryTaskQuery startedBefore(Date time) {
+ this.startedBefore = time;
+ return this;
+ }
+
+ public HistoryTaskQuery tookLessThen(long durationInMillis) {
+ this.tookLessThen = durationInMillis;
+ return this;
+ }
+
+ public HistoryTaskQuery tookLongerThen(long durationInMillis) {
+ this.tookLongerThen = durationInMillis;
+ return this;
+ }
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryTaskQueryImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/session/DbSession.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/session/DbSession.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/session/DbSession.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -27,6 +27,7 @@
import org.jbpm.api.task.Task;
import org.jbpm.pvm.internal.client.ClientExecution;
import org.jbpm.pvm.internal.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.history.model.HistoryProcessInstanceImpl;
import org.jbpm.pvm.internal.job.JobImpl;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.query.DeploymentQueryImpl;
@@ -43,6 +44,8 @@
public interface DbSession {
void save(Object entity);
+ void update(Object entity);
+
<T> T get(Class<T> entityClass, Object primaryKey);
void delete(Object entity);
void flush();
@@ -90,12 +93,8 @@
/** the process instance uniquely identified by the given executionKey. */
ClientExecution findProcessInstanceById(String processInstanceId);
- /* find ids for all process instances for a given process definition. */
List<String> findProcessInstanceIds(String processDefinitionId);
-
- /** delete the process instance including the history. */
- void deleteProcessInstance(String processInstanceId);
-
+
/** deletes the history information for all process instances for
* the given process definition */
void deleteProcessDefinitionHistory(String processDefinitionId);
@@ -111,8 +110,6 @@
Task createTask();
- void saveTask(Task task);
-
Task findTaskByExecution(Execution execution);
// job methods //////////////////////////////////////////////////////////////
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/session/TimerSession.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/session/TimerSession.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/session/TimerSession.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -36,9 +36,9 @@
* @param timerImpl
* the timer to be executed.
* @throws IllegalArgumentException
- * if the timer is null or if its activity is null or if its dueDate
- * is null or if its dueDate is negative or if its dueDate is past
- * or if its dueDate is equals to Long.MAX_VALUE
+ * if the timer is null or if its activity is null or if its duedate
+ * is null or if its duedate is negative or if its duedate is past
+ * or if its duedate is equals to Long.MAX_VALUE
*/
void schedule(Timer timer);
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/ExecutionServiceImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/ExecutionServiceImpl.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/ExecutionServiceImpl.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -119,6 +119,10 @@
public void deleteProcessInstance(String processInstanceId) {
commandService.execute(new DeleteProcessInstance(processInstanceId));
}
+
+ public void deleteProcessInstanceCascade(String processInstanceId) {
+ commandService.execute(new DeleteProcessInstance(processInstanceId, true));
+ }
public Object getVariable(String executionId, String variableName) {
Set<String> variableNames = new HashSet<String>();
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/HistoryServiceImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/HistoryServiceImpl.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/HistoryServiceImpl.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -26,12 +26,15 @@
import org.jbpm.api.HistoryService;
import org.jbpm.api.history.HistoryActivityInstanceQuery;
import org.jbpm.api.history.HistoryProcessInstanceQuery;
+import org.jbpm.api.history.HistoryTaskQuery;
import org.jbpm.pvm.internal.cmd.CreateHistoryActivityInstanceQueryCmd;
import org.jbpm.pvm.internal.cmd.CreateHistoryProcessInstanceQueryCmd;
+import org.jbpm.pvm.internal.cmd.CreateHistoryTaskQueryCmd;
import org.jbpm.pvm.internal.query.AvgDurationPerActivityQueryCmd;
import org.jbpm.pvm.internal.query.ChoiceDistributionQueryCmd;
import org.jbpm.pvm.internal.query.HistoryActivityInstanceQueryImpl;
import org.jbpm.pvm.internal.query.HistoryProcessInstanceQueryImpl;
+import org.jbpm.pvm.internal.query.HistoryTaskQueryImpl;
/**
@@ -58,4 +61,10 @@
query.setCommandService(commandService);
return query;
}
+
+ public HistoryTaskQuery createHistoryTaskQuery() {
+ HistoryTaskQueryImpl query = commandService.execute(new CreateHistoryTaskQueryCmd());
+ query.setCommandService(commandService);
+ return query;
+ }
}
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-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/TaskServiceImpl.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -28,7 +28,7 @@
import org.jbpm.api.TaskQuery;
import org.jbpm.api.TaskService;
-import org.jbpm.api.model.Comment;
+import org.jbpm.api.history.HistoryComment;
import org.jbpm.api.task.Participation;
import org.jbpm.api.task.Task;
import org.jbpm.pvm.internal.cmd.AddParticipationCmd;
@@ -78,6 +78,10 @@
public void deleteTask(String taskId, String reason) {
commandService.execute(new DeleteTaskCmd(taskId, reason));
}
+
+ public void deleteTaskCascade(String taskId) {
+ commandService.execute(new DeleteTaskCmd(taskId, true));
+ }
public void completeTask(String taskId) {
completeTask(taskId, null);
@@ -136,11 +140,11 @@
return commandService.execute(new NewTaskCmd(parentTaskId));
}
- public Comment addTaskComment(String taskId, String message) {
+ public HistoryComment addTaskComment(String taskId, String message) {
return commandService.execute(new AddTaskCommentCmd(taskId, message));
}
- public List<Comment> getTaskComments(String taskId) {
+ public List<HistoryComment> getTaskComments(String taskId) {
return commandService.execute(new GetTaskCommentsCmd(taskId));
}
@@ -148,7 +152,7 @@
commandService.execute(new DeleteCommentCmd(commentId));
}
- public Comment addReplyComment(String commentId, String message) {
+ public HistoryComment addReplyComment(String commentId, String message) {
return commandService.execute(new AddReplyCommentCmd(commentId, message));
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskDefinitionImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskDefinitionImpl.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskDefinitionImpl.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -39,7 +39,6 @@
protected List<TaskDefinitionImpl> subTaskDefinitions = new ArrayList<TaskDefinitionImpl>();
protected int priority = Priority.NORMAL;
protected SwimlaneDefinitionImpl swimlaneDefinition;
- protected TaskHandler taskHandler;
public int getPriority() {
return priority;
@@ -71,10 +70,4 @@
public void setFormResourceName(String form) {
this.formResourceName = form;
}
- public TaskHandler getTaskHandler() {
- return taskHandler;
- }
- public void setTaskHandler(TaskHandler taskHandler) {
- this.taskHandler = taskHandler;
- }
}
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskHandler.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskHandler.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskHandler.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -1,91 +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.task;
-
-import java.io.Serializable;
-
-import org.jbpm.pvm.internal.client.ClientExecution;
-
-/** for advanced task customization.
- *
- * The default implementation can be found in {@link DefaultTaskHandler}.
- *
- * @author Tom Baeyens
- */
-public class TaskHandler implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- /** called after the task is created according
- * to the task definition. This method allows to
- * create subtasks.
- * @return indicates if the process execution should wait. */
- public boolean executionCreateTask(TaskImpl task) {
- task.historyTaskStart();
- return true;
- }
-
- /** called when the related execution gets a
- * signal. this method must either
- * {@link OpenTask#setSignalling(boolean) remove signalling} from this task
- * or {@link OpenTask#delete(String) cancel} it. */
- public void executionSignal(TaskImpl task) {
- task.setSignalling(false);
- }
-
- /** called when the given task is assigned to an actor. */
- public void taskAssign(TaskImpl task, String assignee) {
- task.historyTaskAssign(assignee);
- }
-
- /** called when the given task is cancelled. */
- public void taskDelete(TaskImpl task, String reason) {
- task.historyTaskDelete(reason);
-// TODO if task is deleted, the related execution should be
-// suspended. But in the API and console, there is no
-// way yet to resume individual instances.
-// if (task.getExecution()!=null) {
-// task.getExecution().suspend();
-// }
- }
-
- /** called when the given task completes. The default behaviour
- * will send a signal to the execution if this task is still signalling. */
- public void taskComplete(TaskImpl task, String outcome) {
- task.historyTaskComplete(outcome);
-
- if (task.isSignalling()) {
- ClientExecution execution = (ClientExecution) task.getExecution();
- execution.signal(outcome);
- }
- }
-
- /** is called when a subtask completes. this can be used to
- * prematurely signal the execution. e.g. for "5 out of 7" scenarios.*/
- public void taskSubTaskComplete(TaskImpl task, OpenTask subTask, String outcome) {
- }
-
- /** is called when a variable is updated. This can be used to
- * propagate the execution based on availability of variables. */
- public void taskVariableUpdate(TaskImpl task, String key, Object value) {
- }
-}
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-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskImpl.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -22,27 +22,23 @@
package org.jbpm.pvm.internal.task;
import java.io.Serializable;
-import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.HashSet;
-import java.util.List;
import java.util.Set;
import org.jbpm.api.Execution;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.model.Comment;
import org.jbpm.api.model.Event;
import org.jbpm.api.task.Assignable;
import org.jbpm.api.task.Participation;
import org.jbpm.api.task.Swimlane;
import org.jbpm.api.task.Task;
+import org.jbpm.pvm.internal.client.ClientExecution;
import org.jbpm.pvm.internal.env.Environment;
-import org.jbpm.pvm.internal.history.events.TaskAssign;
-import org.jbpm.pvm.internal.history.events.TaskDelete;
+import org.jbpm.pvm.internal.history.HistoryEvent;
import org.jbpm.pvm.internal.history.events.TaskComplete;
-import org.jbpm.pvm.internal.history.events.TaskStart;
-import org.jbpm.pvm.internal.model.CommentImpl;
+import org.jbpm.pvm.internal.history.events.TaskDelete;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
import org.jbpm.pvm.internal.model.ScopeInstanceImpl;
@@ -60,8 +56,7 @@
// private static Log log = Log.getLog(TaskImpl.class.getName());
- private static final TaskHandler DEFAULT_TASK_HANDLER = new TaskHandler();
-
+ protected boolean isNew;
protected String name;
protected String description;
@@ -69,14 +64,11 @@
protected Set<ParticipationImpl> participations = new HashSet<ParticipationImpl>();
protected String formResourceName;
- protected Date create;
- protected Date dueDate;
+ protected Date createTime;
+ protected Date duedate;
protected Integer progress;
protected boolean isSignalling;
- // protected VariableMap variableMap;
- protected List<CommentImpl> comments = new ArrayList<CommentImpl>();
-
protected int priority = Priority.NORMAL;
protected String state = Task.STATE_OPEN;
@@ -130,7 +122,6 @@
}
if (execution != null) {
execution.fire(Event.ASSIGN, execution.getActivity());
- getTaskHandler().taskAssign(this, assignee);
}
}
@@ -192,18 +183,23 @@
}
public void complete(String outcome) {
- getTaskHandler().taskComplete(this, outcome);
+ historyTaskComplete(outcome);
+
+ if (isSignalling()) {
+ ClientExecution execution = (ClientExecution) getExecution();
+ execution.signal(outcome);
+ }
+
if (superTask != null) {
superTask.subTaskComplete(this, outcome);
}
}
protected void subTaskComplete(TaskImpl subTask, String outcome) {
- getTaskHandler().taskSubTaskComplete(this, subTask, outcome);
}
public void delete(String reason) {
- getTaskHandler().taskDelete(this, reason);
+ historyTaskDelete(reason);
}
// state ////////////////////////////////////////////////////////////////////
@@ -218,34 +214,6 @@
return true;
}
- // variables ////////////////////////////////////////////////////////////////
-
- public void setVariable(String key, Object value) {
- super.setVariable(key, value);
- getTaskHandler().taskVariableUpdate(this, key, value);
- }
-
- // comments /////////////////////////////////////////////////////////////////
-
- public List<Comment> getComments() {
- return (List) comments;
- }
-
- public Comment createComment(String commentText) {
- CommentImpl comment = new CommentImpl(commentText);
- comments.add(comment);
- return comment;
- }
-
- public void removeComment(Comment comment) {
- if (comment == null) {
- throw new JbpmException("comment is null");
- }
- if (comments.contains(comment)) {
- comments.remove(comment);
- }
- }
-
// subtasks /////////////////////////////////////////////////////////////////
public Set<Task> getSubTasks() {
@@ -322,27 +290,15 @@
}
}
- public void historyTaskStart() {
- if (execution != null) {
- execution.fireHistoryEvent(new TaskStart(this));
- }
- }
-
- public void historyTaskAssign(String assignee) {
- if (execution != null) {
- execution.fireHistoryEvent(new TaskAssign(this, assignee));
- }
- }
-
public void historyTaskDelete(String reason) {
if (execution != null) {
- execution.fireHistoryEvent(new TaskDelete(reason));
+ HistoryEvent.fire(new TaskDelete(this, reason), execution);
}
}
public void historyTaskComplete(String outcome) {
if (execution != null) {
- execution.fireHistoryEvent(new TaskComplete(outcome));
+ HistoryEvent.fire(new TaskComplete(outcome), execution);
}
}
@@ -352,15 +308,6 @@
}
}
- public TaskHandler getTaskHandler() {
- if ((getTaskDefinition() == null) || (taskDefinition.getTaskHandler() == null)) {
- return DEFAULT_TASK_HANDLER;
- }
-
- TaskHandler taskHandler = taskDefinition.getTaskHandler();
- return taskHandler;
- }
-
// special getters and setters //////////////////////////////////////////////
public TaskDefinitionImpl getTaskDefinition() {
@@ -415,26 +362,22 @@
this.priority = priority;
}
- public void setComments(List<CommentImpl> comments) {
- this.comments = comments;
+ public Date getCreateTime() {
+ return createTime;
}
- public Date getCreate() {
- return create;
+ public void setCreateTime(Date create) {
+ this.createTime = create;
}
- public void setCreate(Date create) {
- this.create = create;
+ public Date getDuedate() {
+ return duedate;
}
- public Date getDueDate() {
- return dueDate;
+ public void setDuedate(Date duedate) {
+ this.duedate = duedate;
}
- public void setDueDate(Date dueDate) {
- this.dueDate = dueDate;
- }
-
public ExecutionImpl getExecution() {
return execution;
}
@@ -534,6 +477,10 @@
public void setFormResourceName(String form) {
this.formResourceName = form;
}
-
-
+ public boolean isNew() {
+ return isNew;
+ }
+ public void setNew(boolean isNew) {
+ this.isNew = isNew;
+ }
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/test/JobTestHelper.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/test/JobTestHelper.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/test/JobTestHelper.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -35,7 +35,7 @@
/** helper class for testing that executes messages and timers
* in the test runner thread. This way, the test can simulate
- * timers and messages being executed. The dueDate is ignored.
+ * timers and messages being executed. The duedate is ignored.
*
* @author Tom Baeyens
*/
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/WireContext.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/WireContext.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/WireContext.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -239,9 +239,9 @@
/**
* allows for postponing the creation of this wire context.
- * @param delayCreate specifies if creation should be postponed till {@link #create()} is called explicitly.
+ * @param delayCreate specifies if creation should be postponed till {@link #createTime()} is called explicitly.
* If delayCreate is set to false, creation is done as part of the constructor. If delayCreate is
- * set to true, the {@link #create()} method needs to be called explicitly by the client after
+ * set to true, the {@link #createTime()} method needs to be called explicitly by the client after
* construction is complete. The use case is creation of environment where the transactionName needs to be
* set and the scope needs to be added to the environment before the creation of this wire scope is done.
* @see JbpmConfiguration#openEnvironment()
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ObjectDescriptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ObjectDescriptor.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/ObjectDescriptor.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -26,7 +26,7 @@
* <p>This {@link Descriptor} creates and initializes an object.
* Objects can be instantiated from a constructor or from a method invocation.</p>
*
- * <p>The way to create an object is specified one of these methods (see <a href='#create'>creating objects</a>):
+ * <p>The way to create an object is specified one of these methods (see <a href='#createTime'>creating objects</a>):
* <ul>
* <li>className ({@link #setClassName(String)})</li>
* <li>factoryObjectName ({@link #setFactoryObjectName(String)})</li>
@@ -35,7 +35,7 @@
* Only one of these methods can be used.
* </p>
*
- * <h3 id='create'>Creating objects</h3>
+ * <h3 id='createTime'>Creating objects</h3>
* <h4>Creating object from a constructor</h4>
*
* <p>This method is used when <code>{@link #getClassName()}!=null && {@link #getMethodName()}==null</code>.</p>
Modified: jbpm4/trunk/modules/pvm/src/main/resources/jbpm.execution.hbm.xml
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/resources/jbpm.execution.hbm.xml 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/resources/jbpm.execution.hbm.xml 2009-07-07 18:00:05 UTC (rev 5254)
@@ -103,27 +103,6 @@
</class>
- <!-- ### COMMENTS ####################################################### -->
- <class name="CommentImpl" table="JBPM4_COMMENT">
- <id name="dbid" column="DBID_">
- <generator class="native" />
- </id>
- <discriminator column="CLASS_" />
- <version name="dbversion" column="DBVERSION_" />
-
- <property name="userId" column="USERID_" />
- <property name="time" column="TIME_" />
- <property name="message" column="MESSAGE_" type="text" />
-
- <list name="comments"
- cascade="all-delete-orphan"
- inverse="false">
- <key column="PARENT_" foreign-key="none" />
- <list-index column="PARENT_IDX_" />
- <one-to-many class="CommentImpl" />
- </list>
- </class>
-
<!-- ### VARIABLE ####################################################### -->
<class name="org.jbpm.pvm.internal.type.Variable" abstract="true" discriminator-value=" " table="JBPM4_VARIABLE">
<!-- discriminator values:
Modified: jbpm4/trunk/modules/pvm/src/main/resources/jbpm.history.hbm.xml
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/resources/jbpm.history.hbm.xml 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/resources/jbpm.history.hbm.xml 2009-07-07 18:00:05 UTC (rev 5254)
@@ -5,11 +5,12 @@
<!-- ### HISTORY PROCESS INSTANCE ####################################### -->
<class name="HistoryProcessInstanceImpl" table="JBPM4_HIST_PROCINST">
- <id name="processInstanceId" column="ID_">
+ <id name="dbid" column="DBID_">
<generator class="assigned" />
</id>
<version name="dbversion" column="DBVERSION_" />
+ <property name="processInstanceId" column="ID_" />
<property name="processDefinitionId" column="PROCDEFID_" />
<property name="key" column="KEY_" />
<property name="startTime" column="START_" type="timestamp" />
@@ -34,8 +35,8 @@
</class>
- <!-- ### HISTORY PROCESS INSTANCE ####################################### -->
- <class name="HistoryActivityInstanceImpl" table="JBPM4_HIST_ACTINST" discriminator-value="ACT">
+ <!-- ### HISTORY ACTIVITY INSTANCE ####################################### -->
+ <class name="HistoryActivityInstanceImpl" table="JBPM4_HIST_ACTINST" discriminator-value="act">
<id name="dbid" column="DBID_">
<generator class="native" />
</id>
@@ -62,14 +63,73 @@
<property name="duration" column="DURATION_" />
<property name="transitionName" column="TRANSITION_" />
- <subclass name="HistoryAutomaticInstanceImpl" discriminator-value="AUT">
- <subclass name="HistoryDecisionInstanceImpl" discriminator-value="EXCL" />
+ <subclass name="HistoryAutomaticInstanceImpl" discriminator-value="aut">
+ <subclass name="HistoryDecisionInstanceImpl" discriminator-value="excl" />
</subclass>
- <subclass name="HistoryTaskInstanceImpl" discriminator-value="TASK">
- <property name="assignee" column="ASSIGNEE_" />
- <property name="state" column="STATE_" />
+ <subclass name="HistoryTaskInstanceImpl" discriminator-value="task">
+ <many-to-one name="historyTask"
+ class="HistoryTaskImpl"
+ column="HTASK_"
+ cascade="all"
+ foreign-key="FK_HTI_HTASK"
+ index="IDX_HTI_HTASK" />
</subclass>
</class>
+
+ <!-- ### HISTORY TASK ################################################# -->
+ <class name="HistoryTaskImpl" table="JBPM4_HIST_TASK">
+ <id name="dbid" column="DBID_">
+ <generator class="assigned" />
+ </id>
+ <version name="dbversion" column="DBVERSION_" />
+ <!-- many-to-one name="historyTaskInstance"
+ class="HistoryTaskInstanceImpl"
+ column="HTI_"
+ foreign-key="none"
+ index="IDX_HTASK_HTI" / -->
+
+ <property name="executionId" column="EXECUTION_" />
+ <property name="outcome" column="OUTCOME_" />
+ <property name="assignee" column="ASSIGNEE_" />
+ <property name="state" column="STATE_" />
+ <property name="createTime" column="CREATE_" type="timestamp" />
+ <property name="endTime" column="END_" type="timestamp" />
+ <property name="duration" column="DURATION_" />
+
+ <list name="comments" cascade="all-delete-orphan">
+ <key column="HTASK_" />
+ <list-index column="HTASK_IDX_" />
+ <one-to-many class="HistoryCommentImpl" />
+ </list>
+
+ <set name="subTasks" cascade="all-delete-orphan">
+ <key column="SUPERTASK_" />
+ <one-to-many class="HistoryTaskImpl" />
+ </set>
+
+ </class>
+
+ <!-- ### HISTORY COMMENTS ################################################# -->
+ <class name="HistoryCommentImpl" table="JBPM4_HIST_COMMENT">
+ <id name="dbid" column="DBID_">
+ <generator class="native" />
+ </id>
+ <discriminator column="CLASS_" />
+ <version name="dbversion" column="DBVERSION_" />
+
+ <property name="userId" column="USERID_" />
+ <property name="time" column="TIME_" />
+ <property name="message" column="MESSAGE_" type="text" />
+
+ <list name="comments"
+ cascade="all-delete-orphan"
+ inverse="false">
+ <key column="PARENT_" foreign-key="none" />
+ <list-index column="PARENT_IDX_" />
+ <one-to-many class="HistoryCommentImpl" />
+ </list>
+ </class>
+
</hibernate-mapping>
\ No newline at end of file
Modified: jbpm4/trunk/modules/pvm/src/main/resources/jbpm.task.hbm.xml
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/resources/jbpm.task.hbm.xml 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/main/resources/jbpm.task.hbm.xml 2009-07-07 18:00:05 UTC (rev 5254)
@@ -27,8 +27,8 @@
</set>
<property name="priority" column="PRIORITY_"/>
- <property name="create" column="CREATE_"/>
- <property name="dueDate" column="DUEDATE_"/>
+ <property name="createTime" column="CREATE_"/>
+ <property name="duedate" column="DUEDATE_"/>
<property name="progress" column="PROGRESS_"/>
<property name="isSignalling" column="SIGNALLING_"/>
@@ -68,12 +68,6 @@
<property name="taskDefinitionName" column="TASKDEFNAME_"/>
- <list name="comments" cascade="all-delete-orphan">
- <key column="TASK_" />
- <list-index column="TASK_IDX_" />
- <one-to-many class="org.jbpm.pvm.internal.model.CommentImpl" />
- </list>
-
<set name="subTasks" cascade="all-delete-orphan">
<key column="SUPERTASK_" />
<one-to-many class="TaskImpl" />
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/AutoWireTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/AutoWireTest.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/AutoWireTest.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -38,7 +38,7 @@
public static class PieceOfCake {
- // auto-wire means that when an object like this is create,
+ // auto-wire means that when an object like this is createTime,
// that the WireScope will try to look for objects with
// the same name as the fields in the class. If it finds
// an object with that name, and if it is assignable to the
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/tx/BasicTransactionTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/tx/BasicTransactionTest.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/tx/BasicTransactionTest.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -31,7 +31,7 @@
import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.env.Environment;
import org.jbpm.pvm.internal.env.Transaction;
-import org.jbpm.pvm.internal.model.CommentImpl;
+import org.jbpm.pvm.internal.history.model.HistoryCommentImpl;
import org.jbpm.pvm.internal.type.variable.StringVariable;
import org.jbpm.test.JbpmTestCase;
@@ -51,7 +51,7 @@
commandService.execute(new Command<Object>() {
public Object execute(Environment environment) {
Session session = environment.get(Session.class);
- session.save(new CommentImpl("if i only had the time to write code"));
+ session.save(new HistoryCommentImpl("if i only had the time to write code"));
return null;
}
});
@@ -59,7 +59,7 @@
commandService.execute(new Command<Object>() {
public Object execute(Environment environment) {
Session session = environment.get(Session.class);
- List<CommentImpl> comments = session.createQuery("from " + CommentImpl.class.getName()).list();
+ List<HistoryCommentImpl> comments = session.createQuery("from " + HistoryCommentImpl.class.getName()).list();
assertEquals("if i only had the time to write code", comments.get(0).getMessage());
session.delete(comments.get(0));
return null;
@@ -76,7 +76,7 @@
public Object execute(Environment environment) {
Session session = environment.get(Session.class);
- session.save(new CommentImpl("if i only had the time to write code"));
+ session.save(new HistoryCommentImpl("if i only had the time to write code"));
throw new MyOwnRuntimeException();
}
});
@@ -89,7 +89,7 @@
public Object execute(Environment environment) {
Session session = environment.get(Session.class);
- List<CommentImpl> comments = session.createQuery("from " + CommentImpl.class.getName()).list();
+ List<HistoryCommentImpl> comments = session.createQuery("from " + HistoryCommentImpl.class.getName()).list();
assertEquals(0, comments.size());
return null;
}
@@ -105,7 +105,7 @@
public Object execute(Environment environment) throws Exception {
Session session = environment.get(Session.class);
- session.save(new CommentImpl("if i only had the time to write code"));
+ session.save(new HistoryCommentImpl("if i only had the time to write code"));
throw new MyOwnCheckedException();
}
});
@@ -119,7 +119,7 @@
public Object execute(Environment environment) {
Session session = environment.get(Session.class);
- List<CommentImpl> comments = session.createQuery("from " + CommentImpl.class.getName()).list();
+ List<HistoryCommentImpl> comments = session.createQuery("from " + HistoryCommentImpl.class.getName()).list();
assertEquals(0, comments.size());
return null;
}
@@ -144,7 +144,7 @@
commandService.execute(new Command<Object>() {
public Object execute(Environment environment) throws Exception {
Session session = environment.get(Session.class);
- session.save(new CommentImpl("if i only had the time to write code"));
+ session.save(new HistoryCommentImpl("if i only had the time to write code"));
Transaction transaction = environment.get(Transaction.class);
SuccessfulSynchronization successfulSynchronization = new SuccessfulSynchronization();
transaction.registerSynchronization(successfulSynchronization);
@@ -155,7 +155,7 @@
commandService.execute(new Command<Object>() {
public Object execute(Environment environment) {
Session session = environment.get(Session.class);
- List<CommentImpl> comments = session.createQuery("from " + CommentImpl.class.getName()).list();
+ List<HistoryCommentImpl> comments = session.createQuery("from " + HistoryCommentImpl.class.getName()).list();
assertEquals("if i only had the time to write code", comments.get(0).getMessage());
session.delete(comments.get(0));
List<StringVariable> stringVariables = session.createQuery("from " + StringVariable.class.getName()).list();
@@ -187,7 +187,7 @@
public Object execute(Environment environment) throws Exception {
Session session = environment.get(Session.class);
- session.save(new CommentImpl("if i only had the time to write code"));
+ session.save(new HistoryCommentImpl("if i only had the time to write code"));
Transaction transaction = environment.get(Transaction.class);
UnsuccessfulSynchronization unsuccessfulSynchronization = new UnsuccessfulSynchronization();
transaction.registerSynchronization(unsuccessfulSynchronization);
@@ -207,7 +207,7 @@
public Object execute(Environment environment) {
Session session = environment.get(Session.class);
- List<CommentImpl> comments = session.createQuery("from " + CommentImpl.class.getName()).list();
+ List<HistoryCommentImpl> comments = session.createQuery("from " + HistoryCommentImpl.class.getName()).list();
assertEquals(0, comments.size());
List<StringVariable> stringVariables = session.createQuery("from " + StringVariable.class.getName()).list();
assertEquals(0, stringVariables.size());
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/eventlistener/HqlEventListenerTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/eventlistener/HqlEventListenerTest.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/eventlistener/HqlEventListenerTest.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -35,9 +35,9 @@
}
protected void tearDown() throws Exception {
- taskService.deleteTask(taskLaundryId);
- taskService.deleteTask(taskDishesId);
- taskService.deleteTask(taskIronId);
+ taskService.deleteTaskCascade(taskLaundryId);
+ taskService.deleteTaskCascade(taskDishesId);
+ taskService.deleteTaskCascade(taskIronId);
super.tearDown();
}
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-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/SubTaskTest.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -34,7 +34,7 @@
*/
public class SubTaskTest extends JbpmTestCase {
- public void testTaskParticipants() {
+ public void testSubTasks() {
// create top level task
// * clean da house
@@ -116,7 +116,7 @@
assertEquals(expectedTaskNames, subTaskNames);
// delete task dishes
- taskService.deleteTask(dishesTaskId);
+ taskService.deleteTaskCascade(dishesTaskId);
// 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(laundryTaskId);
- taskService.deleteTask(sweepFloorTaskId);
+ taskService.deleteTaskCascade(laundryTaskId);
+ taskService.deleteTaskCascade(sweepFloorTaskId);
subTaskNames = getTaskNames(taskService.getSubTasks(taskId));
@@ -152,7 +152,7 @@
expectedTaskNames = new HashSet<String>();
assertEquals(expectedTaskNames, subTaskNames);
- taskService.deleteTask(taskId);
+ taskService.deleteTaskCascade(taskId);
}
private Set<String> getTaskNames(List<Task> tasks) {
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-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskCommentsTest.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -23,7 +23,7 @@
import java.util.List;
-import org.jbpm.api.model.Comment;
+import org.jbpm.api.history.HistoryComment;
import org.jbpm.api.task.Task;
import org.jbpm.test.JbpmTestCase;
@@ -42,7 +42,7 @@
// - what! you had a party while i was out ?!
// - euh yes. it was a great party :-)
// i'll clean up the mess
- Comment comment = taskService.addTaskComment(taskId, "what a party yesterday");
+ HistoryComment comment = taskService.addTaskComment(taskId, "what a party yesterday");
String whatAPartyId = comment.getId();
comment = taskService.addReplyComment(whatAPartyId, "what! you had a party while i was out ?!");
String youHadAPartyId = comment.getId();
@@ -50,7 +50,7 @@
taskService.addTaskComment(taskId, "i'll clean up the mess");
- List<Comment> taskComments = taskService.getTaskComments(taskId);
+ List<HistoryComment> taskComments = taskService.getTaskComments(taskId);
assertEquals("what a party yesterday", taskComments.get(0).getMessage());
assertEquals("i'll clean up the mess", taskComments.get(1).getMessage());
@@ -65,13 +65,12 @@
taskComments = taskService.getTaskComments(taskId);
assertEquals("i'll clean up the mess", taskComments.get(0).getMessage());
- // the following should delete the remaining comment. if not, this
- // will show up as a fixme.
- taskService.deleteTask(taskId);
+ // the following should delete the remaining comment. if not, this will show up as a fixme.
+ taskService.deleteTaskCascade(taskId);
}
-
+
public void testGetTaskCommentsWithUnexistingTaskId() {
- List<Comment> comments = taskService.getTaskComments("-1234");
+ List<HistoryComment> comments = taskService.getTaskComments("-1234");
assertTrue(comments.isEmpty());
}
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-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskCreateUpdateDeleteTest.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -47,16 +47,16 @@
assertNotNull("expected non-null task", task);
// make some change
Date dueDate = new Date();
- task.setDueDate(dueDate);
+ task.setDuedate(dueDate);
taskService.saveTask(task);
// verify change is applied
task = taskService.getTask(taskId);
// task.getDueDate() return an java.sql.Timestamp
DateFormat df = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG);
- assertEquals(df.format(dueDate), df.format(task.getDueDate()));
+ assertEquals(df.format(dueDate), df.format(task.getDuedate()));
- taskService.deleteTask(taskId);
+ taskService.deleteTaskCascade(taskId);
}
public void testDeleteTask() {
@@ -66,7 +66,7 @@
// task was made persistent
assertNotNull("expected non-null task", taskService.getTask(taskId));
// delete task and verify it does not exist
- taskService.deleteTask(taskId);
+ taskService.deleteTaskCascade(taskId);
task = taskService.getTask(taskId);
assertNull("expected null, but was " + task, task);
}
Deleted: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskHandlerTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskHandlerTest.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskHandlerTest.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -1,151 +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.test.task;
-
-import org.jbpm.api.Execution;
-import org.jbpm.api.task.Task;
-import org.jbpm.pvm.internal.task.OpenTask;
-import org.jbpm.pvm.internal.task.TaskHandler;
-import org.jbpm.pvm.internal.task.TaskImpl;
-import org.jbpm.test.JbpmTestCase;
-
-
-/**
- * @author Tom Baeyens
- */
-public class TaskHandlerTest extends JbpmTestCase {
-
- public static class ReviewHandler extends TaskHandler {
- private static final long serialVersionUID = 1L;
- public boolean executionCreateTask(TaskImpl task) {
- task.getExecution().setVariable("isExecutionCreateTaskCalled", "true");
- return super.executionCreateTask(task);
- }
-
- public void executionSignal(TaskImpl task) {
- task.getExecution().setVariable("isExecutionSignalledCalled", "true");
- super.executionSignal(task);
- }
-
- public void taskDelete(TaskImpl task, String reason) {
- task.getExecution().setVariable("isTaskCancelCalled", "true");
- super.taskDelete(task, reason);
- }
-
- public void taskComplete(TaskImpl task, String outcome) {
- task.getExecution().setVariable("isTaskCompleteCalled", "true");
- super.taskComplete(task, outcome);
- }
-
- public void taskSubTaskComplete(TaskImpl task, OpenTask subTask, String outcome) {
- task.getExecution().setVariable("isSubTaskCompleteCalled", "true");
- super.taskSubTaskComplete(task, subTask, outcome);
- }
-
- public void taskVariableUpdate(TaskImpl task, String key, Object value) {
- task.getExecution().setVariable("isTaskVariableUpdateCalled", "true");
- super.taskVariableUpdate(task, key, value);
- }
- }
-
- public void testTaskHandlerBasicScenario() {
- deployJpdlXmlString(
- "<process name='TaskHandler'>" +
- " <start>" +
- " <transition to='review' />" +
- " </start>" +
- " <task name='review'>" +
- " <task-handler class='"+ReviewHandler.class.getName()+"' />" +
- " <transition to='wait' />" +
- " </task>" +
- " <state name='wait'/>" +
- "</process>"
- );
-
- String processInstanceId = executionService.startProcessInstanceByKey("TaskHandler").getId();
-
- assertEquals("true", executionService.getVariable(processInstanceId, "isExecutionCreateTaskCalled"));
-
- Task task = taskService.createTaskQuery().list().get(0);
-
- String taskId = task.getId();
- taskService.setVariable(taskId, "checked", "true");
-
- assertEquals("true", executionService.getVariable(processInstanceId, "isExecutionCreateTaskCalled"));
-
- Task subTask = taskService.newTask(taskId);
- String subTaskId = taskService.saveTask(subTask);
- taskService.completeTask(subTaskId);
-
- assertEquals("true", executionService.getVariable(processInstanceId, "isSubTaskCompleteCalled"));
-
- taskService.completeTask(taskId);
-
- assertEquals("true", executionService.getVariable(processInstanceId, "isTaskCompleteCalled"));
- }
-
- public void testTaskHandlerCancelScenario() {
- deployJpdlXmlString(
- "<process name='TaskHandler'>" +
- " <start>" +
- " <transition to='review' />" +
- " </start>" +
- " <task name='review'>" +
- " <task-handler class='"+ReviewHandler.class.getName()+"' />" +
- " <transition to='wait' />" +
- " </task>" +
- " <state name='wait'/>" +
- "</process>"
- );
-
- String processInstanceId = executionService.startProcessInstanceByKey("TaskHandler").getId();
-
- Task task = taskService.createTaskQuery().list().get(0);
- String taskId = task.getId();
-
- taskService.deleteTask(taskId);
-
- assertEquals("true", executionService.getVariable(processInstanceId, "isTaskCancelCalled"));
- }
-
- public void testTaskHandlerExecutionSignalScenario() {
- deployJpdlXmlString(
- "<process name='TaskHandler'>" +
- " <start>" +
- " <transition to='review' />" +
- " </start>" +
- " <task name='review'>" +
- " <task-handler class='"+ReviewHandler.class.getName()+"' />" +
- " <transition to='wait' />" +
- " </task>" +
- " <state name='wait'/>" +
- "</process>"
- );
-
- Execution execution = executionService.startProcessInstanceByKey("TaskHandler");
- String executionId = execution.getId();
-
- executionService.signalExecutionById(executionId);
-
- assertEquals("true", executionService.getVariable(executionId, "isExecutionSignalledCalled"));
- }
-}
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskListTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskListTest.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskListTest.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -68,10 +68,10 @@
assertEquals(3, taskList.size());
- taskService.deleteTask(startBusinessTaskId);
- taskService.deleteTask(capitalTaskId);
- taskService.deleteTask(ideaTaskId);
- taskService.deleteTask(laundryTaskId);
+ taskService.deleteTaskCascade(startBusinessTaskId);
+ taskService.deleteTaskCascade(capitalTaskId);
+ taskService.deleteTaskCascade(ideaTaskId);
+ taskService.deleteTaskCascade(laundryTaskId);
}
public void testPersonalTaskListDefaultSortOrder() {
@@ -117,10 +117,10 @@
assertEquals(5, taskList.size());
- taskService.deleteTask(profitTaskId);
- taskService.deleteTask(dayOffTaskId);
- taskService.deleteTask(startBusinessTaskId);
- taskService.deleteTask(capitalTaskId);
- taskService.deleteTask(ideaTaskId);
+ taskService.deleteTaskCascade(profitTaskId);
+ taskService.deleteTaskCascade(dayOffTaskId);
+ taskService.deleteTaskCascade(startBusinessTaskId);
+ taskService.deleteTaskCascade(capitalTaskId);
+ taskService.deleteTaskCascade(ideaTaskId);
}
}
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskParticipationsTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskParticipationsTest.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskParticipationsTest.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -93,7 +93,7 @@
assertEquals(expectedIds, candidateGroupIds);
- taskService.deleteTask(taskId);
+ taskService.deleteTaskCascade(taskId);
}
public Set<String> extractParticipatingUserIds(List<Participation> taskParticipations, String participationType) {
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskQueryCandidatesTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskQueryCandidatesTest.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskQueryCandidatesTest.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -90,9 +90,9 @@
groupTasks = taskService.findGroupTasks("jackblack");
assertEquals(0, groupTasks.size());
- taskService.deleteTask(taskId);
- taskService.deleteTask(johnsOtherTaskId);
- taskService.deleteTask(joesOtherTaskId);
+ taskService.deleteTaskCascade(taskId);
+ taskService.deleteTaskCascade(johnsOtherTaskId);
+ taskService.deleteTaskCascade(joesOtherTaskId);
}
public void testGroupCandidate() {
@@ -123,8 +123,8 @@
groupTasks = taskService.findGroupTasks("jackblack");
assertEquals(0, groupTasks.size());
- taskService.deleteTask(taskId);
- taskService.deleteTask(johnsOtherTaskId);
- taskService.deleteTask(joesOtherTaskId);
+ taskService.deleteTaskCascade(taskId);
+ taskService.deleteTaskCascade(johnsOtherTaskId);
+ taskService.deleteTaskCascade(joesOtherTaskId);
}
}
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskQueryTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskQueryTest.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskQueryTest.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -69,10 +69,10 @@
assertEquals(4, taskList.size());
- taskService.deleteTask(capitalTaskId);
- taskService.deleteTask(startBusinessTaskId);
- taskService.deleteTask(dyperTaskId);
- taskService.deleteTask(laudryTaskId);
+ taskService.deleteTaskCascade(capitalTaskId);
+ taskService.deleteTaskCascade(startBusinessTaskId);
+ taskService.deleteTaskCascade(dyperTaskId);
+ taskService.deleteTaskCascade(laudryTaskId);
}
public void testSimplestTaskQuerySortBy() {
@@ -112,9 +112,9 @@
assertEquals(4, taskList.size());
- taskService.deleteTask(capitalTaskId);
- taskService.deleteTask(startBusinessTaskId);
- taskService.deleteTask(dyperTaskId);
- taskService.deleteTask(laudryTaskId);
+ taskService.deleteTaskCascade(capitalTaskId);
+ taskService.deleteTaskCascade(startBusinessTaskId);
+ taskService.deleteTaskCascade(dyperTaskId);
+ taskService.deleteTaskCascade(laudryTaskId);
}
}
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskVariablesTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskVariablesTest.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskVariablesTest.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -41,6 +41,6 @@
assertEquals("hello", taskService.getVariable(taskId, "text"));
assertEquals(new Integer(5), taskService.getVariable(taskId, "number"));
- taskService.deleteTask(taskId);
+ taskService.deleteTaskCascade(taskId);
}
}
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/taskactivity/TaskReassignTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/taskactivity/TaskReassignTest.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/taskactivity/TaskReassignTest.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -24,10 +24,9 @@
import java.util.List;
import org.jbpm.api.ProcessInstance;
-import org.jbpm.api.history.HistoryActivityInstance;
+import org.jbpm.api.history.HistoryTask;
import org.jbpm.api.task.Task;
import org.jbpm.jpdl.internal.xml.JpdlParser;
-import org.jbpm.pvm.internal.history.model.HistoryTaskInstanceImpl;
import org.jbpm.test.JbpmTestCase;
/**
@@ -66,12 +65,12 @@
assertEquals("johndoe", taskService.getTask(taskId).getAssignee());
taskService.completeTask(taskId);
- List<HistoryActivityInstance> aiHistory = historyService
- .createHistoryActivityInstanceQuery()
- .executionId(pi.getId())
- .list();
- HistoryTaskInstanceImpl hai = (HistoryTaskInstanceImpl) aiHistory.get(0);
+
+ HistoryTask historyTask = historyService
+ .createHistoryTaskQuery()
+ .taskId(taskId)
+ .uniqueResult();
- assertEquals("John Doe completed the Task, but someone else got the credit", "johndoe", hai.getAssignee());
+ assertEquals("John Doe completed the Task, but someone else got the credit", "johndoe", historyTask.getAssignee());
}
}
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailOnceMessageTest.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailOnceMessageTest.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailOnceMessageTest.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -26,12 +26,12 @@
import java.util.List;
import org.hibernate.Session;
-import org.jbpm.api.model.Comment;
+import org.jbpm.api.history.HistoryComment;
import org.jbpm.internal.log.Log;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.env.Environment;
+import org.jbpm.pvm.internal.history.model.HistoryCommentImpl;
import org.jbpm.pvm.internal.job.CommandMessage;
-import org.jbpm.pvm.internal.model.CommentImpl;
import org.jbpm.pvm.internal.session.MessageSession;
@@ -70,9 +70,9 @@
public Object execute(Environment environment) throws Exception {
Session session = environment.get(Session.class);
- List<Comment> comments = session.createQuery("from " + CommentImpl.class.getName()).list();
+ List<HistoryComment> comments = session.createQuery("from " + HistoryCommentImpl.class.getName()).list();
- for (Comment comment : comments) {
+ for (HistoryComment comment : comments) {
log.debug("retrieved message: "+comment.getMessage());
Integer messageId = new Integer(comment.getMessage());
assertTrue("message " + messageId + " committed twice", failOnceMessageIds.remove(messageId));
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailOnceTestCommand.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailOnceTestCommand.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailOnceTestCommand.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -21,13 +21,13 @@
*/
package org.jbpm.test.load.async;
-import org.jbpm.api.model.Comment;
+import org.jbpm.api.history.HistoryComment;
import org.jbpm.internal.log.Log;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.env.Environment;
+import org.jbpm.pvm.internal.history.model.HistoryCommentImpl;
import org.jbpm.pvm.internal.job.CommandMessage;
import org.jbpm.pvm.internal.job.JobImpl;
-import org.jbpm.pvm.internal.model.CommentImpl;
import org.jbpm.pvm.internal.session.DbSession;
import org.jbpm.pvm.internal.wire.descriptor.IntegerDescriptor;
import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
@@ -58,7 +58,7 @@
DbSession dbSession = environment.get(DbSession.class);
// this message execution should be rolled back
- Comment comment = new CommentImpl(Integer.toString(messageId));
+ HistoryComment comment = new HistoryCommentImpl(Integer.toString(messageId));
dbSession.save(comment);
if (!FailOnceMessageTest.failOnceMessageIds.contains(messageId)) {
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailingMessageTest.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailingMessageTest.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailingMessageTest.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -28,8 +28,8 @@
import org.jbpm.api.job.Job;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.env.Environment;
+import org.jbpm.pvm.internal.history.model.HistoryCommentImpl;
import org.jbpm.pvm.internal.job.CommandMessage;
-import org.jbpm.pvm.internal.model.CommentImpl;
import org.jbpm.pvm.internal.session.MessageSession;
@@ -65,7 +65,7 @@
throw new JbpmException("todo get the jobs with exception");
// Session session = environment.get(Session.class);
-// List commands = session.createQuery("from " + CommentImpl.class.getName()).list();
+// List commands = session.createQuery("from " + HistoryCommentImpl.class.getName()).list();
// assertTrue("command insertion should have been rolled back", commands.isEmpty());
// return null;
}
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailingTestCommand.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailingTestCommand.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailingTestCommand.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -21,11 +21,11 @@
*/
package org.jbpm.test.load.async;
-import org.jbpm.api.model.Comment;
+import org.jbpm.api.history.HistoryComment;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.env.Environment;
+import org.jbpm.pvm.internal.history.model.HistoryCommentImpl;
import org.jbpm.pvm.internal.job.CommandMessage;
-import org.jbpm.pvm.internal.model.CommentImpl;
import org.jbpm.pvm.internal.session.DbSession;
import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
@@ -41,7 +41,7 @@
DbSession dbSession = environment.get(DbSession.class);
// this message execution should be rolled back
- Comment comment = new CommentImpl("failing update");
+ HistoryComment comment = new HistoryCommentImpl("failing update");
dbSession.save(comment);
throw new RuntimeException("ooops");
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/NormalMessageCommand.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/NormalMessageCommand.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/NormalMessageCommand.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -26,8 +26,8 @@
import org.hibernate.Session;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.env.Environment;
+import org.jbpm.pvm.internal.history.model.HistoryCommentImpl;
import org.jbpm.pvm.internal.job.CommandMessage;
-import org.jbpm.pvm.internal.model.CommentImpl;
import org.jbpm.pvm.internal.wire.descriptor.IntegerDescriptor;
import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
@@ -57,7 +57,7 @@
}
public Void execute(Environment environment) throws Exception {
- CommentImpl comment = new CommentImpl(Integer.toString(messageId));
+ HistoryCommentImpl comment = new HistoryCommentImpl(Integer.toString(messageId));
Session session = environment.get(Session.class);
session.save(comment);
return null;
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/NormalMessageTest.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/NormalMessageTest.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/NormalMessageTest.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -25,12 +25,12 @@
import java.util.List;
import org.hibernate.Session;
-import org.jbpm.api.model.Comment;
+import org.jbpm.api.history.HistoryComment;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.env.Environment;
+import org.jbpm.pvm.internal.history.model.HistoryCommentImpl;
import org.jbpm.pvm.internal.job.CommandMessage;
import org.jbpm.pvm.internal.jobexecutor.JobExecutor;
-import org.jbpm.pvm.internal.model.CommentImpl;
import org.jbpm.pvm.internal.session.MessageSession;
import org.jbpm.test.Db;
@@ -67,8 +67,8 @@
public List<Integer> execute(Environment environment) {
List<Integer> processedMessageNumbers = new ArrayList<Integer>();
Session session = environment.get(Session.class);
- List<Comment> comments = session.createCriteria(CommentImpl.class).list();
- for (Comment comment: comments) {
+ List<HistoryComment> comments = session.createCriteria(HistoryCommentImpl.class).list();
+ for (HistoryComment comment: comments) {
int processedMessageNumber = Integer.parseInt(comment.getMessage());
processedMessageNumbers.add(processedMessageNumber);
// make sure the db stays clean
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/messages/AddCommentCmd.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/messages/AddCommentCmd.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/messages/AddCommentCmd.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -24,7 +24,7 @@
import org.hibernate.Session;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.env.Environment;
-import org.jbpm.pvm.internal.model.CommentImpl;
+import org.jbpm.pvm.internal.history.model.HistoryCommentImpl;
/**
* @author Tom Baeyens
@@ -36,7 +36,7 @@
protected String message;
public Void execute(Environment environment) throws Exception {
- CommentImpl comment = new CommentImpl(message);
+ HistoryCommentImpl comment = new HistoryCommentImpl(message);
Session session = environment.get(Session.class);
session.save(comment);
MessageProcessingTest.commentAdded();
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/messages/MessageProcessingTest.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/messages/MessageProcessingTest.java 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/messages/MessageProcessingTest.java 2009-07-07 18:00:05 UTC (rev 5254)
@@ -25,15 +25,15 @@
import java.util.List;
import org.hibernate.Session;
-import org.jbpm.api.model.Comment;
+import org.jbpm.api.history.HistoryComment;
import org.jbpm.internal.log.Log;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.cmd.CompositeCmd;
import org.jbpm.pvm.internal.cmd.SendMessageCmd;
import org.jbpm.pvm.internal.env.Environment;
+import org.jbpm.pvm.internal.history.model.HistoryCommentImpl;
import org.jbpm.pvm.internal.job.CommandMessage;
import org.jbpm.pvm.internal.jobexecutor.JobExecutor;
-import org.jbpm.pvm.internal.model.CommentImpl;
import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
import org.jbpm.pvm.internal.wire.descriptor.StringDescriptor;
import org.jbpm.test.load.LoadTestCase;
@@ -119,8 +119,8 @@
public List<Integer> execute(Environment environment) {
List<Integer> processedMessageNumbers = new ArrayList<Integer>();
Session session = environment.get(Session.class);
- List<Comment> comments = session.createCriteria(CommentImpl.class).list();
- for (Comment comment: comments) {
+ List<HistoryComment> comments = session.createCriteria(HistoryCommentImpl.class).list();
+ for (HistoryComment comment: comments) {
int processedMessageNumber = Integer.parseInt(comment.getMessage());
processedMessageNumbers.add(processedMessageNumber);
// make sure the db stays clean
Modified: jbpm4/trunk/qa/hudson-jbpm4-jboss.bat
===================================================================
--- jbpm4/trunk/qa/hudson-jbpm4-jboss.bat 2009-07-07 07:55:55 UTC (rev 5253)
+++ jbpm4/trunk/qa/hudson-jbpm4-jboss.bat 2009-07-07 18:00:05 UTC (rev 5254)
@@ -7,7 +7,7 @@
cmd /C ant -f qa/build.xml -Djbpm.debug=true integration.testrun.setup
-cmd /C mvn -U -Djboss.bind.address=localhost test
+cmd /C mvn -U -Djboss.bind.address=localhost -Ddatabase=hsqldb test
cmd /C ant -f qa/build.xml integration.testrun.teardown
15 years, 4 months
JBoss JBPM SVN: r5253 - jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/execution.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-07-07 03:55:55 -0400 (Tue, 07 Jul 2009)
New Revision: 5253
Modified:
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/execution/ConcurrentEndTest.java
Log:
JBPM-2387 added extra concurrency end test with automatic activities
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/execution/ConcurrentEndTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/execution/ConcurrentEndTest.java 2009-07-07 02:44:50 UTC (rev 5252)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/execution/ConcurrentEndTest.java 2009-07-07 07:55:55 UTC (rev 5253)
@@ -24,6 +24,7 @@
import org.jbpm.api.Execution;
import org.jbpm.api.ProcessInstance;
import org.jbpm.test.JbpmTestCase;
+import org.jbpm.test.activities.PassThroughActivity;
/**
@@ -68,4 +69,31 @@
ProcessInstance processInstance = executionService.startProcessInstanceByKey("ConcurrentEnd");
assertEquals(Execution.STATE_ENDED, processInstance.getState());
}
+
+ public void testConcurrentEndScenario3() {
+ deployJpdlXmlString(
+ "<process name='ConcurrentEnd'>" +
+ " <start>" +
+ " <transition to='f' />" +
+ " </start>" +
+ " <fork name='f'>" +
+ " <transition to='a' />" +
+ " <transition to='b' />" +
+ " </fork>" +
+ " <custom name='a' class='"+PassThroughActivity.class.getName()+"'>" +
+ " <transition to='join' />" +
+ " </custom>" +
+ " <custom name='b' class='"+PassThroughActivity.class.getName()+"'>" +
+ " <transition to='join' />" +
+ " </custom>" +
+ " <join name='join'>" +
+ " <transition to='end' />" +
+ " </join>" +
+ " <end name='end' />" +
+ "</process>"
+ );
+
+ ProcessInstance processInstance = executionService.startProcessInstanceByKey("ConcurrentEnd");
+ assertEquals(Execution.STATE_ENDED, processInstance.getState());
+ }
}
15 years, 4 months
JBoss JBPM SVN: r5252 - in projects/jopr-integration: src/main/java/org/jbosson/plugins/jbpm and 2 other directories.
by do-not-reply@jboss.org
Author: jim.ma
Date: 2009-07-06 22:44:50 -0400 (Mon, 06 Jul 2009)
New Revision: 5252
Added:
projects/jopr-integration/.classpath
projects/jopr-integration/.project
Removed:
projects/jopr-integration/src/main/resources/lib/
Modified:
projects/jopr-integration/pom.xml
projects/jopr-integration/src/main/java/org/jbosson/plugins/jbpm/JbpmInstanceComponent.java
projects/jopr-integration/src/main/java/org/jbosson/plugins/jbpm/JbpmInstanceDiscoveryComponent.java
projects/jopr-integration/src/main/java/org/jbosson/plugins/jbpm/JbpmProcessDefDiscoveryComponent.java
projects/jopr-integration/src/main/resources/META-INF/rhq-plugin.xml
Log:
cleaned up the previous jopr jbpm plugin
Added: projects/jopr-integration/.classpath
===================================================================
--- projects/jopr-integration/.classpath (rev 0)
+++ projects/jopr-integration/.classpath 2009-07-07 02:44:50 UTC (rev 5252)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Added: projects/jopr-integration/.project
===================================================================
--- projects/jopr-integration/.project (rev 0)
+++ projects/jopr-integration/.project 2009-07-07 02:44:50 UTC (rev 5252)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>rhq-jbpm-plugin</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Modified: projects/jopr-integration/pom.xml
===================================================================
--- projects/jopr-integration/pom.xml 2009-07-06 15:33:50 UTC (rev 5251)
+++ projects/jopr-integration/pom.xml 2009-07-07 02:44:50 UTC (rev 5252)
@@ -4,25 +4,24 @@
<parent>
<groupId>org.jboss.on</groupId>
- <!-- Bypass the jon-plugins-parent which can not have children. It must build after the plugins in order to execute integration tests on them. -->
<artifactId>jon-parent</artifactId>
<version>2.1.2.GA</version>
</parent>
<groupId>org.jboss.on</groupId>
- <artifactId>rhq-jbpm-plugin</artifactId>
+ <artifactId>jopr-jbpm-plugin</artifactId>
<packaging>jar</packaging>
- <name>JON JBossESB jbpm Plugin</name>
- <description>A plugin for managing JBossESB jbpm process</description>
+ <name>Jopr jbpm Plugin</name>
+ <description>A plugin for managing jbpm</description>
<scm>
- <connection>scm:svn:http://svn.corp.jboss.com/repos/jon/trunk/jon/plugins/jbossesb/</connection>
- <developerConnection>scm:svn:http://svn.corp.jboss.com/repos/jon/trunk/jon/plugins/jbossesb/</developerConnection>
+ <connection>scm:svn:https://svn.jboss.org/repos/jbpm/projects/jopr-integration</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbpm/projects/jopr-integration</developerConnection>
</scm>
<properties>
- <scm.module.path>jon/plugins/jbossesb/</scm.module.path>
+ <scm.module.path>.</scm.module.path>
</properties>
<dependencies>
@@ -31,72 +30,23 @@
<artifactId>rhq-jbossas-plugin</artifactId>
<version>2.1.2.GA</version>
<scope>provided</scope>
- </dependency>
-</dependencies>
+ </dependency>
+
+ <!--enable copy the dependecies to the package, it does not need this dependency -->
+ <dependency>
+ <groupId>org.jbpm.jbpm3</groupId>
+ <artifactId>jbpm-jpdl</artifactId>
+ <version>3.2.5.GA</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
<build>
- <plugins>
-
- <!-- Used to add dependencies to the plugin lib
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>2.0</version>
- <executions>
- <execution>
- <id>copy-postgres-jar</id>
- <phase>process-resources</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>postgresql</groupId>
- <artifactId>postgresql</artifactId>
- <version>8.1-407.jdbc3</version>
- </artifactItem>
- </artifactItems>
- <outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>-->
-
-
-
-
-<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.3</version>
- <executions>
- <execution>
- <id>copy-res</id>
- <phase>process-resources</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
- <resources>
- <resource>
- <directory>resources/lib</directory>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
-
-
-
-
-
- <!--plugin>
+ <plugins>
+ <plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.0</version>
<executions>
@@ -104,23 +54,17 @@
<id>copy-dependencies</id>
<phase>process-resources</phase>
<goals>
- <goal>copy</goal>
+ <goal>copy-dependencies</goal>
</goals>
<configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-jpdl</artifactId>
- <version>3.2.5.GA</version>
- </artifactItem>
- </artifactItems>
- <outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
+ <outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
+ <includeScope>runtime</includeScope>
+ <excludeGroupIds>org.apache.jackrabbit</excludeGroupIds>
+ <excludeArtifactIds>xml-apis,xercesImpl,tm-extractors,poi,pdfbox,nekohtml,lucene-core,junit,jta,i18nlog,hibernate,derby,ehcache</excludeArtifactIds>
</configuration>
</execution>
</executions>
- </plugin-->
-
-
+ </plugin>
</plugins>
</build>
<profiles>
@@ -225,7 +169,9 @@
<profile>
<id>dev</id>
-
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
<properties>
<rhq.rootDir>../../..</rhq.rootDir>
<rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
Modified: projects/jopr-integration/src/main/java/org/jbosson/plugins/jbpm/JbpmInstanceComponent.java
===================================================================
--- projects/jopr-integration/src/main/java/org/jbosson/plugins/jbpm/JbpmInstanceComponent.java 2009-07-06 15:33:50 UTC (rev 5251)
+++ projects/jopr-integration/src/main/java/org/jbosson/plugins/jbpm/JbpmInstanceComponent.java 2009-07-07 02:44:50 UTC (rev 5252)
@@ -99,11 +99,7 @@
if ("END".equals(operataion)) {
message = endInstance();
}
-
- if ("DELETE".equals(operataion)) {
- message = deleteInstance();
- }
-
+
if ("RESUME".equals(operataion)) {
message = resumeInstance();
}
@@ -137,16 +133,8 @@
operation.invoke(Long.parseLong(resourceContext.getResourceKey()));
return "Sucess";
}
-
- public String deleteInstance() {
- EmsConnection connection = getNewConnection();
- EmsBean bean = connection.getBean(this.JBPM_SERVICE);
- EmsOperation operation = bean.getOperation("deleteProcessInstance");
- operation.invoke(Long.parseLong(resourceContext.getResourceKey()));
- return "Sucess";
- }
-
-
+
+
/* implement the DeleteResourceFacet */
public void deleteResource() throws Exception {
EmsConnection connection = getNewConnection();
Modified: projects/jopr-integration/src/main/java/org/jbosson/plugins/jbpm/JbpmInstanceDiscoveryComponent.java
===================================================================
--- projects/jopr-integration/src/main/java/org/jbosson/plugins/jbpm/JbpmInstanceDiscoveryComponent.java 2009-07-06 15:33:50 UTC (rev 5251)
+++ projects/jopr-integration/src/main/java/org/jbosson/plugins/jbpm/JbpmInstanceDiscoveryComponent.java 2009-07-07 02:44:50 UTC (rev 5252)
@@ -19,7 +19,6 @@
public Set<DiscoveredResourceDetails> discoverResources(
ResourceDiscoveryContext<JbpmProcessDefComponent> context) {
- System.out.println("Discover jbpm instance definition");
Set<DiscoveredResourceDetails> jbpmDefs = new java.util.HashSet<DiscoveredResourceDetails>();
try {
Modified: projects/jopr-integration/src/main/java/org/jbosson/plugins/jbpm/JbpmProcessDefDiscoveryComponent.java
===================================================================
--- projects/jopr-integration/src/main/java/org/jbosson/plugins/jbpm/JbpmProcessDefDiscoveryComponent.java 2009-07-06 15:33:50 UTC (rev 5251)
+++ projects/jopr-integration/src/main/java/org/jbosson/plugins/jbpm/JbpmProcessDefDiscoveryComponent.java 2009-07-07 02:44:50 UTC (rev 5252)
@@ -22,8 +22,6 @@
public Set<DiscoveredResourceDetails> discoverResources(
ResourceDiscoveryContext<JbpmServiceComponent> context) {
-
- System.out.println("Discover jbpm process definition");
Set<DiscoveredResourceDetails> jbpmDefs = new java.util.HashSet<DiscoveredResourceDetails>();
try {
Modified: projects/jopr-integration/src/main/resources/META-INF/rhq-plugin.xml
===================================================================
--- projects/jopr-integration/src/main/resources/META-INF/rhq-plugin.xml 2009-07-06 15:33:50 UTC (rev 5251)
+++ projects/jopr-integration/src/main/resources/META-INF/rhq-plugin.xml 2009-07-07 02:44:50 UTC (rev 5252)
@@ -1,13 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<plugin name="JBossESB-JBPM" displayName="JBossESB-JBPM"
+<plugin name="JBPM-Plugin" displayName="JBPM-Plugin"
package="org.jbosson.plugins.jbpm"
description="Provides monitoring of JBoss JBPM" version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:xmlns:rhq-plugin" xmlns:c="urn:xmlns:rhq-configuration">
<depends plugin="JMX" />
- <depends plugin="Tomcat" />
<depends plugin="JBossAS" useClasses="true" />
<service name="JBPM Service"
discovery="org.jbosson.plugins.jbpm.JbpmServiceDiscoveryComponent"
15 years, 4 months
JBoss JBPM SVN: r5251 - jbpm4/branches.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-07-06 11:33:50 -0400 (Mon, 06 Jul 2009)
New Revision: 5251
Added:
jbpm4/branches/jbpm-4.0/
Log:
creating the jbpm 4.0 release branch
Copied: jbpm4/branches/jbpm-4.0 (from rev 5250, jbpm4/trunk)
15 years, 4 months
JBoss JBPM SVN: r5250 - in jbpm4/trunk: modules/distro/src/main/files and 2 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-07-06 11:26:58 -0400 (Mon, 06 Jul 2009)
New Revision: 5250
Modified:
jbpm4/trunk/modules/api/pom.xml
jbpm4/trunk/modules/distro/src/main/files/readme.html
jbpm4/trunk/modules/migration/pom.xml
jbpm4/trunk/qa/test.demo.setup.bat
Log:
build fixes related to xsddocs and added 4.0 GA release notes to readme.html
Modified: jbpm4/trunk/modules/api/pom.xml
===================================================================
--- jbpm4/trunk/modules/api/pom.xml 2009-07-06 14:03:53 UTC (rev 5249)
+++ jbpm4/trunk/modules/api/pom.xml 2009-07-06 15:26:58 UTC (rev 5250)
@@ -41,40 +41,63 @@
<id>schemadocs</id>
<build>
<plugins>
- <plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>unpack</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.jbpm.jbpm4.dependencies.xsddoctool</groupId>
+ <artifactId>xsddoctool</artifactId>
+ <version>1.0</version>
+ <type>zip</type>
+ <outputDirectory>target/xsddoctool</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
- <id>generate-schemadocs</id>
- <phase>package</phase>
+ <id>schemadocs-generation</id>
+ <phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
- <echo message="creating schemadocs in ${basedir}/target/schemadocs" />
- <mkdir dir="target/schemadocs" />
- <taskdef name="xsddoc" classname="net.sf.xframe.xsddoc.Task" classpathref="maven.plugin.classpath" />
- <xsddoc out="${basedir}/target/schemadocs" title="jBPM 4 Schema's" verbose="false">
- <fileset dir="src/main/resources" />
- </xsddoc>
- </tasks>
+ <java classname="com.docflex.xml.Generator" maxmemory="512m" fork="true">
+ <classpath>
+ <pathelement location="target/xsddoctool/xercesImpl.jar" />
+ <pathelement location="target/xsddoctool/docflex-xml-re.jar" />
+ </classpath>
+ <!-- specify the template -->
+ <arg value="-template"/>
+ <arg value="target/xsddoctool/XSDDoc/FramedDoc.tpl"/>
+ <arg value="-format"/>
+ <arg value="HTML"/>
+ <arg value="-d"/>
+ <arg value="target/schemadocs"/>
+ <arg value="-nodialog"/>
+ <arg value="-launchviewer=false"/>
+ <arg value="-p:docTitle=jPDL 4.0 Schema"/>
+ <arg value="src/main/resources/jpdl-4.0.xsd"/>
+ </java>
+ </tasks>
</configuration>
</execution>
</executions>
- <dependencies>
- <dependency>
- <groupId>xsddoc</groupId>
- <artifactId>xsddoc</artifactId>
- <version>1.0</version>
- </dependency>
- <dependency>
- <groupId>xalan</groupId>
- <artifactId>xalan</artifactId>
- <version>2.7.0</version>
- </dependency>
- </dependencies>
- </plugin>
+ </plugin>
</plugins>
</build>
</profile>
Modified: jbpm4/trunk/modules/distro/src/main/files/readme.html
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/readme.html 2009-07-06 14:03:53 UTC (rev 5249)
+++ jbpm4/trunk/modules/distro/src/main/files/readme.html 2009-07-06 15:26:58 UTC (rev 5250)
@@ -35,9 +35,176 @@
</tr>
</table>
+
+<h1>Release Notes for jBPM 4.0 (GA)</h1>
+
+<h2>Known Issues
+</h2>
+<p>There are still 2 known minor inconveniences in the Graphical Process Designer (GPD). For workarounds, see the jira issues:</p>
+<ul>
+<li>[<a href='https://jira.jboss.org/jira/browse/GPD-306'>GPD-306</a>] - Self Referencing Connections
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/GPD-336'>GPD-336</a>] - image generation fails
+</li>
+</ul>
+
+
+<h2> Bug
+</h2>
+<ul>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2022'>JBPM-2022</a>] - EnvironmentFactory cannot be bound to JNDI
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2055'>JBPM-2055</a>] - Executions that are ended show up in query
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2303'>JBPM-2303</a>] - Exception with a process containing a fork/join
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2313'>JBPM-2313</a>] - Unabled to enlist resource exception
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2319'>JBPM-2319</a>] - Finished executions are not changed to "ended" (they stay in the "active" state)
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2331'>JBPM-2331</a>] - StaleObjectException on Timer execution.
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2332'>JBPM-2332</a>] - task query candidate problem
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2335'>JBPM-2335</a>] - Subprocess Element causes Exception if followed by an <end> Element
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2340'>JBPM-2340</a>] - TaskService getTaskComments throws NullPointerException if the task is not found
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2344'>JBPM-2344</a>] - JTA interceptor breaks console and deployer
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2355'>JBPM-2355</a>] - Unable to retrieve suspended process defintions
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2389'>JBPM-2389</a>] - Reassignment is not reflected in task history
+</li>
+</ul>
+
+<h2> Feature Request
+</h2>
+<ul>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2052'>JBPM-2052</a>] - Suspend / Resume executions
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2102'>JBPM-2102</a>] - Provide process definition lifecycle
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2305'>JBPM-2305</a>] - Implement a method in TaskService to return all active tasks of a process instance
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2309'>JBPM-2309</a>] - Add method to support getTaskDefinition and getProcessInstance from interface Task
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2342'>JBPM-2342</a>] - extend repo service to get a list of deployments
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2352'>JBPM-2352</a>] - jPDL Schema definition needs some tweaks
+</li>
+</ul>
+
+<h2> Task
+</h2>
+<ul>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-1214'>JBPM-1214</a>] - check optimistic locking in case of loops
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-1895'>JBPM-1895</a>] - verify html documentation style sheets for internet explorer
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2004'>JBPM-2004</a>] - finish database cleanup of all the tests
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2016'>JBPM-2016</a>] - finalize test support
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2110'>JBPM-2110</a>] - Delegate deployment-service dependency resolution to the dependecy deployer in AS 5
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2183'>JBPM-2183</a>] - process conversion tool
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2212'>JBPM-2212</a>] - review string == comparisons for execution.state
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2223'>JBPM-2223</a>] - event propagate property
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2275'>JBPM-2275</a>] - handle async message jobs after process instance deletion
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2286'>JBPM-2286</a>] - create test case with fork and join in one transaction
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2304'>JBPM-2304</a>] - investigate non-null return values for collections in the api
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2306'>JBPM-2306</a>] - fix developers guide
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2307'>JBPM-2307</a>] - prune api where possible
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2314'>JBPM-2314</a>] - Clean up validate(Timer)
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2322'>JBPM-2322</a>] - enable module test-db in integration test suite
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2323'>JBPM-2323</a>] - instantiate user defined classes at parsing time
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2328'>JBPM-2328</a>] - move timers to devguide
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2330'>JBPM-2330</a>] - fine tuning of the execution id generator
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2336'>JBPM-2336</a>] - fix delete task mismatch
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2339'>JBPM-2339</a>] - Complete JTA transaction refactoring
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2348'>JBPM-2348</a>] - make ids consistent
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2350'>JBPM-2350</a>] - move jboss process deployment to incubation
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2354'>JBPM-2354</a>] - fix excluded integration tests for test-db
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2356'>JBPM-2356</a>] - fine tuning of execution persistence hierarchy
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2357'>JBPM-2357</a>] - Change findExecutionById to show suspended executions
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2359'>JBPM-2359</a>] - reporting test fails on oracle
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2362'>JBPM-2362</a>] - integrate andries' spring integration
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2363'>JBPM-2363</a>] - document purpose of ant script installations
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2364'>JBPM-2364</a>] - split mail documentation in userguide and devguide part
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2365'>JBPM-2365</a>] - Clarification (and API) how "Start process with task form" should work
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2367'>JBPM-2367</a>] - verify examples classes deployment in demo.setup script
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2368'>JBPM-2368</a>] - verifty job execution transaction integration with jboss
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2370'>JBPM-2370</a>] - Incorporate Migration tool in distribution
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2371'>JBPM-2371</a>] - add mysql schema diagram to db docs
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2372'>JBPM-2372</a>] - complete javadocs
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2374'>JBPM-2374</a>] - image problem
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2376'>JBPM-2376</a>] - putting a task back in the group
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2378'>JBPM-2378</a>] - add continue attribute to xsd
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBPM-2379'>JBPM-2379</a>] - regression on oracle related to clobs
+</li>
+</ul>
+
+<h2> Task
+</h2>
+<ul>
+<li>[<a href='https://jira.jboss.org/jira/browse/GPD-226'>GPD-226</a>] - Define a repeatable build for these plugins to be exported as a feature
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/GPD-229'>GPD-229</a>] - Write up the initial test scenario's to test the GPD (automated or manual)
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/GPD-288'>GPD-288</a>] - Errors show up in problems view
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/GPD-301'>GPD-301</a>] - migration support
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/GPD-331'>GPD-331</a>] - Support HQL attributes and elements
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/GPD-333'>GPD-333</a>] - Ensure backwards compatibility between GPD 3.1.x and GPD 4.x
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/GPD-334'>GPD-334</a>] - update jbpm roadmap with gpd features
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/GPD-341'>GPD-341</a>] - renaming swimlane should make editor dirty
+</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/GPD-351'>GPD-351</a>] - Modify project and jpdl creation wizards to allow for jBPM 3 and jBPM 4 to coexist
+</li>
+</ul>
+
+
<h1>Release notes for jBPM 4.0.0.CR1</h1>
- <h2 style="color:red;">Known Limitations</h2>
+ <h2>Known Limitations</h2>
<ul>
<li>In the Graphical Process Designer, the hql and sql nodes are not yet configurable</li>
<li>In the Graphical Process Designer, the custom node is supported but not completely configurable</li>
Modified: jbpm4/trunk/modules/migration/pom.xml
===================================================================
--- jbpm4/trunk/modules/migration/pom.xml 2009-07-06 14:03:53 UTC (rev 5249)
+++ jbpm4/trunk/modules/migration/pom.xml 2009-07-06 15:26:58 UTC (rev 5250)
@@ -113,12 +113,12 @@
<id>distribution-package</id>
<phase>package</phase>
<goals>
- <goal>assembly</goal>
+ <goal>single</goal>
</goals>
<configuration>
<finalName>migration-distro</finalName>
- <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
- <appendAssemblyId>false</appendAssemblyId>
+ <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
+ <appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>scripts/assembly-distro.xml</descriptor>
</descriptors>
Modified: jbpm4/trunk/qa/test.demo.setup.bat
===================================================================
--- jbpm4/trunk/qa/test.demo.setup.bat 2009-07-06 14:03:53 UTC (rev 5249)
+++ jbpm4/trunk/qa/test.demo.setup.bat 2009-07-06 15:26:58 UTC (rev 5250)
@@ -1,5 +1,5 @@
echo To run this, make sure that at least you have jbpm.parent.dir specified in your ${user.home}/.jbpm4/build.properties
-cmd /C mvn -U -Pdistro clean install
+cmd /C mvn -U -Pdistro -Pschemadocs clean install
cmd /C ant -f qa/build.xml reinstall.jbpm
cmd /C ant -f modules/distro/src/main/files/jboss/build.xml demo.setup
15 years, 4 months
JBoss JBPM SVN: r5249 - projects/gwt-console/trunk/gui/war/src/main/resources/org/jboss/bpm/console/public.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-07-06 10:03:53 -0400 (Mon, 06 Jul 2009)
New Revision: 5249
Modified:
projects/gwt-console/trunk/gui/war/src/main/resources/org/jboss/bpm/console/public/console.css
Log:
Investigate log panel issues
Modified: projects/gwt-console/trunk/gui/war/src/main/resources/org/jboss/bpm/console/public/console.css
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/resources/org/jboss/bpm/console/public/console.css 2009-07-06 11:22:05 UTC (rev 5248)
+++ projects/gwt-console/trunk/gui/war/src/main/resources/org/jboss/bpm/console/public/console.css 2009-07-06 14:03:53 UTC (rev 5249)
@@ -233,8 +233,8 @@
.log-panel {
background-color: #ECF2FC;
border: 0px solid black;
- margin: 0px;
- padding:10px;
+ margin: 0px;
+ padding:10px;
}
.log-panel .log-scroll-panel {
15 years, 4 months
JBoss JBPM SVN: r5248 - jbpm4/trunk/qa.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-07-06 07:22:05 -0400 (Mon, 06 Jul 2009)
New Revision: 5248
Modified:
jbpm4/trunk/qa/hudson-jbpm4-jboss.sh
Log:
added documentation for -Ddatabase=$DATABASE
Modified: jbpm4/trunk/qa/hudson-jbpm4-jboss.sh
===================================================================
--- jbpm4/trunk/qa/hudson-jbpm4-jboss.sh 2009-07-06 11:08:58 UTC (rev 5247)
+++ jbpm4/trunk/qa/hudson-jbpm4-jboss.sh 2009-07-06 11:22:05 UTC (rev 5248)
@@ -17,6 +17,8 @@
ant -f qa/build.xml $ANT_PROPERTIES integration.testrun.setup
+# -Ddatabase=$DATABASE is necessary for the reporting tests in module test-db
+# that test uses the jbpm.hibernate.cfg.xml resource on the classpath to connect to the db
mvn -U -Djboss.bind.address=localhost -Ddatabase=$DATABASE test
ant -f qa/build.xml $ANT_PROPERTIES integration.testrun.teardown
15 years, 4 months
JBoss JBPM SVN: r5247 - in jbpm4/trunk/modules: pvm/src/main/java/org/jbpm/pvm/internal/history/events and 4 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-07-06 07:08:58 -0400 (Mon, 06 Jul 2009)
New Revision: 5247
Added:
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/taskactivity/TaskReassignTest.java
Modified:
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskActivity.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskAssign.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.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/task/TaskHandler.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskImpl.java
Log:
JBPM-2389 fixed history propagation of reassignment of tasks
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-07-06 11:07:48 UTC (rev 5246)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskActivity.java 2009-07-06 11:08:58 UTC (rev 5247)
@@ -51,13 +51,7 @@
public void execute(ActivityExecution execution) {
ExecutionImpl executionImpl = (ExecutionImpl) execution;
TaskImpl task = executionImpl.createTask(taskDefinition);
-
- TaskHandler taskHandler = task.getTaskHandler();
- boolean wait = taskHandler.executionCreateTask(task);
-
- if (wait) {
- execution.waitForSignal();
- }
+ execution.waitForSignal();
}
public void signal(ActivityExecution execution, String signalName, Map<String, ?> parameters) throws Exception {
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskAssign.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskAssign.java 2009-07-06 11:07:48 UTC (rev 5246)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskAssign.java 2009-07-06 11:08:58 UTC (rev 5247)
@@ -21,7 +21,11 @@
*/
package org.jbpm.pvm.internal.history.events;
+import org.jbpm.pvm.internal.env.Environment;
import org.jbpm.pvm.internal.history.HistoryEvent;
+import org.jbpm.pvm.internal.history.model.HistoryTaskInstanceImpl;
+import org.jbpm.pvm.internal.session.DbSession;
+import org.jbpm.pvm.internal.task.TaskImpl;
/**
* @author Alejandro Guizar
@@ -30,15 +34,18 @@
private static final long serialVersionUID = 1L;
- protected String userId;
+ protected TaskImpl taskImpl;
+ protected String assignee;
- public TaskAssign(String userId) {
- this.userId = userId;
+ public TaskAssign(TaskImpl taskImpl, String assignee) {
+ this.assignee = assignee;
}
- @Override
public void process() {
- // TODO
+ DbSession dbSession = Environment.getFromCurrent(DbSession.class);
+ Long historyActivityInstanceDbId = execution.getHistoryActivityInstanceDbid();
+ HistoryTaskInstanceImpl historyTaskInstance = (HistoryTaskInstanceImpl)
+ dbSession.get(HistoryTaskInstanceImpl.class, historyActivityInstanceDbId);
+ historyTaskInstance.setAssignee(assignee);
}
-
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java 2009-07-06 11:07:48 UTC (rev 5246)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java 2009-07-06 11:08:58 UTC (rev 5247)
@@ -30,10 +30,12 @@
import org.jbpm.pvm.internal.cal.BusinessCalendar;
import org.jbpm.pvm.internal.cal.Duration;
import org.jbpm.pvm.internal.env.Environment;
+import org.jbpm.pvm.internal.env.EnvironmentDefaults;
import org.jbpm.pvm.internal.env.Transaction;
import org.jbpm.pvm.internal.jobexecutor.JobAddedNotification;
import org.jbpm.pvm.internal.jobexecutor.JobExecutor;
import org.jbpm.pvm.internal.model.ObservableElement;
+import org.jbpm.pvm.internal.script.ScriptManager;
import org.jbpm.pvm.internal.session.DbSession;
import org.jbpm.pvm.internal.session.TimerSession;
import org.jbpm.pvm.internal.util.Clock;
@@ -69,6 +71,10 @@
}
public void setDueDateDescription(String dueDateDescription) {
+
+ ScriptManager scriptManager = EnvironmentDefaults.getScriptManager();
+ dueDateDescription = (String) scriptManager.evaluateExpression(dueDateDescription, null);
+
Duration duration = new Duration(dueDateDescription);
Date now = Clock.getCurrentTime();
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-07-06 11:07:48 UTC (rev 5246)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java 2009-07-06 11:08:58 UTC (rev 5247)
@@ -75,6 +75,7 @@
import org.jbpm.pvm.internal.task.SwimlaneDefinitionImpl;
import org.jbpm.pvm.internal.task.SwimlaneImpl;
import org.jbpm.pvm.internal.task.TaskDefinitionImpl;
+import org.jbpm.pvm.internal.task.TaskHandler;
import org.jbpm.pvm.internal.task.TaskImpl;
import org.jbpm.pvm.internal.type.Variable;
import org.jbpm.pvm.internal.util.EqualsUtil;
@@ -729,6 +730,9 @@
// save task so that TaskDbSession.findTaskByExecution works for assign event listeners
dbSession.saveTask(task);
+
+ TaskHandler taskHandler = task.getTaskHandler();
+ boolean wait = taskHandler.executionCreateTask(task);
SwimlaneDefinitionImpl swimlaneDefinition = taskDefinition.getSwimlaneDefinition();
if (swimlaneDefinition!=null) {
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskHandler.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskHandler.java 2009-07-06 11:07:48 UTC (rev 5246)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskHandler.java 2009-07-06 11:08:58 UTC (rev 5247)
@@ -53,8 +53,8 @@
}
/** called when the given task is assigned to an actor. */
- public void taskAssign(TaskImpl task, String userId) {
- task.historyTaskAssign(userId);
+ public void taskAssign(TaskImpl task, String assignee) {
+ task.historyTaskAssign(assignee);
}
/** called when the given task is cancelled. */
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-07-06 11:07:48 UTC (rev 5246)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskImpl.java 2009-07-06 11:08:58 UTC (rev 5247)
@@ -123,13 +123,14 @@
setAssignee(userId, false);
}
- public void setAssignee(String userId, boolean propagateToSwimlane) {
- this.assignee = userId;
+ public void setAssignee(String assignee, boolean propagateToSwimlane) {
+ this.assignee = assignee;
if (propagateToSwimlane) {
propagateAssigneeToSwimlane();
}
if (execution != null) {
execution.fire(Event.ASSIGN, execution.getActivity());
+ getTaskHandler().taskAssign(this, assignee);
}
}
@@ -327,9 +328,9 @@
}
}
- public void historyTaskAssign(String userId) {
+ public void historyTaskAssign(String assignee) {
if (execution != null) {
- execution.fireHistoryEvent(new TaskAssign(userId));
+ execution.fireHistoryEvent(new TaskAssign(this, assignee));
}
}
Added: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/taskactivity/TaskReassignTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/taskactivity/TaskReassignTest.java (rev 0)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/taskactivity/TaskReassignTest.java 2009-07-06 11:08:58 UTC (rev 5247)
@@ -0,0 +1,77 @@
+/*
+ * 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.test.taskactivity;
+
+import java.util.List;
+
+import org.jbpm.api.ProcessInstance;
+import org.jbpm.api.history.HistoryActivityInstance;
+import org.jbpm.api.task.Task;
+import org.jbpm.jpdl.internal.xml.JpdlParser;
+import org.jbpm.pvm.internal.history.model.HistoryTaskInstanceImpl;
+import org.jbpm.test.JbpmTestCase;
+
+/**
+ * @author Tom Baeyens
+ */
+public class TaskReassignTest extends JbpmTestCase {
+
+ public void testReassignHistory() {
+ deployJpdlXmlString(
+ "<process name='ReassignTest' xmlns='"+JpdlParser.JPDL_NAMESPACE+"'>" +
+ " <start>" +
+ " <transition to='write email'/>" +
+ " </start>" +
+ " <task name='write email' assignee='shekharv'>" +
+ " <transition to='end'/>" +
+ " </task>" +
+ " <end name='end'/>" +
+ "</process>"
+ );
+
+ ProcessInstance pi = executionService.startProcessInstanceByKey("ReassignTest");
+
+ List<Task> tasks = taskService.findPersonalTasks("shekharv");
+ assertTrue(tasks.size() == 1);
+
+ String taskId = tasks.get(0).getId();
+
+ taskService.assignTask(taskId, "johndoe");
+
+ List<Task> tasksAfterReassignment = taskService.findPersonalTasks("shekharv");
+ assertTrue("shekharv should not have any tasks.", tasksAfterReassignment.size() == 0);
+
+ List<Task> tasksForNewAssignee = taskService.findPersonalTasks("johndoe");
+ assertTrue("johndoe should have 1 task.", tasksForNewAssignee.size() == 1);
+
+ assertEquals("johndoe", taskService.getTask(taskId).getAssignee());
+
+ taskService.completeTask(taskId);
+ List<HistoryActivityInstance> aiHistory = historyService
+ .createHistoryActivityInstanceQuery()
+ .executionId(pi.getId())
+ .list();
+ HistoryTaskInstanceImpl hai = (HistoryTaskInstanceImpl) aiHistory.get(0);
+
+ assertEquals("John Doe completed the Task, but someone else got the credit", "johndoe", hai.getAssignee());
+ }
+}
Property changes on: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/taskactivity/TaskReassignTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 4 months
JBoss JBPM SVN: r5246 - in jbpm4/trunk: modules/test-db and 1 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-07-06 07:07:48 -0400 (Mon, 06 Jul 2009)
New Revision: 5246
Modified:
jbpm4/trunk/modules/examples/pom.xml
jbpm4/trunk/modules/test-db/pom.xml
jbpm4/trunk/qa/hudson-jbpm4-jboss.sh
Log:
added -Ddatabase=$DATABASE to the testrun to fix SQLStmtTest
Modified: jbpm4/trunk/modules/examples/pom.xml
===================================================================
--- jbpm4/trunk/modules/examples/pom.xml 2009-07-06 09:53:08 UTC (rev 5245)
+++ jbpm4/trunk/modules/examples/pom.xml 2009-07-06 11:07:48 UTC (rev 5246)
@@ -89,6 +89,7 @@
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
+ <id>database-test-cfg-customization</id>
<phase>test-compile</phase>
<goals>
<goal>run</goal>
@@ -159,6 +160,7 @@
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
+ <id>integration-test-cfg-customization</id>
<phase>test-compile</phase>
<goals>
<goal>run</goal>
Modified: jbpm4/trunk/modules/test-db/pom.xml
===================================================================
--- jbpm4/trunk/modules/test-db/pom.xml 2009-07-06 09:53:08 UTC (rev 5245)
+++ jbpm4/trunk/modules/test-db/pom.xml 2009-07-06 11:07:48 UTC (rev 5246)
@@ -101,6 +101,7 @@
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
+ <id>database-test-cfg-customization</id>
<phase>test-compile</phase>
<goals>
<goal>run</goal>
@@ -183,29 +184,13 @@
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
+ <id>integration-test-cfg-customization</id>
<phase>test-compile</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
- <echo message="database: ${database}" />
- <available property="qa.database.props.available" file="../../qa/jdbc/${database}.properties" />
- <echo message="qa.database.props.available: ${qa.database.props.available}" />
- <copy file="../../qa/jdbc/${database}.properties"
- tofile="target/test-classes/jdbc.properties"
- overwrite="true" />
- <copy file="${user.home}/.jbpm4/jdbc/${database}.properties"
- tofile="target/test-classes/jdbc.properties"
- overwrite="true"
- failonerror="false"/>
- <copy file="../../modules/distro/src/main/files/db/hibernate.cfg/${database}.hibernate.cfg.xml"
- tofile="target/test-classes/jbpm.hibernate.cfg.xml"
- overwrite="true">
- <filterset>
- <filtersfile file="target/test-classes/jdbc.properties" />
- </filterset>
- </copy>
<copy todir="target/test-classes" overwrite="true" failonerror="false">
<fileset dir="../distro/src/main/files/jboss/jbpm.cfg.remote.client" />
</copy>
Modified: jbpm4/trunk/qa/hudson-jbpm4-jboss.sh
===================================================================
--- jbpm4/trunk/qa/hudson-jbpm4-jboss.sh 2009-07-06 09:53:08 UTC (rev 5245)
+++ jbpm4/trunk/qa/hudson-jbpm4-jboss.sh 2009-07-06 11:07:48 UTC (rev 5246)
@@ -17,6 +17,6 @@
ant -f qa/build.xml $ANT_PROPERTIES integration.testrun.setup
-mvn -U -Djboss.bind.address=localhost test
+mvn -U -Djboss.bind.address=localhost -Ddatabase=$DATABASE test
ant -f qa/build.xml $ANT_PROPERTIES integration.testrun.teardown
15 years, 4 months
JBoss JBPM SVN: r5245 - jbpm4/trunk/qa.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-07-06 05:53:08 -0400 (Mon, 06 Jul 2009)
New Revision: 5245
Modified:
jbpm4/trunk/qa/hudson-jbpm4-jboss.sh
Log:
removed -Ddatabase from the integration test run
Modified: jbpm4/trunk/qa/hudson-jbpm4-jboss.sh
===================================================================
--- jbpm4/trunk/qa/hudson-jbpm4-jboss.sh 2009-07-06 09:43:13 UTC (rev 5244)
+++ jbpm4/trunk/qa/hudson-jbpm4-jboss.sh 2009-07-06 09:53:08 UTC (rev 5245)
@@ -17,6 +17,6 @@
ant -f qa/build.xml $ANT_PROPERTIES integration.testrun.setup
-mvn -U -Djboss.bind.address=localhost -Ddatabase=$DATABASE test
+mvn -U -Djboss.bind.address=localhost test
ant -f qa/build.xml $ANT_PROPERTIES integration.testrun.teardown
15 years, 4 months