JBoss JBPM SVN: r3899 - jbpm4/trunk/hudson.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-02-17 05:12:50 -0500 (Tue, 17 Feb 2009)
New Revision: 3899
Modified:
jbpm4/trunk/hudson/profiles.xml.local.qa
Log:
Update default QA env settings
Modified: jbpm4/trunk/hudson/profiles.xml.local.qa
===================================================================
--- jbpm4/trunk/hudson/profiles.xml.local.qa 2009-02-17 09:22:19 UTC (rev 3898)
+++ jbpm4/trunk/hudson/profiles.xml.local.qa 2009-02-17 10:12:50 UTC (rev 3899)
@@ -29,8 +29,8 @@
<jdbc.hsql.server>localhost</jdbc.hsql.server>
<jdbc.hsql.port>3306</jdbc.hsql.port>
- <jdbc.hsql.database>jbpmtest</jdbc.hsql.database>
- <jdbc.hsql.url>jdbc:hsqldb:mem:.</jdbc.hsql.url>
+ <jdbc.hsql.database>jbpm4</jdbc.hsql.database>
+ <jdbc.hsql.url>jdbc:hsqldb:file:${user.home}/jbpm4_database</jdbc.hsql.url>
<jdbc.hsql.username>sa</jdbc.hsql.username>
<jdbc.hsql.password></jdbc.hsql.password>
@@ -62,7 +62,8 @@
<jdbc.oracle.database>jbpm4</jdbc.oracle.database>
<jdbc.oracle.username>jbpmtest</jdbc.oracle.username>
<jdbc.oracle.password></jdbc.oracle.password>
- <jdbc.oracle.url>jdbc:oracle:thin:${jdbc.oracle.username}/${jdbc.oracle.password}@${jdbc.oracle.server}:${jdbc.oracle.port}:${jdbc.oracle.database}</jdbc.oracle.url>
+ <jdbc.oracle.url>jdbc:oracle:thin:${jdbc.oracle.username}/${jdbc.oracle.password}@${jdbc.oracle.server}:${jdbc.oracle.port}:${jdbc.oracle.database}</jdbc.oracle.url>
+
</properties>
</profile>
17 years, 2 months
JBoss JBPM SVN: r3898 - jbpm4/trunk/hudson/hudson-home.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-02-17 04:22:19 -0500 (Tue, 17 Feb 2009)
New Revision: 3898
Modified:
jbpm4/trunk/hudson/hudson-home/hudson.tasks.Mailer.xml
Log:
Fix mailer settings
Modified: jbpm4/trunk/hudson/hudson-home/hudson.tasks.Mailer.xml
===================================================================
--- jbpm4/trunk/hudson/hudson-home/hudson.tasks.Mailer.xml 2009-02-17 09:12:38 UTC (rev 3897)
+++ jbpm4/trunk/hudson/hudson-home/hudson.tasks.Mailer.xml 2009-02-17 09:22:19 UTC (rev 3898)
@@ -1,7 +1,8 @@
<?xml version='1.0' encoding='UTF-8'?>
<hudson.tasks.Mailer-DescriptorImpl>
<defaultSuffix></defaultSuffix>
- <hudsonUrl>http://localhost:8180/hudson/</hudsonUrl>
- <adminAddress>thomas.diesler(a)jboss.com</adminAddress>
- <smtpHost>localhost</smtpHost>
+ <hudsonUrl>http://@hudson.host@:@hudson.http.port@/hudson/</hudsonUrl>
+ <adminAddress>hbraun(a)jboss.com</adminAddress>
+ <smtpHost>@hudson.smtp.host@</smtpHost>
</hudson.tasks.Mailer-DescriptorImpl>
+
17 years, 2 months
JBoss JBPM SVN: r3897 - jbpm4/trunk/modules/jpdl/src/main/resources.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-02-17 04:12:38 -0500 (Tue, 17 Feb 2009)
New Revision: 3897
Modified:
jbpm4/trunk/modules/jpdl/src/main/resources/hibernate.properties.hsqldb.xml
jbpm4/trunk/modules/jpdl/src/main/resources/jbpm-hsqldb-ds.xml
Log:
Use shared hibernate data directory
Modified: jbpm4/trunk/modules/jpdl/src/main/resources/hibernate.properties.hsqldb.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/resources/hibernate.properties.hsqldb.xml 2009-02-17 09:12:15 UTC (rev 3896)
+++ jbpm4/trunk/modules/jpdl/src/main/resources/hibernate.properties.hsqldb.xml 2009-02-17 09:12:38 UTC (rev 3897)
@@ -3,9 +3,13 @@
<property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
<!-- JDBC connection properties (begin) -->
- <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
- <property name="hibernate.connection.url">jdbc:hsqldb:mem:.</property>
- <property name="hibernate.connection.username">sa</property>
- <property name="hibernate.connection.password"></property>
+ <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
+ <property name="hibernate.connection.url">${jdbc.hsql.url}</property>
+ <property name="hibernate.connection.username">${jdbc.hsql.username}</property>
+ <property name="hibernate.connection.password">${jdbc.hsql.password}</property>
<!-- JDBC connection properties (end) -->
+ <!-- Automatic schema creation (begin) -->
+ <property name="hibernate.hbm2ddl.auto">create-drop</property>
+ <!-- Automatic schema creation (end) -->
+
Modified: jbpm4/trunk/modules/jpdl/src/main/resources/jbpm-hsqldb-ds.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/resources/jbpm-hsqldb-ds.xml 2009-02-17 09:12:15 UTC (rev 3896)
+++ jbpm4/trunk/modules/jpdl/src/main/resources/jbpm-hsqldb-ds.xml 2009-02-17 09:12:38 UTC (rev 3897)
@@ -4,10 +4,15 @@
<local-tx-datasource>
<jndi-name>JbpmDS</jndi-name>
- <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}jbpmDB</connection-url>
+ <!--
+ Default AS location
+ <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}jbpm4DB</connection-url>
+ -->
+
<driver-class>org.hsqldb.jdbcDriver</driver-class>
- <user-name>sa</user-name>
- <password></password>
+ <connection-url>${jdbc.hsql.url}</connection-url>
+ <user-name>${jdbc.hsql.username}</user-name>
+ <password>${jdbc.hsql.password}</password>
<!-- connection pool parameters -->
<min-pool-size>1</min-pool-size>
17 years, 2 months
JBoss JBPM SVN: r3896 - jbpm4/trunk/modules/jpdl/src/main/resources.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-02-17 04:12:15 -0500 (Tue, 17 Feb 2009)
New Revision: 3896
Modified:
jbpm4/trunk/modules/jpdl/src/main/resources/hibernate.common.xml
Log:
Disable hbm2ddl.auto
Modified: jbpm4/trunk/modules/jpdl/src/main/resources/hibernate.common.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/resources/hibernate.common.xml 2009-02-17 07:46:30 UTC (rev 3895)
+++ jbpm4/trunk/modules/jpdl/src/main/resources/hibernate.common.xml 2009-02-17 09:12:15 UTC (rev 3896)
@@ -18,10 +18,6 @@
<!-- # common settings # -->
<!-- ################################### -->
- <!-- Automatic schema creation (begin) -->
- <property name="hibernate.hbm2ddl.auto">create</property>
- <!-- Automatic schema creation (end) -->
-
<!-- Simple memory-only cache -->
<property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
17 years, 2 months
JBoss JBPM SVN: r3895 - in jbpm3/trunk/modules/core/src: main/resources/org/jbpm/db and 1 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-02-17 02:46:30 -0500 (Tue, 17 Feb 2009)
New Revision: 3895
Removed:
jbpm3/trunk/modules/core/src/test/java/org/jbpm/db/JobSessionDbTest.java
Modified:
jbpm3/trunk/modules/core/src/main/java/org/jbpm/db/JobSession.java
jbpm3/trunk/modules/core/src/main/resources/org/jbpm/db/hibernate.queries.hbm.xml
Log:
[JBPM-2042] Rollback -r3882:3879
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/db/JobSession.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/db/JobSession.java 2009-02-16 17:22:34 UTC (rev 3894)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/db/JobSession.java 2009-02-17 07:46:30 UTC (rev 3895)
@@ -110,19 +110,6 @@
+ monitoredJobs, e);
}
}
-
- /**
- * get all failed jobs. Failed job have a retry count
- * of 0 and the occured exception set.
- */
- public List<Job> findFailedJobs() {
- try {
- Query query = session.getNamedQuery("JobSession.findFailedJobs");
- return CollectionUtil.checkList(query.list(), Job.class);
- } catch (Exception e) {
- throw new JbpmException("couldn't find failed jobs", e);
- }
- }
public void saveJob(Job job) {
try {
Modified: jbpm3/trunk/modules/core/src/main/resources/org/jbpm/db/hibernate.queries.hbm.xml
===================================================================
--- jbpm3/trunk/modules/core/src/main/resources/org/jbpm/db/hibernate.queries.hbm.xml 2009-02-16 17:22:34 UTC (rev 3894)
+++ jbpm3/trunk/modules/core/src/main/resources/org/jbpm/db/hibernate.queries.hbm.xml 2009-02-17 07:46:30 UTC (rev 3895)
@@ -377,14 +377,6 @@
where job.token = :token
]]>
</query>
-
- <query name="JobSession.findFailedJobs">
- <![CDATA[
- select job
- from org.jbpm.job.Job as job
- where job.retries=0 and job.exception is not null
- ]]>
- </query>
<query name="JobSession.findJobsWithOverdueLockTime">
<![CDATA[
Deleted: jbpm3/trunk/modules/core/src/test/java/org/jbpm/db/JobSessionDbTest.java
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/db/JobSessionDbTest.java 2009-02-16 17:22:34 UTC (rev 3894)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/db/JobSessionDbTest.java 2009-02-17 07:46:30 UTC (rev 3895)
@@ -1,112 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.db;
-
-import java.util.List;
-
-import org.hibernate.StaleObjectStateException;
-import org.jbpm.graph.def.ActionHandler;
-import org.jbpm.graph.def.ProcessDefinition;
-import org.jbpm.graph.exe.ExecutionContext;
-import org.jbpm.graph.exe.ProcessInstance;
-import org.jbpm.job.ExecuteNodeJob;
-import org.jbpm.job.Job;
-
-public class JobSessionDbTest extends AbstractDbTestCase {
-
- public static final int timeout = 60000;
-
- public static class FailingAction implements ActionHandler {
- public void execute(ExecutionContext executionContext) throws Exception
- {
- throw new RuntimeException("TEST-EXCEPTION");
- }
- }
-
- /**
- * Test case which generates a {@link Job} ({@link ExecuteNodeJob} via async=true)
- * which causes an excpetion. Afterwards it is checked if this job
- * is found by the getFailedJobs method
- */
- public void testLoadFailedJobs() throws Exception {
- String xml =
- "<process-definition name='TestJob'>"
- + " <start-state>"
- + " <transition to='async state' />"
- + " </start-state>"
- + " <node name='async state' async='true'>"
- + " <transition to='end'>"
- + " <action name='throw exception' class='org.jbpm.db.JobSessionDbTest$FailingAction' />"
- + " </transition>"
- + " </node>"
- + " <end-state name='end' />"
- + "</process-definition>";
-
- // create a process definition
- ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(xml);
- // save it in the database
- graphSession.saveProcessDefinition(processDefinition);
-
- newTransaction();
-
- try {
- // start a new process instance and signal it
- ProcessInstance pi = jbpmContext.newProcessInstance("TestJob");
- pi.getRootToken().signal();
-
- newTransaction();
-
- // job is created now, but not yet executed
- assertEquals(1, getNbrOfJobsAvailable());
- assertEquals(0, jobSession.findFailedJobs().size());
-
- // start job executor wait for job to be executed
- // and failure is written to database
- startJobExecutor();
- long startTime = System.currentTimeMillis();
- while( jobSession.findFailedJobs().size() <= 0 ) {
- if (System.currentTimeMillis() - startTime > timeout) {
- fail("test execution exceeded treshold of " + timeout + " milliseconds");
- }
- Thread.sleep(500);
- }
- stopJobExecutor();
- List<Job> failedJobs = jobSession.findFailedJobs();
-
- // now the one job we have should be failed
- assertEquals(1, getNbrOfJobsAvailable());
- assertEquals(1, failedJobs.size());
-
- // and information is set on the job
- assertEquals(0, failedJobs.get(0).getRetries());
- assertNotNull(failedJobs.get(0).getException() + "==null",
- failedJobs.get(0).getException());
- assertTrue(failedJobs.get(0).getException() + " contains TEST-EXCEPTION",
- failedJobs.get(0).getException().indexOf("TEST-EXCEPTION")>0);
- }
- finally {
- newTransaction();
- // cleanup
- jbpmContext.getGraphSession().deleteProcessDefinition(processDefinition.getId());
- }
- }
-}
17 years, 2 months
JBoss JBPM SVN: r3894 - in jbpm3/trunk/modules/core/src: test/java/org/jbpm and 1 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-02-16 12:22:34 -0500 (Mon, 16 Feb 2009)
New Revision: 3894
Added:
jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1954/
jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1954/JBPM1954Test.java
Modified:
jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/node/Decision.java
Log:
JBPM-1954 take default transition after exception in decision handler is caught and not rethrown by an exception handler;
prevent further execution if exception handler moves token to different node
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/node/Decision.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/node/Decision.java 2009-02-16 16:53:53 UTC (rev 3893)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/node/Decision.java 2009-02-16 17:22:34 UTC (rev 3894)
@@ -38,161 +38,138 @@
/**
* decision node.
*/
-public class Decision extends Node
-{
- static final String NEWLINE = System.getProperty("line.separator");
- static final String DECISION_CONDITION_RESULT = "decision_condition_result";
+public class Decision extends Node {
+
static final long serialVersionUID = 1L;
List<DecisionCondition> decisionConditions = null;
Delegation decisionDelegation = null;
String decisionExpression = null;
- public Decision()
- {
+ public Decision() {
}
- public Decision(String name)
- {
+ public Decision(String name) {
super(name);
}
@Override
- public NodeType getNodeType()
- {
+ public NodeType getNodeType() {
return NodeType.Decision;
}
- public void read(Element decisionElement, JpdlXmlReader jpdlReader)
- {
-
+ public void read(Element decisionElement, JpdlXmlReader jpdlReader) {
String expression = decisionElement.attributeValue("expression");
Element decisionHandlerElement = decisionElement.element("handler");
- if (expression != null)
- {
+ if (expression != null) {
decisionExpression = expression;
-
}
- else if (decisionHandlerElement != null)
- {
+ else if (decisionHandlerElement != null) {
decisionDelegation = new Delegation();
decisionDelegation.read(decisionHandlerElement, jpdlReader);
}
}
- public void execute(ExecutionContext executionContext)
- {
+ public void execute(ExecutionContext executionContext) {
Transition transition = null;
- ClassLoader surroundingClassLoader = Thread.currentThread().getContextClassLoader();
- try
- {
- // set context class loader correctly for delegation class (https://jira.jboss.org/jira/browse/JBPM-1448)
- Thread.currentThread().setContextClassLoader(JbpmConfiguration.getProcessClassLoader(executionContext.getProcessDefinition()));
- try
- {
- if (decisionDelegation != null)
- {
- DecisionHandler decisionHandler = (DecisionHandler)decisionDelegation.getInstance();
- if (decisionHandler == null)
- decisionHandler = (DecisionHandler)decisionDelegation.instantiate();
+ // set context class loader correctly for delegation class
+ // (https://jira.jboss.org/jira/browse/JBPM-1448)
+ Thread currentThread = Thread.currentThread();
+ ClassLoader contextClassLoader = currentThread.getContextClassLoader();
+ currentThread.setContextClassLoader(JbpmConfiguration.getProcessClassLoader(executionContext.getProcessDefinition()));
- String transitionName = decisionHandler.decide(executionContext);
- transition = getLeavingTransition(transitionName);
- if (transition == null)
- {
- throw new JbpmException("decision '" + name + "' selected non existing transition '" + transitionName + "'");
- }
+ try {
+ if (decisionDelegation != null) {
+ DecisionHandler decisionHandler = (DecisionHandler) decisionDelegation.getInstance();
+ if (decisionHandler == null)
+ decisionHandler = (DecisionHandler) decisionDelegation.instantiate();
+ String transitionName = decisionHandler.decide(executionContext);
+ transition = getLeavingTransition(transitionName);
+ if (transition == null) {
+ throw new JbpmException("decision '"
+ + name
+ + "' selected non existing transition '"
+ + transitionName
+ + "'");
}
- else if (decisionExpression != null)
- {
- Object result = JbpmExpressionEvaluator.evaluate(decisionExpression, executionContext);
- if (result == null)
- {
- throw new JbpmException("decision expression '" + decisionExpression + "' returned null");
- }
- String transitionName = result.toString();
- transition = getLeavingTransition(transitionName);
- if (transition == null)
- {
- throw new JbpmException("decision '" + name + "' selected non existing transition '" + transitionName + "'");
- }
-
+ }
+ else if (decisionExpression != null) {
+ Object result = JbpmExpressionEvaluator.evaluate(decisionExpression, executionContext);
+ if (result == null) {
+ throw new JbpmException("decision expression '" + decisionExpression + "' returned null");
}
- else if (decisionConditions != null && !decisionConditions.isEmpty())
- {
- // backwards compatible mode based on separate DecisionCondition's
- for (DecisionCondition decisionCondition : decisionConditions) {
- Object result = JbpmExpressionEvaluator.evaluate(decisionCondition.getExpression(), executionContext);
- if (Boolean.TRUE.equals(result))
- {
- String transitionName = decisionCondition.getTransitionName();
- transition = getLeavingTransition(transitionName);
- if (transition != null)
- {
- transition.removeConditionEnforcement();
- break;
- }
- }
+ String transitionName = result.toString();
+ transition = getLeavingTransition(transitionName);
+ if (transition == null) {
+ throw new JbpmException("decision '"
+ + name
+ + "' selected non existing transition '"
+ + transitionName
+ + "'");
+ }
+ }
+ else if (decisionConditions != null && !decisionConditions.isEmpty()) {
+ // backwards compatible mode based on separate DecisionCondition's
+ for (DecisionCondition decisionCondition : decisionConditions) {
+ Object result = JbpmExpressionEvaluator.evaluate(decisionCondition.getExpression(),
+ executionContext);
+ if (Boolean.TRUE.equals(result)) {
+ String transitionName = decisionCondition.getTransitionName();
+ transition = getLeavingTransition(transitionName);
+ if (transition != null) break;
}
}
- else
- {
- // new mode based on conditions in the transition itself
- for (Transition candidate : leavingTransitions) {
- String conditionExpression = candidate.getCondition();
- if (conditionExpression != null)
- {
- Object result = JbpmExpressionEvaluator.evaluate(conditionExpression, executionContext);
- if (Boolean.TRUE.equals(result))
- {
- transition = candidate;
- break;
- }
+ }
+ else {
+ // new mode based on conditions in the transition itself
+ for (Transition candidate : leavingTransitions) {
+ String conditionExpression = candidate.getCondition();
+ if (conditionExpression != null) {
+ Object result = JbpmExpressionEvaluator.evaluate(conditionExpression, executionContext);
+ if (Boolean.TRUE.equals(result)) {
+ transition = candidate;
+ break;
}
}
}
-
- if (transition == null)
- transition = getDefaultLeavingTransition();
-
- if (transition == null)
- throw new IllegalStateException("decision cannot select transition: " + this);
-
- log.debug("decision didn't select transition, taking default " + transition);
-
- // since the decision node evaluates condition expressions, the
- // condition of the
- // taken transition will always be met. therefor we can safely turn off
- // the
- // standard condition enforcement in the transitions after a decision
- // node.
- transition.removeConditionEnforcement();
-
}
- catch (Exception exception)
- {
- raiseException(exception, executionContext);
+ }
+ catch (Exception exception) {
+ raiseException(exception, executionContext);
+ if (!equals(executionContext.getNode())) {
+ return;
}
-
}
- finally
- {
- Thread.currentThread().setContextClassLoader(surroundingClassLoader);
+ finally {
+ currentThread.setContextClassLoader(contextClassLoader);
}
- log.debug("decision " + name + " is taking '" + transition + "'");
+
+ if (transition == null) {
+ transition = getDefaultLeavingTransition();
+
+ if (transition == null)
+ throw new JbpmException("decision cannot select transition: " + this);
+
+ log.debug("decision did not select transition, taking default " + transition);
+ }
+
+ // since the decision node evaluates condition expressions, the condition of the
+ // taken transition will always be met. therefore we can safely turn off
+ // the standard condition enforcement in the transitions after a decision node.
+ transition.removeConditionEnforcement();
+
+ log.debug("decision '" + name + "' is taking " + transition);
executionContext.leaveNode(transition);
}
- public List<DecisionCondition> getDecisionConditions()
- {
+ public List<DecisionCondition> getDecisionConditions() {
return decisionConditions;
}
- public void setDecisionDelegation(Delegation decisionDelegation)
- {
+ public void setDecisionDelegation(Delegation decisionDelegation) {
this.decisionDelegation = decisionDelegation;
}
Added: jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1954/JBPM1954Test.java
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1954/JBPM1954Test.java (rev 0)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1954/JBPM1954Test.java 2009-02-16 17:22:34 UTC (rev 3894)
@@ -0,0 +1,89 @@
+/*
+ * 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.jbpm1954;
+
+import org.hibernate.HibernateException;
+import org.jbpm.AbstractJbpmTestCase;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ExecutionContext;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.graph.node.DecisionHandler;
+
+/**
+ * JbpmException thrown from Decision after exception in delegation class
+ *
+ * @see <a href="https://jira.jboss.org/jira/browse/JBPM-1954">JBPM-1954</a>
+ * @author Alejandro Guizar
+ */
+public class JBPM1954Test extends AbstractJbpmTestCase {
+
+ public void testHandleExceptionInDecisionHandler() {
+ ProcessDefinition processDefinition = ProcessDefinition.parseXmlString("<process-definition name='jbpm1954'>"
+ + " <start-state>"
+ + " <transition to='decision' />"
+ + " </start-state>"
+ + " <decision name='decision'>"
+ + " <handler class='"
+ + ProblematicDecisionHandler.class.getName()
+ + "' />"
+ + " <exception-handler exception-class='org.hibernate.HibernateException'>"
+ + " <script>System.out.println(executionContext.getException().getMessage());</script>"
+ + " </exception-handler>"
+ + " <transition to='end' />"
+ + " </decision>"
+ + " <end-state name='end' />"
+ + "</process-definition>");
+ ProcessInstance processInstance = new ProcessInstance(processDefinition);
+ processInstance.signal();
+ assertTrue("expected " + processInstance + " to have ended", processInstance.hasEnded());
+ }
+
+ public void testHandleExceptionInDecisionHandlerAndMoveToken() {
+ ProcessDefinition processDefinition = ProcessDefinition.parseXmlString("<process-definition name='jbpm1954'>"
+ + " <start-state>"
+ + " <transition to='decision' />"
+ + " </start-state>"
+ + " <decision name='decision'>"
+ + " <handler class='"
+ + ProblematicDecisionHandler.class.getName()
+ + "' />"
+ + " <exception-handler exception-class='org.hibernate.HibernateException'>"
+ + " <script>token.setNode(executionContext.getProcessDefinition().getNode(\"error\"));</script>"
+ + " </exception-handler>"
+ + " <transition to='end' />"
+ + " </decision>"
+ + " <state name='error'/>"
+ + " <end-state name='end' />"
+ + "</process-definition>");
+ ProcessInstance processInstance = new ProcessInstance(processDefinition);
+ processInstance.signal();
+ assertSame(processDefinition.getNode("error"), processInstance.getRootToken().getNode());
+ }
+
+ public static class ProblematicDecisionHandler implements DecisionHandler {
+ private static final long serialVersionUID = 1L;
+
+ public String decide(ExecutionContext executionContext) throws Exception {
+ throw new HibernateException("simulated failure");
+ }
+ }
+}
17 years, 2 months
JBoss JBPM SVN: r3893 - jbpm4/trunk/modules/db/src/test/resources.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-02-16 11:53:53 -0500 (Mon, 16 Feb 2009)
New Revision: 3893
Modified:
jbpm4/trunk/modules/db/src/test/resources/antrun-create_drop.xml
Log:
Use correct hsqldb driver
Modified: jbpm4/trunk/modules/db/src/test/resources/antrun-create_drop.xml
===================================================================
--- jbpm4/trunk/modules/db/src/test/resources/antrun-create_drop.xml 2009-02-16 16:53:28 UTC (rev 3892)
+++ jbpm4/trunk/modules/db/src/test/resources/antrun-create_drop.xml 2009-02-16 16:53:53 UTC (rev 3893)
@@ -64,7 +64,7 @@
<target name="create-hsqldb" if="database.is.hsqldb">
<execute-sql
db="hsqldb" action="create"
- driver="com.hsql.jdbc.Driver"
+ driver="org.hsqldb.jdbcDriver"
url="${jdbc.hsql.url}"
user="${jdbc.hsql.username}"
pass="${jdbc.hsql.password}"/>
@@ -73,7 +73,7 @@
<target name="drop-hsqldb" if="database.is.hsqldb">
<execute-sql
db="hsqldb" action="drop"
- driver="com.hsql.jdbc.Driver"
+ driver="org.hsqldb.jdbcDriver"
url="${jdbc.hsql.url}"
user="${jdbc.hsql.username}"
pass="${jdbc.hsql.password}"/>
17 years, 2 months
JBoss JBPM SVN: r3892 - in jbpm4/trunk/hudson/hudson-home/jobs: jBPM4-Database-Matrix and 1 other directories.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-02-16 11:53:28 -0500 (Mon, 16 Feb 2009)
New Revision: 3892
Modified:
jbpm4/trunk/hudson/hudson-home/jobs/jBPM4-Container-Matrix/config.xml
jbpm4/trunk/hudson/hudson-home/jobs/jBPM4-Database-Matrix/config.xml
jbpm4/trunk/hudson/hudson-home/jobs/jBPM4-JDK1.6/config.xml
Log:
Align hudson jobs
Modified: jbpm4/trunk/hudson/hudson-home/jobs/jBPM4-Container-Matrix/config.xml
===================================================================
--- jbpm4/trunk/hudson/hudson-home/jobs/jBPM4-Container-Matrix/config.xml 2009-02-16 15:46:06 UTC (rev 3891)
+++ jbpm4/trunk/hudson/hudson-home/jobs/jBPM4-Container-Matrix/config.xml 2009-02-16 16:53:28 UTC (rev 3892)
@@ -50,23 +50,40 @@
</axes>
<builders>
<hudson.tasks.Shell>
- <command>WORKSPACE=`pwd`
+<command>
+WORKSPACE=`pwd`
JBPMDIR=$WORKSPACE/jbpm4
-export HUDSON_BASE=/home/hudson/workspace/jbpm-hudson-4.0.0-SNAPSHOT
-export JBPM_VERSION=4.0.0-SNAPSHOT
-export JBOSS_SERVER=default
-export JBOSS_BINDADDR=192.168.0.101
+export HUDSON_BASE=(a)hudson.base@
+export JBPM_VERSION=(a)version.id@
+export JBOSS_SERVER=(a)jboss.server.instance@
+export JBOSS_BINDADDR=(a)jboss.bind.address@
+#
# copy the maven profile
+#
cp $JBPMDIR/hudson/profiles.xml.local.qa $JBPMDIR/profiles.xml
#
+# create the database tables
+#
+cd $JBPMDIR/modules/db
+mvn -Pcreate-tables -Ddatabase=$DATABASE install
+
+#
# call command.sh
#
-/bin/sh $JBPMDIR/hudson/hudson-home/command.sh
+cd $WORKSPACE
+/bin/sh $JBPMDIR/hudson/hudson-home/command.sh
- </command>
+#
+# drop the database tables (cleanup)
+#
+cd $JBPMDIR/modules/db
+mvn -Pdrop-tables -Ddatabase=$DATABASE install
+
+cd $WORKSPACE
+</command>
</hudson.tasks.Shell>
</builders>
<publishers>
Modified: jbpm4/trunk/hudson/hudson-home/jobs/jBPM4-Database-Matrix/config.xml
===================================================================
--- jbpm4/trunk/hudson/hudson-home/jobs/jBPM4-Database-Matrix/config.xml 2009-02-16 15:46:06 UTC (rev 3891)
+++ jbpm4/trunk/hudson/hudson-home/jobs/jBPM4-Database-Matrix/config.xml 2009-02-16 16:53:28 UTC (rev 3892)
@@ -48,21 +48,40 @@
</axes>
<builders>
<hudson.tasks.Shell>
- <command>WORKSPACE=`pwd`
+<command>
+WORKSPACE=`pwd`
JBPMDIR=$WORKSPACE/jbpm4
-export HUDSON_BASE=/home/hudson/workspace/jbpm-hudson-4.0.0-SNAPSHOT
-export JBPM_VERSION=4.0.0-SNAPSHOT
-export JBOSS_SERVER=default
-export JBOSS_BINDADDR=192.168.0.101
+export HUDSON_BASE=(a)hudson.base@
+export JBPM_VERSION=(a)version.id@
+export JBOSS_SERVER=(a)jboss.server.instance@
+export JBOSS_BINDADDR=(a)jboss.bind.address@
+#
# copy the maven profile
+#
cp $JBPMDIR/hudson/profiles.xml.local.qa $JBPMDIR/profiles.xml
#
+# create the database tables
+#
+cd $JBPMDIR/modules/db
+mvn -Pcreate-tables -Ddatabase=$DATABASE install
+
+#
# call command.sh
#
-/bin/sh $JBPMDIR/hudson/hudson-home/command.sh </command>
+cd $WORKSPACE
+/bin/sh $JBPMDIR/hudson/hudson-home/command.sh
+
+#
+# drop the database tables (cleanup)
+#
+cd $JBPMDIR/modules/db
+mvn -Pdrop-tables -Ddatabase=$DATABASE install
+
+cd $WORKSPACE
+</command>
</hudson.tasks.Shell>
</builders>
<publishers>
Modified: jbpm4/trunk/hudson/hudson-home/jobs/jBPM4-JDK1.6/config.xml
===================================================================
--- jbpm4/trunk/hudson/hudson-home/jobs/jBPM4-JDK1.6/config.xml 2009-02-16 15:46:06 UTC (rev 3891)
+++ jbpm4/trunk/hudson/hudson-home/jobs/jBPM4-JDK1.6/config.xml 2009-02-16 16:53:28 UTC (rev 3892)
@@ -40,9 +40,42 @@
</values>
</axis>
</axes>
- <builders>
+ <builders>
<hudson.tasks.Shell>
- <command>/bin/sh ./jbpm4/hudson/jbpm4-base.sh</command>
+<command>
+WORKSPACE=`pwd`
+JBPMDIR=$WORKSPACE/jbpm4
+
+export HUDSON_BASE=(a)hudson.base@
+export JBPM_VERSION=(a)version.id@
+export JBOSS_SERVER=(a)jboss.server.instance@
+export JBOSS_BINDADDR=(a)jboss.bind.address@
+
+#
+# copy the maven profile
+#
+cp $JBPMDIR/hudson/profiles.xml.local.qa $JBPMDIR/profiles.xml
+
+#
+# create the database tables
+#
+cd $JBPMDIR/modules/db
+mvn -Pcreate-tables -Ddatabase=$DATABASE install
+
+#
+# call command.sh
+#
+cd $WORKSPACE
+/bin/sh $JBPMDIR/hudson/hudson-home/command.sh
+
+#
+# drop the database tables (cleanup)
+#
+cd $JBPMDIR/modules/db
+mvn -Pdrop-tables -Ddatabase=$DATABASE install
+
+cd $WORKSPACE
+</command>
</hudson.tasks.Shell>
</builders>
<publishers>
17 years, 2 months
JBoss JBPM SVN: r3891 - jbpm4/trunk/hudson/hudson-home/jobs/jBPM4-JDK1.5.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-02-16 10:46:06 -0500 (Mon, 16 Feb 2009)
New Revision: 3891
Modified:
jbpm4/trunk/hudson/hudson-home/jobs/jBPM4-JDK1.5/config.xml
Log:
Fix/Update example hudson config
Modified: jbpm4/trunk/hudson/hudson-home/jobs/jBPM4-JDK1.5/config.xml
===================================================================
--- jbpm4/trunk/hudson/hudson-home/jobs/jBPM4-JDK1.5/config.xml 2009-02-16 15:28:13 UTC (rev 3890)
+++ jbpm4/trunk/hudson/hudson-home/jobs/jBPM4-JDK1.5/config.xml 2009-02-16 15:46:06 UTC (rev 3891)
@@ -42,24 +42,40 @@
</axes>
<builders>
<hudson.tasks.Shell>
- <command>
+<command>
WORKSPACE=`pwd`
JBPMDIR=$WORKSPACE/jbpm4
-export HUDSON_BASE=/home/hudson/workspace/jbpm-hudson-4.0.0-SNAPSHOT
-export JBPM_VERSION=4.0.0-SNAPSHOT
-export JBOSS_SERVER=default
-export JBOSS_BINDADDR=192.168.0.101
+export HUDSON_BASE=(a)hudson.base@
+export JBPM_VERSION=(a)version.id@
+export JBOSS_SERVER=(a)jboss.server.instance@
+export JBOSS_BINDADDR=(a)jboss.bind.address@
+#
# copy the maven profile
+#
cp $JBPMDIR/hudson/profiles.xml.local.qa $JBPMDIR/profiles.xml
#
+# create the database tables
+#
+cd $JBPMDIR/modules/db
+mvn -Pcreate-tables -Ddatabase=$DATABASE install
+
+#
# call command.sh
#
-/bin/sh $JBPMDIR/hudson/hudson-home/command.sh
+cd $WORKSPACE
+/bin/sh $JBPMDIR/hudson/hudson-home/command.sh
- </command>
+#
+# drop the database tables (cleanup)
+#
+cd $JBPMDIR/modules/db
+mvn -Pdrop-tables -Ddatabase=$DATABASE install
+
+cd $WORKSPACE
+</command>
</hudson.tasks.Shell>
</builders>
<publishers>
17 years, 2 months
JBoss JBPM SVN: r3890 - jbpm4/trunk/modules/db.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-02-16 10:28:13 -0500 (Mon, 16 Feb 2009)
New Revision: 3890
Modified:
jbpm4/trunk/modules/db/README.txt
jbpm4/trunk/modules/db/pom.xml
Log:
Break up create and drop commands
Modified: jbpm4/trunk/modules/db/README.txt
===================================================================
--- jbpm4/trunk/modules/db/README.txt 2009-02-16 14:56:47 UTC (rev 3889)
+++ jbpm4/trunk/modules/db/README.txt 2009-02-16 15:28:13 UTC (rev 3890)
@@ -7,7 +7,7 @@
Database creation can be triggered through the maven command line
usally as part of the test preparation:
- mvn -Pdrop-create -Ddatabase=<database> install
+ mvn -P<drop|create>-tables -Ddatabase=<database> install
Supported databases
-------------------
Modified: jbpm4/trunk/modules/db/pom.xml
===================================================================
--- jbpm4/trunk/modules/db/pom.xml 2009-02-16 14:56:47 UTC (rev 3889)
+++ jbpm4/trunk/modules/db/pom.xml 2009-02-16 15:28:13 UTC (rev 3890)
@@ -135,7 +135,7 @@
<profiles>
<profile>
- <id>drop-create</id>
+ <id>drop-tables</id>
<build>
<plugins>
<plugin>
@@ -157,7 +157,6 @@
<property name="maven.runtime.classpath" refid="maven.runtime.classpath" />
<ant antfile="target/test-classes/antrun-create_drop.xml" target="drop-tables" />
- <ant antfile="target/test-classes/antrun-create_drop.xml" target="create-tables" />
</tasks>
</configuration>
</execution>
@@ -167,6 +166,38 @@
</build>
</profile>
+ <profile>
+ <id>create-tables</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>create-drop-tables</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <!-- Implicit reference to all command line switches, i.e. -Ddatabase=xyz -->
+ <property name="compile_classpath" refid="maven.compile.classpath"/>
+ <property name="runtime_classpath" refid="maven.runtime.classpath"/>
+ <property name="test_classpath" refid="maven.test.classpath"/>
+ <property name="plugin_classpath" refid="maven.plugin.classpath"/>
+
+ <property name="maven.runtime.classpath" refid="maven.runtime.classpath" />
+ <ant antfile="target/test-classes/antrun-create_drop.xml" target="create-tables" />
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
<!-- -Ddatabase=oracle -->
<profile>
<id>oracle</id>
17 years, 2 months