JBoss JBPM SVN: r5005 - in jbpm4/trunk/modules: pvm/src/main/java/org/jbpm/pvm/internal/cmd and 11 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-06-08 07:49:49 -0400 (Mon, 08 Jun 2009)
New Revision: 5005
Added:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateHistoryActivityInstanceQueryCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateHistoryProcessInstanceQueryCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateJobQueryCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateProcessDefinitionQueryCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateProcessInstanceQueryCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateTaskQueryCmd.java
Modified:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessInstanceQuery.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/RepositoryService.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/TaskQuery.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/hibernate/DbSessionImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/AbstractQuery.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryActivityInstanceQueryImpl.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/query/JobQueryImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/ProcessDefinitionQueryImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/ProcessInstanceQueryImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/RepositoryServiceImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/RepositorySessionImpl.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/RepositorySession.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/ManagementServiceImpl.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/TaskQueryImpl.java
jbpm4/trunk/modules/pvm/src/main/resources/jbpm.execution.hbm.xml
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/tx/BasicTransactionTest.java
jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/Db.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/deploy/SuspendDeploymentTest.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskVariablesTest.java
Log:
JBPM-2004 finished cleanup of test data
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessInstanceQuery.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessInstanceQuery.java 2009-06-05 16:41:42 UTC (rev 5004)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessInstanceQuery.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -36,6 +36,7 @@
ProcessInstanceQuery processInstanceId(String processInstanceId);
ProcessInstanceQuery suspended();
+ ProcessInstanceQuery notSuspended();
ProcessInstanceQuery orderAsc(String property);
ProcessInstanceQuery orderDesc(String property);
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/RepositoryService.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/RepositoryService.java 2009-06-05 16:41:42 UTC (rev 5004)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/RepositoryService.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -35,7 +35,14 @@
void suspendDeployment(long deploymentDbid);
void resumeDeployment(long deploymentDbid);
+
+ /** deletes a deployment if the process definitions don't have
+ * running executions. history information (if any) remains
+ * in the database. */
void deleteDeployment(long deploymentDbid);
+
+ /** deletes deployment, contained process definitions, related process instances
+ * and their history information */
void deleteDeploymentCascade(long deploymentDbid);
InputStream getResourceAsStream(long deploymentDbid, String resourceName);
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/TaskQuery.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/TaskQuery.java 2009-06-05 16:41:42 UTC (rev 5004)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/TaskQuery.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -52,6 +52,9 @@
* associated as a candidate group to the task. */
TaskQuery candidate(String userId);
+ TaskQuery suspended();
+ TaskQuery notSuspended();
+
TaskQuery page(int firstResult, int maxResults);
TaskQuery orderAsc(String property);
TaskQuery orderDesc(String property);
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateHistoryActivityInstanceQueryCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateHistoryActivityInstanceQueryCmd.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateHistoryActivityInstanceQueryCmd.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -0,0 +1,41 @@
+/*
+ * 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.api.cmd.Command;
+import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.query.HistoryActivityInstanceQueryImpl;
+import org.jbpm.pvm.internal.session.DbSession;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class CreateHistoryActivityInstanceQueryCmd implements Command<HistoryActivityInstanceQueryImpl> {
+
+ private static final long serialVersionUID = 1L;
+
+ public HistoryActivityInstanceQueryImpl execute(Environment environment) throws Exception {
+ return environment.get(DbSession.class).createHistoryActivityInstanceQuery();
+ }
+
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateHistoryActivityInstanceQueryCmd.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateHistoryProcessInstanceQueryCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateHistoryProcessInstanceQueryCmd.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateHistoryProcessInstanceQueryCmd.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -0,0 +1,41 @@
+/*
+ * 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.api.cmd.Command;
+import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.query.HistoryProcessInstanceQueryImpl;
+import org.jbpm.pvm.internal.session.DbSession;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class CreateHistoryProcessInstanceQueryCmd implements Command<HistoryProcessInstanceQueryImpl> {
+
+ private static final long serialVersionUID = 1L;
+
+ public HistoryProcessInstanceQueryImpl execute(Environment environment) throws Exception {
+ return environment.get(DbSession.class).createHistoryProcessInstanceQuery();
+ }
+
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateHistoryProcessInstanceQueryCmd.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateJobQueryCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateJobQueryCmd.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateJobQueryCmd.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -0,0 +1,41 @@
+/*
+ * 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.api.cmd.Command;
+import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.query.JobQueryImpl;
+import org.jbpm.pvm.internal.session.DbSession;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class CreateJobQueryCmd implements Command<JobQueryImpl> {
+
+ private static final long serialVersionUID = 1L;
+
+ public JobQueryImpl execute(Environment environment) throws Exception {
+ return environment.get(DbSession.class).createJobQuery();
+ }
+
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateJobQueryCmd.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateProcessDefinitionQueryCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateProcessDefinitionQueryCmd.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateProcessDefinitionQueryCmd.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -0,0 +1,41 @@
+/*
+ * 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.api.cmd.Command;
+import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl;
+import org.jbpm.pvm.internal.session.RepositorySession;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class CreateProcessDefinitionQueryCmd implements Command<ProcessDefinitionQueryImpl> {
+
+ private static final long serialVersionUID = 1L;
+
+ public ProcessDefinitionQueryImpl execute(Environment environment) throws Exception {
+ return environment.get(RepositorySession.class).createProcessDefinitionQuery();
+ }
+
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateProcessDefinitionQueryCmd.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateProcessInstanceQueryCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateProcessInstanceQueryCmd.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateProcessInstanceQueryCmd.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -0,0 +1,41 @@
+/*
+ * 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.api.cmd.Command;
+import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.query.ProcessInstanceQueryImpl;
+import org.jbpm.pvm.internal.session.DbSession;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class CreateProcessInstanceQueryCmd implements Command<ProcessInstanceQueryImpl> {
+
+ private static final long serialVersionUID = 1L;
+
+ public ProcessInstanceQueryImpl execute(Environment environment) throws Exception {
+ return environment.get(DbSession.class).createProcessInstanceQuery();
+ }
+
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateProcessInstanceQueryCmd.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateTaskQueryCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateTaskQueryCmd.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateTaskQueryCmd.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -0,0 +1,41 @@
+/*
+ * 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.api.cmd.Command;
+import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.session.DbSession;
+import org.jbpm.pvm.internal.task.TaskQueryImpl;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class CreateTaskQueryCmd implements Command<TaskQueryImpl> {
+
+ private static final long serialVersionUID = 1L;
+
+ public TaskQueryImpl execute(Environment environment) throws Exception {
+ return environment.get(DbSession.class).createTaskQuery();
+ }
+
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateTaskQueryCmd.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
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-06-05 16:41:42 UTC (rev 5004)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteDeploymentCmd.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -26,8 +26,11 @@
import org.hibernate.Session;
import org.jbpm.api.JbpmException;
import org.jbpm.api.ProcessDefinition;
+import org.jbpm.api.ProcessInstance;
import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
+import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.query.ProcessInstanceQueryImpl;
import org.jbpm.pvm.internal.repository.DeploymentImpl;
import org.jbpm.pvm.internal.repository.RepositoryCache;
import org.jbpm.pvm.internal.session.DbSession;
@@ -39,6 +42,8 @@
*/
public class DeleteDeploymentCmd implements Command<Object> {
+ private static final Log log = Log.getLog(DeleteDeploymentCmd.class.getName());
+
private static final long serialVersionUID = 1L;
long deploymentDbid;
@@ -63,20 +68,27 @@
for (ProcessDefinition processDefinition: processDefinitions) {
String processDefinitionId = processDefinition.getId();
- List<String> processInstanceIds = dbSession.findProcessInstanceIds(processDefinitionId);
+ List<ProcessInstance> processInstances = dbSession.createProcessInstanceQuery()
+ .processDefinitionId(processDefinitionId)
+ .list();
+
if (cascade) {
- for (String processInstanceId: processInstanceIds) {
- dbSession.deleteProcessInstance(processInstanceId, false);
+ for (ProcessInstance processInstance: processInstances) {
+ dbSession.deleteProcessInstance(processInstance.getId(), true);
}
+
+ dbSession.deleteProcessDefinitionHistory(processDefinitionId);
+
} else {
- if (!processInstanceIds.isEmpty()) {
- throw new JbpmException("cannot delete deployment "+deploymentDbid+": still executions for "+processDefinition+": "+processInstanceIds);
+ if (!processInstances.isEmpty()) {
+ throw new JbpmException("cannot delete deployment "+deploymentDbid+": still executions for "+processDefinition+": "+processInstances);
}
}
}
Session session = environment.get(Session.class);
DeploymentImpl deployment = (DeploymentImpl) session.load(DeploymentImpl.class, deploymentDbid);
+ log.debug("deleting deployment "+deploymentDbid);
session.delete(deployment);
RepositoryCache repositoryCache = environment.get(RepositoryCache.class);
@@ -84,5 +96,4 @@
return null;
}
-
}
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-06-05 16:41:42 UTC (rev 5004)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/DbSessionImpl.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -36,14 +36,19 @@
import org.jbpm.api.history.HistoryProcessInstance;
import org.jbpm.api.task.Task;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.history.model.HistoryActivityInstanceImpl;
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.HistoryActivityInstanceQueryImpl;
import org.jbpm.pvm.internal.query.HistoryProcessInstanceQueryImpl;
+import org.jbpm.pvm.internal.query.JobQueryImpl;
+import org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl;
+import org.jbpm.pvm.internal.query.ProcessInstanceQueryImpl;
import org.jbpm.pvm.internal.session.DbSession;
import org.jbpm.pvm.internal.svc.DefaultCommandService;
-import org.jbpm.pvm.internal.task.SwimlaneImpl;
import org.jbpm.pvm.internal.task.TaskImpl;
+import org.jbpm.pvm.internal.task.TaskQueryImpl;
import org.jbpm.pvm.internal.util.Clock;
/**
@@ -128,7 +133,7 @@
// and if hibernate knows about the history class
&& (isHistoryEnabled())
) {
- List<HistoryProcessInstance> historyProcessInstances = new HistoryProcessInstanceQueryImpl(new DefaultCommandService())
+ List<HistoryProcessInstance> historyProcessInstances = createHistoryProcessInstanceQuery()
.processDefinitionId(processDefinitionId)
.list();
@@ -150,6 +155,26 @@
ProcessDefinition processDefinition = findProcessDefinitionById(processDefinitionId);
session.delete(processDefinition);
}
+
+ public void deleteProcessDefinitionHistory(String processDefinitionId) {
+ List<HistoryProcessInstanceImpl> historyProcessInstances =
+ session.createQuery(
+ "select hpi " +
+ "from "+HistoryProcessInstanceImpl.class.getName()+" hpi "+
+ "where hpi.processDefinitionId = :processDefinitionId "
+ )
+ .setString("processDefinitionId", processDefinitionId)
+ .list();
+
+ for (HistoryProcessInstanceImpl hpi: historyProcessInstances) {
+ session.createQuery(
+ "delete "+HistoryActivityInstanceImpl.class.getName()+" hai " +
+ "where hai.historyProcessInstance = :historyProcessInstance ")
+ .setEntity("historyProcessInstance", hpi)
+ .executeUpdate();
+ session.delete(hpi);
+ }
+ }
public boolean isHistoryEnabled() {
ClassMetadata historyHibernateMetadata = session.getSessionFactory().getClassMetadata(HistoryProcessInstanceImpl.class);
@@ -175,6 +200,14 @@
return (ClientExecution) query.uniqueResult();
}
+ public ClientExecution findProcessInstanceByIdIgnoreSuspended(String processInstanceId) {
+ // query definition can be found at the bottom of resource jbpm.pvm.execution.hbm.xml
+ Query query = session.getNamedQuery("findProcessInstanceByIdIgnoreSuspended");
+ query.setString("processInstanceId", processInstanceId);
+ query.setMaxResults(1);
+ return (ClientExecution) query.uniqueResult();
+ }
+
public ClientExecution findExecutionByKey(String processDefinitionName, String executionKey) {
// query definition can be found at the bottom of resource jbpm.pvm.execution.hbm.xml
Query query = session.getNamedQuery("findExecutionByKey");
@@ -184,7 +217,7 @@
return (ClientExecution) query.uniqueResult();
}
- public List<String> findProcessInstanceIds(String processDefinitionId) {
+ public List<String> findProcessInstanceIds(String processDefinitionId) {
// query definition can be found at the bottom of resource jbpm.pvm.job.hbm.xml
Query query = session.createQuery(
"select processInstance.id " +
@@ -222,7 +255,7 @@
}
}
- ExecutionImpl processInstance = (ExecutionImpl) findProcessInstanceById(processInstanceId);
+ ExecutionImpl processInstance = (ExecutionImpl) findProcessInstanceByIdIgnoreSuspended(processInstanceId);
if (processInstance!=null) {
// delete remaining tasks for this process instance
List<TaskImpl> tasks = findTasks(processInstanceId);
@@ -379,4 +412,24 @@
query.setMaxResults(1);
return (JobImpl<?>) query.uniqueResult();
}
+
+ public ProcessInstanceQueryImpl createProcessInstanceQuery() {
+ return new ProcessInstanceQueryImpl();
+ }
+
+ public TaskQueryImpl createTaskQuery() {
+ return new TaskQueryImpl();
+ }
+
+ public HistoryProcessInstanceQueryImpl createHistoryProcessInstanceQuery() {
+ return new HistoryProcessInstanceQueryImpl();
+ }
+
+ public HistoryActivityInstanceQueryImpl createHistoryActivityInstanceQuery() {
+ return new HistoryActivityInstanceQueryImpl();
+ }
+
+ public JobQueryImpl createJobQuery() {
+ return new JobQueryImpl();
+ }
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/AbstractQuery.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/AbstractQuery.java 2009-06-05 16:41:42 UTC (rev 5004)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/AbstractQuery.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -39,20 +39,11 @@
private static final long serialVersionUID = 1L;
- protected Session session;
protected CommandService commandService;
protected String orderByClause = null;
protected Page page = null;
protected boolean isWhereAdded = false;
- public AbstractQuery(CommandService commandService) {
- this.commandService = commandService;
- }
-
- public AbstractQuery(Session session) {
- this.session = session;
- }
-
protected abstract void applyParameters(Query query);
public abstract String hql();
@@ -68,7 +59,8 @@
public List untypedList() {
if (commandService!=null) {
return (List) commandService.execute(this);
- }
+ }
+ Session session = Environment.getFromCurrent(Session.class);
return (List) execute(session);
}
@@ -132,4 +124,8 @@
this.commandService = null;
return this;
}
+
+ public void setCommandService(CommandService commandService) {
+ this.commandService = commandService;
+ }
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryActivityInstanceQueryImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryActivityInstanceQueryImpl.java 2009-06-05 16:41:42 UTC (rev 5004)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryActivityInstanceQueryImpl.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -26,7 +26,6 @@
import org.hibernate.Query;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.history.HistoryActivityInstance;
import org.jbpm.api.history.HistoryActivityInstanceQuery;
import org.jbpm.pvm.internal.history.model.HistoryActivityInstanceImpl;
@@ -47,10 +46,6 @@
protected String executionId;
protected String activityName;
- public HistoryActivityInstanceQueryImpl(CommandService commandService) {
- super(commandService);
- }
-
public String hql() {
StringBuilder hql = new StringBuilder();
hql.append("select hai ");
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-06-05 16:41:42 UTC (rev 5004)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryProcessInstanceQueryImpl.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -40,10 +40,6 @@
protected String state;
protected String processInstanceId;
- public HistoryProcessInstanceQueryImpl(CommandService commandService) {
- super(commandService);
- }
-
public String hql() {
StringBuilder hql = new StringBuilder();
hql.append("select hpi ");
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/JobQueryImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/JobQueryImpl.java 2009-06-05 16:41:42 UTC (rev 5004)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/JobQueryImpl.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -25,7 +25,6 @@
import org.hibernate.Query;
import org.jbpm.api.JobQuery;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.job.Job;
import org.jbpm.pvm.internal.job.JobImpl;
import org.jbpm.pvm.internal.job.MessageImpl;
@@ -44,10 +43,6 @@
protected String processInstanceId = null;
protected Boolean exception;
- public JobQueryImpl(CommandService commandService) {
- super(commandService);
- }
-
public String hql() {
StringBuilder hql = new StringBuilder();
hql.append("select j ");
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/ProcessDefinitionQueryImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/ProcessDefinitionQueryImpl.java 2009-06-05 16:41:42 UTC (rev 5004)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/ProcessDefinitionQueryImpl.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -29,7 +29,6 @@
import org.hibernate.Session;
import org.jbpm.api.ProcessDefinition;
import org.jbpm.api.ProcessDefinitionQuery;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.env.Environment;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
import org.jbpm.pvm.internal.repository.DeploymentImpl;
@@ -61,14 +60,6 @@
protected boolean suspended;
protected Long deploymentDbid;
- public ProcessDefinitionQueryImpl(CommandService commandService) {
- super(commandService);
- }
-
- public ProcessDefinitionQueryImpl(Session session) {
- super(session);
- }
-
public Object execute(Session session) {
List<Map<String, Object>> propertyMaps = (List<Map<String, Object>>) super.execute(session);
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/ProcessInstanceQueryImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/ProcessInstanceQueryImpl.java 2009-06-05 16:41:42 UTC (rev 5004)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/ProcessInstanceQueryImpl.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -26,7 +26,6 @@
import org.hibernate.Query;
import org.jbpm.api.ProcessInstance;
import org.jbpm.api.ProcessInstanceQuery;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.pvm.internal.model.ExecutionImpl;
/**
@@ -38,12 +37,8 @@
protected String processDefinitionId;
protected String processInstanceId;
- protected boolean suspended;
+ protected Boolean suspended;
- public ProcessInstanceQueryImpl(CommandService commandService) {
- super(commandService);
- }
-
public ProcessInstance uniqueResult() {
return (ProcessInstance)untypedUniqueResult();
}
@@ -61,10 +56,12 @@
appendWhereClause("processInstance.parent is null ", hql);
- if (suspended) {
- appendWhereClause("processInstance.state = '"+ExecutionImpl.STATE_SUSPENDED+"' ", hql);
- } else {
- appendWhereClause("processInstance.state != '"+ExecutionImpl.STATE_SUSPENDED+"' ", hql);
+ if (suspended!=null) {
+ if (suspended) {
+ appendWhereClause("processInstance.state = '"+ExecutionImpl.STATE_SUSPENDED+"' ", hql);
+ } else {
+ appendWhereClause("processInstance.state != '"+ExecutionImpl.STATE_SUSPENDED+"' ", hql);
+ }
}
if (processInstanceId!=null) {
@@ -112,4 +109,9 @@
this.suspended = true;
return this;
}
+
+ public ProcessInstanceQuery notSuspended() {
+ this.suspended = false;
+ return this;
+ }
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/RepositoryServiceImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/RepositoryServiceImpl.java 2009-06-05 16:41:42 UTC (rev 5004)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/RepositoryServiceImpl.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -28,6 +28,7 @@
import org.jbpm.api.RepositoryService;
import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.model.ActivityCoordinates;
+import org.jbpm.pvm.internal.cmd.CreateProcessDefinitionQueryCmd;
import org.jbpm.pvm.internal.cmd.DeleteDeploymentCmd;
import org.jbpm.pvm.internal.cmd.GetActivityCoordinates;
import org.jbpm.pvm.internal.cmd.GetResourceAsStreamCmd;
@@ -67,7 +68,9 @@
}
public ProcessDefinitionQuery createProcessDefinitionQuery() {
- return new ProcessDefinitionQueryImpl(commandService);
+ ProcessDefinitionQueryImpl query = commandService.execute(new CreateProcessDefinitionQueryCmd());
+ query.setCommandService(commandService);
+ return query;
}
public ActivityCoordinates getActivityCoordinates(String processDefinitionId, String activityName) {
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/RepositorySessionImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/RepositorySessionImpl.java 2009-06-05 16:41:42 UTC (rev 5004)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/RepositorySessionImpl.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -149,10 +149,10 @@
// queries //////////////////////////////////////////////////////////////////
- public ProcessDefinitionQuery createProcessDefinitionQuery() {
- return new ProcessDefinitionQueryImpl(session);
+ public ProcessDefinitionQueryImpl createProcessDefinitionQuery() {
+ return new ProcessDefinitionQueryImpl();
}
-
+
public ProcessDefinitionImpl findProcessDefinitionByKey(String processDefinitionKey) {
ProcessDefinition processDefinition = createProcessDefinitionQuery()
.processDefinitionKey(processDefinitionKey)
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-06-05 16:41:42 UTC (rev 5004)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/session/DbSession.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -29,6 +29,12 @@
import org.jbpm.api.task.Task;
import org.jbpm.pvm.internal.job.JobImpl;
import org.jbpm.pvm.internal.model.ExecutionImpl;
+import org.jbpm.pvm.internal.query.HistoryActivityInstanceQueryImpl;
+import org.jbpm.pvm.internal.query.HistoryProcessInstanceQueryImpl;
+import org.jbpm.pvm.internal.query.JobQueryImpl;
+import org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl;
+import org.jbpm.pvm.internal.query.ProcessInstanceQueryImpl;
+import org.jbpm.pvm.internal.task.TaskQueryImpl;
/**
@@ -59,7 +65,23 @@
// process execution queries ////////////////////////////////////////////////
- /** the execution uniquely identified by the given executionKey. */
+ /** create a process instance query */
+ ProcessInstanceQueryImpl createProcessInstanceQuery();
+
+ /** create a task query */
+ TaskQueryImpl createTaskQuery();
+
+ /** create a history process instance query */
+ HistoryProcessInstanceQueryImpl createHistoryProcessInstanceQuery();
+
+ /** create a history activity instance query */
+ HistoryActivityInstanceQueryImpl createHistoryActivityInstanceQuery();
+
+ /** create a process instance query */
+ JobQueryImpl createJobQuery();
+
+ /** the execution uniquely identified by the given executionKey.
+ * this method doesn't 'see' suspended executions. */
ClientExecution findExecutionById(String executionId);
/** the process instance uniquely identified by the given executionKey. */
@@ -75,6 +97,10 @@
/** 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);
+
/** delete the process instance and optionally deletes the history. */
void deleteProcessInstance(String processInstanceId, boolean deleteHistory);
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/session/RepositorySession.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/session/RepositorySession.java 2009-06-05 16:41:42 UTC (rev 5004)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/session/RepositorySession.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -24,8 +24,8 @@
import java.io.InputStream;
import org.jbpm.api.Deployment;
-import org.jbpm.api.ProcessDefinitionQuery;
import org.jbpm.api.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl;
/**
@@ -39,7 +39,8 @@
InputStream getResourceAsStream(long deploymentDbid, String resourceName);
- ProcessDefinitionQuery createProcessDefinitionQuery();
+ /** create a process definition query */
+ ProcessDefinitionQueryImpl createProcessDefinitionQuery();
ClientProcessDefinition findProcessDefinitionById(String processDefinitionId);
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-06-05 16:41:42 UTC (rev 5004)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/ExecutionServiceImpl.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -29,6 +29,7 @@
import org.jbpm.api.ExecutionService;
import org.jbpm.api.ProcessInstance;
import org.jbpm.api.ProcessInstanceQuery;
+import org.jbpm.pvm.internal.cmd.CreateProcessInstanceQueryCmd;
import org.jbpm.pvm.internal.cmd.DeleteProcessInstance;
import org.jbpm.pvm.internal.cmd.EndProcessInstance;
import org.jbpm.pvm.internal.cmd.FindExecutionCmd;
@@ -106,7 +107,9 @@
public ProcessInstanceQuery createProcessInstanceQuery() {
- return new ProcessInstanceQueryImpl(commandService);
+ ProcessInstanceQueryImpl query = commandService.execute(new CreateProcessInstanceQueryCmd());
+ query.setCommandService(commandService);
+ return query;
}
public void endProcessInstance(String processInstanceId, String state) {
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-06-05 16:41:42 UTC (rev 5004)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/HistoryServiceImpl.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -26,6 +26,8 @@
import org.jbpm.api.HistoryService;
import org.jbpm.api.history.HistoryActivityInstanceQuery;
import org.jbpm.api.history.HistoryProcessInstanceQuery;
+import org.jbpm.pvm.internal.cmd.CreateHistoryActivityInstanceQueryCmd;
+import org.jbpm.pvm.internal.cmd.CreateHistoryProcessInstanceQueryCmd;
import org.jbpm.pvm.internal.query.AvgDurationPerActivityQueryCmd;
import org.jbpm.pvm.internal.query.ChoiceDistributionQueryCmd;
import org.jbpm.pvm.internal.query.HistoryActivityInstanceQueryImpl;
@@ -46,10 +48,14 @@
}
public HistoryProcessInstanceQuery createHistoryProcessInstanceQuery() {
- return new HistoryProcessInstanceQueryImpl(commandService);
+ HistoryProcessInstanceQueryImpl query = commandService.execute(new CreateHistoryProcessInstanceQueryCmd());
+ query.setCommandService(commandService);
+ return query;
}
public HistoryActivityInstanceQuery createHistoryActivityInstanceQuery() {
- return new HistoryActivityInstanceQueryImpl(commandService);
+ HistoryActivityInstanceQueryImpl query = commandService.execute(new CreateHistoryActivityInstanceQueryCmd());
+ query.setCommandService(commandService);
+ return query;
}
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/ManagementServiceImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/ManagementServiceImpl.java 2009-06-05 16:41:42 UTC (rev 5004)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/ManagementServiceImpl.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -23,6 +23,7 @@
import org.jbpm.api.JobQuery;
import org.jbpm.api.ManagementService;
+import org.jbpm.pvm.internal.cmd.CreateJobQueryCmd;
import org.jbpm.pvm.internal.cmd.ExecuteJobCmd;
import org.jbpm.pvm.internal.query.JobQueryImpl;
@@ -37,6 +38,8 @@
}
public JobQuery createJobQuery() {
- return new JobQueryImpl(commandService);
+ JobQueryImpl query = commandService.execute(new CreateJobQueryCmd());
+ 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-06-05 16:41:42 UTC (rev 5004)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/TaskServiceImpl.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -104,7 +104,9 @@
}
public TaskQuery createTaskQuery() {
- return new TaskQueryImpl(commandService);
+ TaskQueryImpl query = commandService.execute(new CreateTaskQueryCmd());
+ query.setCommandService(commandService);
+ return query;
}
public List<Task> getSubTasks(long taskDbid) {
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskQueryImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskQueryImpl.java 2009-06-05 16:41:42 UTC (rev 5004)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskQueryImpl.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -27,12 +27,12 @@
import org.hibernate.Query;
import org.jbpm.api.JbpmException;
import org.jbpm.api.TaskQuery;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.env.Environment;
import org.jbpm.api.identity.Group;
import org.jbpm.api.task.Task;
import org.jbpm.internal.log.Log;
import org.jbpm.pvm.internal.identity.spi.IdentitySession;
+import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.query.AbstractQuery;
import org.jbpm.pvm.internal.query.Page;
@@ -49,14 +49,11 @@
protected boolean unassigned = false;
protected String assignee = null;
protected String candidate = null;
+ protected Boolean suspended = null;
/* groupIds transports the groupIds from the hql to the applyParameters */
protected List<String> groupIds;
- public TaskQueryImpl(CommandService commandService) {
- super(commandService);
- }
-
public TaskQuery assignee(String assignee) {
if (candidate!=null) {
throw new JbpmException("assignee(...) cannot be combined with candidate(...) in one query");
@@ -77,6 +74,16 @@
return this;
}
+ public TaskQuery suspended() {
+ this.suspended = true;
+ return this;
+ }
+
+ public TaskQuery notSuspended() {
+ this.suspended = false;
+ return this;
+ }
+
public TaskQuery orderAsc(String property) {
orderByClause = "task." + property + " asc ";
return this;
@@ -139,6 +146,14 @@
appendWhereClause("(participant.userId = :candidateUserId) or (participant.groupId in (:candidateGroupIds) ) ", hql);
}
}
+
+ if (suspended!=null) {
+ if (suspended) {
+ appendWhereClause("task.state = '"+ExecutionImpl.STATE_SUSPENDED+"' ", hql);
+ } else {
+ appendWhereClause("task.state != '"+ExecutionImpl.STATE_SUSPENDED+"' ", hql);
+ }
+ }
appendWhereClause("task.state != '"+Task.STATE_SUSPENDED+"' ", hql);
Modified: jbpm4/trunk/modules/pvm/src/main/resources/jbpm.execution.hbm.xml
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/resources/jbpm.execution.hbm.xml 2009-06-05 16:41:42 UTC (rev 5004)
+++ jbpm4/trunk/modules/pvm/src/main/resources/jbpm.execution.hbm.xml 2009-06-08 11:49:49 UTC (rev 5005)
@@ -345,4 +345,13 @@
]]>
</query>
+ <query name="findProcessInstanceByIdIgnoreSuspended">
+ <![CDATA[
+ select processInstance
+ from org.jbpm.pvm.internal.model.ExecutionImpl as processInstance
+ where processInstance.id = :processInstanceId
+ and processInstance.parent is null
+ ]]>
+ </query>
+
</hibernate-mapping>
\ No newline at end of file
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-06-05 16:41:42 UTC (rev 5004)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/tx/BasicTransactionTest.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -41,7 +41,6 @@
public void testCommit() {
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"));
@@ -50,11 +49,11 @@
});
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();
assertEquals("if i only had the time to write code", comments.get(0).getMessage());
+ session.delete(comments.get(0));
return null;
}
});
@@ -135,7 +134,6 @@
public void testSuccessfulSynchronization() {
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"));
@@ -147,13 +145,14 @@
});
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();
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();
assertEquals("hello", stringVariables.get(0).getValue());
+ session.delete(stringVariables.get(0));
return null;
}
});
Modified: jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/Db.java
===================================================================
--- jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/Db.java 2009-06-05 16:41:42 UTC (rev 5004)
+++ jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/Db.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -174,7 +174,7 @@
environmentFactory.set(TABLE_NAMES_KEY, tableNames);
}
- boolean recordsLeft = false;
+ String recordsLeft = "";
Session session = sessionFactory.openSession();
try {
for (String tableName : tableNames) {
@@ -183,7 +183,7 @@
sqlQuery.addScalar("RECORD_COUNT_", Hibernate.LONG);
Long recordCount = (Long) sqlQuery.uniqueResult();
if (recordCount>0L) {
- recordsLeft = true;
+ recordsLeft += tableName+"["+recordCount+"] ";
log.error("FIXME: JBPM-2004 "+recordCount+" records left in table "+tableName);
}
}
@@ -191,8 +191,9 @@
session.close();
}
- if (recordsLeft) {
+ if (recordsLeft.length()>0) {
clean(environmentFactory);
+ throw new RuntimeException(recordsLeft);
}
}
}
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/deploy/SuspendDeploymentTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/deploy/SuspendDeploymentTest.java 2009-06-05 16:41:42 UTC (rev 5004)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/deploy/SuspendDeploymentTest.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -107,6 +107,7 @@
processInstances = executionService
.createProcessInstanceQuery()
+ .notSuspended()
.list();
assertEquals(2, countProcessInstancesFor(processInstances, "claim"));
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-06-05 16:41:42 UTC (rev 5004)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskVariablesTest.java 2009-06-08 11:49:49 UTC (rev 5005)
@@ -40,5 +40,7 @@
assertEquals("hello", taskService.getVariable(taskDbid, "text"));
assertEquals(new Integer(5), taskService.getVariable(taskDbid, "number"));
+
+ taskService.deleteTask(taskDbid);
}
}
16 years, 10 months
JBoss JBPM SVN: r5004 - jbpm4/tags/jbpm-4.0.CR1.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-06-05 12:41:42 -0400 (Fri, 05 Jun 2009)
New Revision: 5004
Modified:
jbpm4/tags/jbpm-4.0.CR1/pom.xml
Log:
changing console version to 1.0.0.cr2
Modified: jbpm4/tags/jbpm-4.0.CR1/pom.xml
===================================================================
--- jbpm4/tags/jbpm-4.0.CR1/pom.xml 2009-06-05 15:39:31 UTC (rev 5003)
+++ jbpm4/tags/jbpm-4.0.CR1/pom.xml 2009-06-05 16:41:42 UTC (rev 5004)
@@ -47,7 +47,7 @@
<apache.ant.version>1.7.0</apache.ant.version>
<cactus.version>13-1.7.1</cactus.version>
<freemarker.version>2.3.15</freemarker.version>
- <gwt.console.version>1.0.0.CR1</gwt.console.version>
+ <gwt.console.version>1.0.0.CR2</gwt.console.version>
<jbpm.gpd.version>4.0.0.CR1</jbpm.gpd.version>
<hibernate.version>3.3.1.GA</hibernate.version>
<slf4j.version>1.5.2</slf4j.version>
16 years, 11 months
JBoss JBPM SVN: r5003 - in projects/gwt-console/tags/gwt-console-1.0.0.CR2: gui and 12 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-06-05 11:39:31 -0400 (Fri, 05 Jun 2009)
New Revision: 5003
Modified:
projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/pom.xml
projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/profiles/drools/pom.xml
projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/profiles/jbpm/pom.xml
projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/profiles/pom.xml
projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/war/pom.xml
projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/war/src/main/resources/org/jboss/bpm/console/public/Application.html
projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/workspace-api/pom.xml
projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/ConsoleConfig.java
projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/workspace-example/pom.xml
projects/gwt-console/tags/gwt-console-1.0.0.CR2/pom.xml
projects/gwt-console/tags/gwt-console-1.0.0.CR2/rpc/pom.xml
projects/gwt-console/tags/gwt-console-1.0.0.CR2/server/pom.xml
projects/gwt-console/tags/gwt-console-1.0.0.CR2/server/server-core/pom.xml
projects/gwt-console/tags/gwt-console-1.0.0.CR2/server/server-integration/pom.xml
Log:
cr2 version updates and console fix... kudo's to Joram !
Modified: projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/pom.xml
===================================================================
--- projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/pom.xml 2009-06-05 14:54:16 UTC (rev 5002)
+++ projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/pom.xml 2009-06-05 15:39:31 UTC (rev 5003)
@@ -12,7 +12,7 @@
<parent>
<groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0.CR2</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/profiles/drools/pom.xml
===================================================================
--- projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/profiles/drools/pom.xml 2009-06-05 14:54:16 UTC (rev 5002)
+++ projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/profiles/drools/pom.xml 2009-06-05 15:39:31 UTC (rev 5003)
@@ -12,7 +12,7 @@
<parent>
<groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-profiles</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0.CR2</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/profiles/jbpm/pom.xml
===================================================================
--- projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/profiles/jbpm/pom.xml 2009-06-05 14:54:16 UTC (rev 5002)
+++ projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/profiles/jbpm/pom.xml 2009-06-05 15:39:31 UTC (rev 5003)
@@ -12,7 +12,7 @@
<parent>
<groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-profiles</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0.CR2</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/profiles/pom.xml
===================================================================
--- projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/profiles/pom.xml 2009-06-05 14:54:16 UTC (rev 5002)
+++ projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/profiles/pom.xml 2009-06-05 15:39:31 UTC (rev 5003)
@@ -13,7 +13,7 @@
<parent>
<groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-guimodule</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0.CR2</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/war/pom.xml
===================================================================
--- projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/war/pom.xml 2009-06-05 14:54:16 UTC (rev 5002)
+++ projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/war/pom.xml 2009-06-05 15:39:31 UTC (rev 5003)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-guimodule</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0.CR2</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/war/src/main/resources/org/jboss/bpm/console/public/Application.html
===================================================================
--- projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/war/src/main/resources/org/jboss/bpm/console/public/Application.html 2009-06-05 14:54:16 UTC (rev 5002)
+++ projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/war/src/main/resources/org/jboss/bpm/console/public/Application.html 2009-06-05 15:39:31 UTC (rev 5003)
@@ -1,63 +1,73 @@
-<html>
-<head>
- <title>GWT Console Application</title>
-
- <!-- BPM console configuration -->
- <script type="text/javascript" src="console.config.js"/>
-
- <!-- -->
- <!-- This script loads your compiled module. -->
- <!-- If you add any GWT meta tags, they must -->
- <!-- be added before this line. -->
- <!-- -->
- <script language='javascript' src='org.jboss.bpm.console.Application.nocache.js'/>
-
- <link rel="stylesheet" href="console.css" type="text/css">
-
- <style type="text/css">
- html, body { height: 100%; overflow: hidden; margin: 0; padding: 0; }
- #splash {
- background:#ffffff;
- cursor: wait;
- position:
- absolute; top: 0; left: 0;
- z-index:1000;
- }
- .bpm-loader {
- background-image: url('images/loading_lite.gif');
- background-repeat:no-repeat;
- height: 24px; width: 130px;
- padding-left:26px;
- padding-top:8px;
- font-family: Arial, sans-serif;
- font-size: 10px;
- font-weight: bold;
- color: #777;
- cursor: wait;
- }
- </style>
-</head>
-
-<!-- -->
-<!-- The body can have arbitrary html, or -->
-<!-- you can leave the body empty if you want -->
-<!-- to create a completely dynamic ui -->
-<!-- -->
-<body>
-
-<!-- OPTIONAL: include this if you want history support -->
-<!--iframe src="javascript:''" id="__gwt_historyFrame" style="width: 0; height: 0; border: 0"></iframe-->
-
-<div id="splash" style="height:100%;width:100%;">
- <table width="100%" height="100%" >
- <tr>
- <td width="100%" height="100%" align="center" valign="middle">
- <div id="ui_loading" class="bpm-loader" style="display:none;z-index:1001;" alttext="Error">Creating Workspace ...</div>
- <div id="splash_loading" class="bpm-loader" alttext="Error">Loading ...</div>
- </td>
- </tr>
- </table>
-</div>
-
-</body>
-</html>
+<html>
+<head>
+ <title>GWT Console Application</title>
+
+ <!-- BPM console configuration -->
+ <script type="text/javascript">
+ var consoleConfig = {
+ consoleServerUrl: "http://localhost:8080/gwt-console-server",
+ reportServerUrl: "http://localhost:8080/report-server",
+ overviewReportFile:"process_activity.rptdesign",
+ definitionReportFile:"definition_report.rptdesign",
+ instanceReportFile:"instance_report.rptdesign"
+ };
+ </script>
+
+ <!-- -->
+ <!-- This script loads your compiled module. -->
+ <!-- If you add any GWT meta tags, they must -->
+ <!-- be added before this line. -->
+ <!-- -->
+ <script language='javascript' src='org.jboss.bpm.console.Application.nocache.js'>
+
+ </script>
+
+ <link rel="stylesheet" href="console.css" type="text/css">
+
+ <style type="text/css">
+ html, body { height: 100%; overflow: hidden; margin: 0; padding: 0; }
+ #splash {
+ background:#ffffff;
+ cursor: wait;
+ position:
+ absolute; top: 0; left: 0;
+ z-index:1000;
+ }
+ .bpm-loader {
+ background-image: url('images/loading_lite.gif');
+ background-repeat:no-repeat;
+ height: 24px; width: 130px;
+ padding-left:26px;
+ padding-top:8px;
+ font-family: Arial, sans-serif;
+ font-size: 10px;
+ font-weight: bold;
+ color: #777;
+ cursor: wait;
+ }
+ </style>
+</head>
+
+<!-- -->
+<!-- The body can have arbitrary html, or -->
+<!-- you can leave the body empty if you want -->
+<!-- to create a completely dynamic ui -->
+<!-- -->
+<body>
+
+<!-- OPTIONAL: include this if you want history support -->
+<!--iframe src="javascript:''" id="__gwt_historyFrame" style="width: 0; height: 0; border: 0"></iframe-->
+
+<div id="splash" style="height:100%;width:100%;">
+ <table width="100%" height="100%" >
+ <tr>
+ <td width="100%" height="100%" align="center" valign="middle">
+ <div id="ui_loading" class="bpm-loader" style="display:none;z-index:1001;" alttext="Error">Creating Workspace ...</div>
+ <div id="splash_loading" class="bpm-loader" alttext="Error">Loading ...</div>
+ </td>
+ </tr>
+ </table>
+</div>
+
+</body>
+</html>
Modified: projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/workspace-api/pom.xml
===================================================================
--- projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/workspace-api/pom.xml 2009-06-05 14:54:16 UTC (rev 5002)
+++ projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/workspace-api/pom.xml 2009-06-05 15:39:31 UTC (rev 5003)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-guimodule</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0.CR2</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/ConsoleConfig.java
===================================================================
--- projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/ConsoleConfig.java 2009-06-05 14:54:16 UTC (rev 5002)
+++ projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/ConsoleConfig.java 2009-06-05 15:39:31 UTC (rev 5003)
@@ -1,126 +1,139 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.bpm.console.client;
-
-import com.google.gwt.i18n.client.Dictionary;
-
-/**
- * Initialize console config from host page (<code>Application.html</code>) variable:
- * <pre>
- * var consoleConfig = {
- * consoleServerUrl: "http://localhost:8080/gwt-console-server",
- * reportServerUrl: "http://localhost:8080/report",
- * [...]
- * };
- * </pre>
- *
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- * @see com.google.gwt.i18n.client.Dictionary
- */
-public class ConsoleConfig
-{
- private String serverWebContext;
-
- private String overallReportFile;
- private String processSummaryReportFile;
- private String instanceSummaryReportFile;
-
- private String profileName;
- private String logo;
-
- private String consoleServerUrl;
-
- public ConsoleConfig()
- {
- Dictionary theme = Dictionary.getDictionary("consoleConfig");
- profileName = theme.get("profileName");
- logo = theme.get("logo");
-
- serverWebContext = theme.get("serverWebContext");
-
- overallReportFile = theme.get("overallReportFile");
- processSummaryReportFile = theme.get("processSummaryReportFile");
- instanceSummaryReportFile = theme.get("instanceSummaryReportFile");
- }
-
- public String getProfileName()
- {
- return profileName;
- }
-
- public String getLogo()
- {
- return logo;
- }
-
- public String getConsoleServerUrl()
- {
- if(consoleServerUrl ==null)
- throw new RuntimeException("Config not properly setup: console server URL is null");
- return consoleServerUrl;
- }
-
- public void setConsoleServerUrl(String consoleServerUrl)
- {
- this.consoleServerUrl = consoleServerUrl;
- }
-
- public String getServerWebContext()
- {
- return serverWebContext;
- }
-
- public void setServerWebContext(String serverWebContext)
- {
- this.serverWebContext = serverWebContext;
- }
-
- public String getOverallReportFile()
- {
- return overallReportFile;
- }
-
- public void setOverallReportFile(String overallReportFile)
- {
- this.overallReportFile = overallReportFile;
- }
-
- public String getProcessSummaryReportFile()
- {
- return processSummaryReportFile;
- }
-
- public void setProcessSummaryReportFile(String processSummaryReportFile)
- {
- this.processSummaryReportFile = processSummaryReportFile;
- }
-
- public String getInstanceSummaryReportFile()
- {
- return instanceSummaryReportFile;
- }
-
- public void setInstanceSummaryReportFile(String instanceSummaryReportFile)
- {
- this.instanceSummaryReportFile = instanceSummaryReportFile;
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client;
+
+import com.google.gwt.i18n.client.Dictionary;
+
+/**
+ * Initialize console config from host page (<code>Application.html</code>) variable:
+ * <pre>
+ * var consoleConfig = {
+ * consoleServerUrl: "http://localhost:8080/gwt-console-server",
+ * reportServerUrl: "http://localhost:8080/report",
+ * [...]
+ * };
+ * </pre>
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ * @see com.google.gwt.i18n.client.Dictionary
+ */
+public class ConsoleConfig
+{
+ private String serverWebContext;
+
+ private String overallReportFile;
+ private String processSummaryReportFile;
+ private String instanceSummaryReportFile;
+
+ private String profileName;
+ private String logo;
+
+ private String consoleServerUrl;
+
+ public ConsoleConfig()
+ {
+
+ // Hotfix by jbarrez for CR1 release
+ overallReportFile = "overall_activity.rptdesign";
+ processSummaryReportFile = "instance_summary.rptdesign";
+ instanceSummaryReportFile = "instance_report.rptdesign";
+ profileName = "jBPM Console RC1";
+ logo = "jbpm_logo.png";
+ consoleServerUrl = "http://localhost:8080/gwt-console-server";
+ serverWebContext = "/gwt-console-server";
+ // end hotfix
+
+ /* Original
+ Dictionary theme = Dictionary.getDictionary("consoleConfig");
+ profileName = theme.get("profileName");
+ logo = theme.get("logo");
+
+ serverWebContext = theme.get("serverWebContext");
+
+ overallReportFile = theme.get("overallReportFile");
+ processSummaryReportFile = theme.get("processSummaryReportFile");
+ instanceSummaryReportFile = theme.get("instanceSummaryReportFile");
+ */
+ }
+
+ public String getProfileName()
+ {
+ return profileName;
+ }
+
+ public String getLogo()
+ {
+ return logo;
+ }
+
+ public String getConsoleServerUrl()
+ {
+ if(consoleServerUrl ==null)
+ throw new RuntimeException("Config not properly setup: console server URL is null");
+ return consoleServerUrl;
+ }
+
+ public void setConsoleServerUrl(String consoleServerUrl)
+ {
+ this.consoleServerUrl = consoleServerUrl;
+ }
+
+ public String getServerWebContext()
+ {
+ return serverWebContext;
+ }
+
+ public void setServerWebContext(String serverWebContext)
+ {
+ this.serverWebContext = serverWebContext;
+ }
+
+ public String getOverallReportFile()
+ {
+ return overallReportFile;
+ }
+
+ public void setOverallReportFile(String overallReportFile)
+ {
+ this.overallReportFile = overallReportFile;
+ }
+
+ public String getProcessSummaryReportFile()
+ {
+ return processSummaryReportFile;
+ }
+
+ public void setProcessSummaryReportFile(String processSummaryReportFile)
+ {
+ this.processSummaryReportFile = processSummaryReportFile;
+ }
+
+ public String getInstanceSummaryReportFile()
+ {
+ return instanceSummaryReportFile;
+ }
+
+ public void setInstanceSummaryReportFile(String instanceSummaryReportFile)
+ {
+ this.instanceSummaryReportFile = instanceSummaryReportFile;
+ }
+}
Modified: projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/workspace-example/pom.xml
===================================================================
--- projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/workspace-example/pom.xml 2009-06-05 14:54:16 UTC (rev 5002)
+++ projects/gwt-console/tags/gwt-console-1.0.0.CR2/gui/workspace-example/pom.xml 2009-06-05 15:39:31 UTC (rev 5003)
@@ -11,12 +11,12 @@
<parent>
<groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-guimodule</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0.CR2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<properties>
- <gwt-console.version>1.0.0-SNAPSHOT</gwt-console.version>
+ <gwt-console.version>1.0.0.CR2</gwt-console.version>
<gwt-mosaic.version>0.1.9</gwt-mosaic.version>
</properties>
Modified: projects/gwt-console/tags/gwt-console-1.0.0.CR2/pom.xml
===================================================================
--- projects/gwt-console/tags/gwt-console-1.0.0.CR2/pom.xml 2009-06-05 14:54:16 UTC (rev 5002)
+++ projects/gwt-console/tags/gwt-console-1.0.0.CR2/pom.xml 2009-06-05 15:39:31 UTC (rev 5003)
@@ -4,7 +4,7 @@
<name>JBoss BPM - GWT Console</name>
<groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0.CR2</version>
<packaging>pom</packaging>
<!-- Parent -->
@@ -34,7 +34,7 @@
<mvc4g.version>1.0.0-jboss</mvc4g.version>
<resteasy.version>1.0.2.GA</resteasy.version>
<stax-api.version>1.0-2</stax-api.version>
- <report.server.version>1.0.0-SNAPSHOT</report.server.version>
+ <report.server.version>1.0.0.CR2</report.server.version>
</properties>
<modules>
Modified: projects/gwt-console/tags/gwt-console-1.0.0.CR2/rpc/pom.xml
===================================================================
--- projects/gwt-console/tags/gwt-console-1.0.0.CR2/rpc/pom.xml 2009-06-05 14:54:16 UTC (rev 5002)
+++ projects/gwt-console/tags/gwt-console-1.0.0.CR2/rpc/pom.xml 2009-06-05 15:39:31 UTC (rev 5003)
@@ -12,7 +12,7 @@
<parent>
<groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0.CR2</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: projects/gwt-console/tags/gwt-console-1.0.0.CR2/server/pom.xml
===================================================================
--- projects/gwt-console/tags/gwt-console-1.0.0.CR2/server/pom.xml 2009-06-05 14:54:16 UTC (rev 5002)
+++ projects/gwt-console/tags/gwt-console-1.0.0.CR2/server/pom.xml 2009-06-05 15:39:31 UTC (rev 5003)
@@ -12,7 +12,7 @@
<parent>
<groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0.CR2</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: projects/gwt-console/tags/gwt-console-1.0.0.CR2/server/server-core/pom.xml
===================================================================
--- projects/gwt-console/tags/gwt-console-1.0.0.CR2/server/server-core/pom.xml 2009-06-05 14:54:16 UTC (rev 5002)
+++ projects/gwt-console/tags/gwt-console-1.0.0.CR2/server/server-core/pom.xml 2009-06-05 15:39:31 UTC (rev 5003)
@@ -10,13 +10,13 @@
<parent>
<groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-servermodule</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0.CR2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<!-- Properties -->
<properties>
- <report.server.version>1.0.0-SNAPSHOT</report.server.version>
+ <report.server.version>1.0.0.CR1</report.server.version>
<json-lib.version>2.2.3</json-lib.version>
</properties>
Modified: projects/gwt-console/tags/gwt-console-1.0.0.CR2/server/server-integration/pom.xml
===================================================================
--- projects/gwt-console/tags/gwt-console-1.0.0.CR2/server/server-integration/pom.xml 2009-06-05 14:54:16 UTC (rev 5002)
+++ projects/gwt-console/tags/gwt-console-1.0.0.CR2/server/server-integration/pom.xml 2009-06-05 15:39:31 UTC (rev 5003)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-servermodule</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0.CR2</version>
<relativePath>../pom.xml</relativePath>
</parent>
16 years, 11 months
JBoss JBPM SVN: r5001 - in jbpm4/trunk: modules/distro/src/main/files/jboss and 1 other directories.
by do-not-reply@jboss.org
Author: jeff.yuchang
Date: 2009-06-05 06:16:01 -0400 (Fri, 05 Jun 2009)
New Revision: 5001
Modified:
jbpm4/trunk/modules/distro/src/main/files/jboss/build.xml
jbpm4/trunk/pom.xml
jbpm4/trunk/qa/build.xml
Log:
* [JBPM-2172] Update the jboss idm version to 1.0.0.Alpha8
Modified: jbpm4/trunk/modules/distro/src/main/files/jboss/build.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/jboss/build.xml 2009-06-05 09:45:45 UTC (rev 5000)
+++ jbpm4/trunk/modules/distro/src/main/files/jboss/build.xml 2009-06-05 10:16:01 UTC (rev 5001)
@@ -23,10 +23,10 @@
<property name="jboss.server.config.dir" value="${jboss.home}/server/${jboss.server.configuration}" />
<property name="jboss.server.data.dir" value="${jboss.home}/server/${jboss.server.configuration}/data" />
- <property name="jbossidm.version" value="1.0.0-SNAPSHOT" />
+ <property name="jbossidm.version" value="1.0.0.Alpha8" />
<property name="jbossidm.home" value="${jbpm.parent.dir}/jbossidm-${jbossidm.version}" />
<!-- for SNAPSHOT temporarily -->
- <property name="jbossidm.distro.url" value="http://snapshots.jboss.org/maven2/org/jboss/identity/idm/idm-assembly/1.0..." />
+ <property name="jbossidm.distro.url" value="http://repository.jboss.com/maven2/org/jboss/identity/idm/jbossidm/${jbos..." />
<property name="jbossidm.distro.path" value="${jbpm.parent.dir}/idm-assembly-${jbossidm.version}.zip" />
<!-- JDBC PROPERTIES -->
Modified: jbpm4/trunk/pom.xml
===================================================================
--- jbpm4/trunk/pom.xml 2009-06-05 09:45:45 UTC (rev 5000)
+++ jbpm4/trunk/pom.xml 2009-06-05 10:16:01 UTC (rev 5001)
@@ -53,7 +53,7 @@
<slf4j.version>1.5.2</slf4j.version>
<hsqldb.version>1.8.0.7</hsqldb.version>
<izpack.version>4.2.1</izpack.version>
- <jboss.identity.version>1.0.0-SNAPSHOT</jboss.identity.version>
+ <jboss.identity.version>1.0.0.Alpha8</jboss.identity.version>
<jboss.j2ee.version>4.2.2.GA</jboss.j2ee.version>
<jboss.client.version>5.0.1.GA</jboss.client.version>
<jsr233.version>2.0.5</jsr233.version>
Modified: jbpm4/trunk/qa/build.xml
===================================================================
--- jbpm4/trunk/qa/build.xml 2009-06-05 09:45:45 UTC (rev 5000)
+++ jbpm4/trunk/qa/build.xml 2009-06-05 10:16:01 UTC (rev 5001)
@@ -24,7 +24,7 @@
<property name="jbpm.distro.path" value="${jbpm.distro.dir}/jbpm-${jbpm.version}.zip" />
<property name="jbpm.home" value="${workspace}/jbpm-${jbpm.version}" />
- <property name="jbossidm.version" value="1.0.0-SNAPSHOT" />
+ <property name="jbossidm.version" value="1.0.0.Alpha8" />
<property name="jbossidm.home" value="${jbpm.parent.dir}/jbossidm-${jbossidm.version}" />
<!-- ### LOG PROPERTIES ################################################# -->
16 years, 11 months
JBoss JBPM SVN: r5000 - jbpm4/trunk/qa.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-06-05 05:45:45 -0400 (Fri, 05 Jun 2009)
New Revision: 5000
Modified:
jbpm4/trunk/qa/test.demo.setup.bat
Log:
added beep at end of test.demo.setup.bat
Modified: jbpm4/trunk/qa/test.demo.setup.bat
===================================================================
--- jbpm4/trunk/qa/test.demo.setup.bat 2009-06-05 08:23:28 UTC (rev 4999)
+++ jbpm4/trunk/qa/test.demo.setup.bat 2009-06-05 09:45:45 UTC (rev 5000)
@@ -2,3 +2,5 @@
cmd /C mvn -U -Pdistro 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
+
+echo
\ No newline at end of file
16 years, 11 months
JBoss JBPM SVN: r4999 - in jbpm4/branches/jimma/modules/migration/src: main/java/org/jbpm/jpdl/internal/convert/util and 2 other directories.
by do-not-reply@jboss.org
Author: jim.ma
Date: 2009-06-05 04:23:28 -0400 (Fri, 05 Jun 2009)
New Revision: 4999
Added:
jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/MailNodeConverter.java
jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/SuperStateConverter.java
jbpm4/branches/jimma/modules/migration/src/test/resources/superstate-mail.xml
Modified:
jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/JpdlConverter.java
jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/EventActionConverter.java
jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/NodeConverter.java
jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/StartStateConverter.java
jbpm4/branches/jimma/modules/migration/src/test/java/org/jbpm/jpdl/internal/convert/JpdlConverterTest.java
Log:
Added warning for SuperState, mail-node and mailAction conversion
Modified: jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/JpdlConverter.java
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/JpdlConverter.java 2009-06-05 08:22:19 UTC (rev 4998)
+++ jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/JpdlConverter.java 2009-06-05 08:23:28 UTC (rev 4999)
@@ -42,9 +42,11 @@
import org.jbpm.graph.def.Event;
import org.jbpm.graph.def.Node;
import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.def.SuperState;
import org.jbpm.graph.node.EndState;
import org.jbpm.graph.node.Fork;
import org.jbpm.graph.node.Join;
+import org.jbpm.graph.node.MailNode;
import org.jbpm.graph.node.StartState;
import org.jbpm.graph.node.State;
import org.jbpm.graph.node.TaskNode;
@@ -54,9 +56,11 @@
import org.jbpm.jpdl.internal.convert.util.ExceptionHandlersConverter;
import org.jbpm.jpdl.internal.convert.util.ForkConverter;
import org.jbpm.jpdl.internal.convert.util.JoinConverter;
+import org.jbpm.jpdl.internal.convert.util.MailNodeConverter;
import org.jbpm.jpdl.internal.convert.util.NodeConverter;
import org.jbpm.jpdl.internal.convert.util.StartStateConverter;
import org.jbpm.jpdl.internal.convert.util.StateConverter;
+import org.jbpm.jpdl.internal.convert.util.SuperStateConverter;
import org.jbpm.jpdl.internal.convert.util.SwimlaneConverter;
import org.jbpm.jpdl.internal.convert.util.TaskNodeConverter;
import org.jbpm.jpdl.xml.JpdlXmlReader;
@@ -97,8 +101,18 @@
process.getSwimlaneAndOnAndTimer().add(item);
}
}
-
+
for (Node node : def.getNodes()) {
+ if (node instanceof SuperState) {
+ SuperState superState = (SuperState)node;
+ SuperStateConverter.run(superState, this);
+ continue;
+ }
+
+ if (node instanceof MailNode) {
+ MailNode mailNode = (MailNode)node;
+ MailNodeConverter.run(mailNode, this);
+ }
Node.NodeType nodeType = node.getNodeType();
switch(node.getNodeType()) {
case StartState :
Modified: jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/EventActionConverter.java
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/EventActionConverter.java 2009-06-05 08:22:19 UTC (rev 4998)
+++ jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/EventActionConverter.java 2009-06-05 08:23:28 UTC (rev 4999)
@@ -26,6 +26,7 @@
import javax.xml.bind.JAXBElement;
import org.jbpm.context.def.VariableAccess;
+import org.jbpm.graph.action.MailAction;
import org.jbpm.graph.action.Script;
import org.jbpm.graph.def.Action;
import org.jbpm.instantiation.Delegation;
@@ -36,6 +37,11 @@
public class EventActionConverter {
public static JAXBElement<?> run(Action action, ProblemCollector collector) {
JAXBElement<?> result = null;
+
+ if (action instanceof MailAction) {
+ collector.addWarning("Unsupported MailAction conversion in node [" + action.getName() + "]");
+ }
+
if (action instanceof Script) {
ScriptType scriptType = new ScriptType();
Script script = (Script) action;
@@ -52,7 +58,11 @@
result = new ObjectFactory().createOnScript(scriptType);
} else {
if (action.getActionExpression() != null) {
- //TODO: handle action expression
+ ScriptType scriptType = new ScriptType();
+ scriptType.setExpr(action.getActionExpression());
+ scriptType.setLang("juel");
+ result = new ObjectFactory().createOnScript(scriptType);
+
}
if (action.getActionDelegation() != null) {
Delegation delegation = action.getActionDelegation();
Added: jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/MailNodeConverter.java
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/MailNodeConverter.java (rev 0)
+++ jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/MailNodeConverter.java 2009-06-05 08:23:28 UTC (rev 4999)
@@ -0,0 +1,31 @@
+/*
+ * 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.jpdl.internal.convert.util;
+
+import org.jbpm.graph.node.MailNode;
+import org.jbpm.jpdl.internal.convert.ProblemCollector;
+
+public class MailNodeConverter {
+ public static void run(MailNode node, ProblemCollector collector) {
+ collector.addWarning("Unsupported mailNode conversion in node [" + node.getName() + "]");
+ }
+}
Modified: jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/NodeConverter.java
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/NodeConverter.java 2009-06-05 08:22:19 UTC (rev 4998)
+++ jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/NodeConverter.java 2009-06-05 08:23:28 UTC (rev 4999)
@@ -55,18 +55,24 @@
return result;
}
if (action instanceof Action) {
- Process.Java result = new Process.Java();
- result.setName(nodeName);
if (action.getActionExpression() != null) {
- //REVISIT how to map expression
+ Process.Script result = new Process.Script();
+ result.setLang("juel");
+ result.setExpr(action.getActionExpression());
+ result.setName(action.getName());
+ result.getOn().addAll(ons);
+ return result;
}
if (action.getActionDelegation() != null) {
+ Process.Java result = new Process.Java();
+ result.setName(nodeName);
result.setClazz(action.getActionDelegation().getClassName());
result.setMethod("execute");
+ result.getOn().addAll(ons);
+ return result;
}
+
- result.getOn().addAll(ons);
- return result;
}
//TODO:convert other action types:create-timer,cancel-timer, mail
//process exceptionHandler
Modified: jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/StartStateConverter.java
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/StartStateConverter.java 2009-06-05 08:22:19 UTC (rev 4998)
+++ jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/StartStateConverter.java 2009-06-05 08:23:28 UTC (rev 4999)
@@ -47,7 +47,7 @@
TaskMgmtDefinition taskMgmtDef = jpdl3start.getProcessDefinition().getTaskMgmtDefinition();
if (taskMgmtDef != null) {
if (taskMgmtDef.getStartTask() != null) {
- collector.addWarning("Unsupported task conersion in StartState [" + jpdl3start.getName() + "]");
+ collector.addWarning("Unsupported task conversion in StartState [" + jpdl3start.getName() + "]");
}
}
List<On> ons = EventsConverter.run(jpdl3start.getEvents(), collector);
Added: jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/SuperStateConverter.java
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/SuperStateConverter.java (rev 0)
+++ jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/util/SuperStateConverter.java 2009-06-05 08:23:28 UTC (rev 4999)
@@ -0,0 +1,33 @@
+/*
+ * 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.jpdl.internal.convert.util;
+
+import org.jbpm.graph.def.SuperState;
+import org.jbpm.jpdl.internal.convert.ProblemCollector;
+
+public class SuperStateConverter {
+ public static void run(SuperState node, ProblemCollector collector) {
+ collector.addWarning("Unsupported superstate conversion in node [" + node.getName() + "]");
+
+ }
+
+}
Modified: jbpm4/branches/jimma/modules/migration/src/test/java/org/jbpm/jpdl/internal/convert/JpdlConverterTest.java
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/test/java/org/jbpm/jpdl/internal/convert/JpdlConverterTest.java 2009-06-05 08:22:19 UTC (rev 4998)
+++ jbpm4/branches/jimma/modules/migration/src/test/java/org/jbpm/jpdl/internal/convert/JpdlConverterTest.java 2009-06-05 08:23:28 UTC (rev 4999)
@@ -56,6 +56,20 @@
testConvert("timer.xml");
}
+
+
+ @Test
+ public void testWarning() throws Exception {
+ URL url = getClass().getClassLoader().getResource("superstate-mail.xml");
+ //Convert to process file to jpdl4
+ JpdlConverter converter = new JpdlConverter();
+ org.jbpm.jpdl4.model.Process process = converter.run(url);
+ Assert.assertNotNull(process);
+ Assert.assertEquals(converter.getProblems().size(), 3);
+
+ }
+
+
public void testConvert(String resourcefile) throws Exception {
URL url = getClass().getClassLoader().getResource(resourcefile);
//Convert to process file to jpdl4
Added: jbpm4/branches/jimma/modules/migration/src/test/resources/superstate-mail.xml
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/test/resources/superstate-mail.xml (rev 0)
+++ jbpm4/branches/jimma/modules/migration/src/test/resources/superstate-mail.xml 2009-06-05 08:23:28 UTC (rev 4999)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process-definition
+ xmlns="urn:jbpm.org:jpdl-3.2"
+ name="simple">
+ <start-state name="start">
+ <transition name="to_state" to="phase one">
+ <action name="action" class="com.sample.action.MessageActionHandler">
+ <message>Going to the first state!</message>
+ </action>
+ </transition>
+ </start-state>
+
+ <super-state name="phase one">
+ <node name="node1"/>
+ <transition to="mail-node"/>
+ </super-state>
+
+ <mail-node name="mail-node" to="simple">
+ <subject>test</subject>
+ <text>test</text>
+ <transition to="first"/>
+ </mail-node>
+
+ <state name="first">
+ <event type="transistion">
+ <mail name="test"/>
+ </event>
+ <transition name="to_end" to="end">
+ <action name="action" class="com.sample.action.MessageActionHandler">
+ <message>About to finish!</message>
+ </action>
+ </transition>
+ </state>
+ <end-state name="end"></end-state>
+</process-definition>
16 years, 11 months
JBoss JBPM SVN: r4998 - jbpm4/tags/jbpm-4.0.CR1/modules/distro/src/main/files.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-06-05 04:22:19 -0400 (Fri, 05 Jun 2009)
New Revision: 4998
Modified:
jbpm4/tags/jbpm-4.0.CR1/modules/distro/src/main/files/readme.html
Log:
added console warning to the known issues in the readme
Modified: jbpm4/tags/jbpm-4.0.CR1/modules/distro/src/main/files/readme.html
===================================================================
--- jbpm4/tags/jbpm-4.0.CR1/modules/distro/src/main/files/readme.html 2009-06-05 07:47:52 UTC (rev 4997)
+++ jbpm4/tags/jbpm-4.0.CR1/modules/distro/src/main/files/readme.html 2009-06-05 08:22:19 UTC (rev 4998)
@@ -39,6 +39,7 @@
<h2 style="color:red;">Known Limitations</h2>
<ul>
+ <li>In the Web Console, access to executions might cause crashes of the console.</li>
<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>
<li>In the Graphical Process Designer, the wire object type configurations are limited to strings</li>
16 years, 11 months
JBoss JBPM SVN: r4997 - jbpm4/tags/jbpm-4.0.CR1/modules/devguide/src/main/docbook/en/modules.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-06-05 03:47:52 -0400 (Fri, 05 Jun 2009)
New Revision: 4997
Modified:
jbpm4/tags/jbpm-4.0.CR1/modules/devguide/src/main/docbook/en/modules/ch01-Introduction.xml
Log:
added warning in the dev guide that it is not up to date
Modified: jbpm4/tags/jbpm-4.0.CR1/modules/devguide/src/main/docbook/en/modules/ch01-Introduction.xml
===================================================================
--- jbpm4/tags/jbpm-4.0.CR1/modules/devguide/src/main/docbook/en/modules/ch01-Introduction.xml 2009-06-04 19:48:48 UTC (rev 4996)
+++ jbpm4/tags/jbpm-4.0.CR1/modules/devguide/src/main/docbook/en/modules/ch01-Introduction.xml 2009-06-05 07:47:52 UTC (rev 4997)
@@ -2,6 +2,14 @@
<title>Introduction</title>
<section>
+ <title>Known issue</title>
+ <para>Some parts of this developers guide is out of date. Mainly the last 3 chapters
+ about persistence, logging and history. In the next release we'll remove the sections
+ that are out of date. See <ulink url="https://jira.jboss.org/jira/browse/JBPM-2306">JBPM-2306</ulink>.
+ </para>
+ </section>
+
+ <section>
<title>Target audience</title>
<para>This developers guide is intended for experienced developers that
want to get the full flexibility out of jBPM. The features described in this
16 years, 11 months
JBoss JBPM SVN: r4996 - projects/gwt-console/tags.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-06-04 15:48:48 -0400 (Thu, 04 Jun 2009)
New Revision: 4996
Added:
projects/gwt-console/tags/gwt-console-1.0.0.CR2/
Log:
Copied CR1 tag to fresh CR2 tag
Copied: projects/gwt-console/tags/gwt-console-1.0.0.CR2 (from rev 4995, projects/gwt-console/trunk)
16 years, 11 months
JBoss JBPM SVN: r4995 - jbpm4/trunk/modules/distro/src/main/files/examples.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-06-04 11:17:33 -0400 (Thu, 04 Jun 2009)
New Revision: 4995
Modified:
jbpm4/trunk/modules/distro/src/main/files/examples/build.xml
Log:
updates :-)
Modified: jbpm4/trunk/modules/distro/src/main/files/examples/build.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/examples/build.xml 2009-06-04 14:18:40 UTC (rev 4994)
+++ jbpm4/trunk/modules/distro/src/main/files/examples/build.xml 2009-06-04 15:17:33 UTC (rev 4995)
@@ -39,7 +39,7 @@
<!-- ### DEPLOY EXAMPLE BUSINESS ARCHIVES ############################### -->
<target name="deploy.examples"
description="deploys all the example processes"
- depends="jbpm.libs.path">
+ depends="jbpm.libs.path, examples.jar">
<mkdir dir="${jbpm.home}/examples/target" />
<copy file="${jbpm.home}/db/hibernate.cfg/${database}.hibernate.cfg.xml"
tofile="${jbpm.home}/examples/target/classes/jbpm.hibernate.cfg.xml"
16 years, 11 months