JBoss JBPM SVN: r6669 - in jbpm3/branches/jbpm-3.2-soa: core/src/main/java/org/jbpm/graph/node and 8 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-09-23 23:33:49 -0400 (Thu, 23 Sep 2010)
New Revision: 6669
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/graph/node/Join.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/JobExecutor.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/JobExecutorThread.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/xml/JpdlParser.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/util/XmlUtil.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jbpm.cfg.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm1071/JBPM1071Test.java
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2908/JBPM2908Test.java
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2094/gpd.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2094/processdefinition.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2787/gpd.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2787/processdefinition.xml
jbpm3/branches/jbpm-3.2-soa/pom.xml
Log:
JBPM-2787 implement exclusive jobs by locking process instance instead of batching;
separate retryInterval property from idleInterval;
interpret null Join.parentLockMode as requesting no lock
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/graph/node/Join.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/graph/node/Join.java 2010-09-23 04:57:13 UTC (rev 6668)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/graph/node/Join.java 2010-09-24 03:33:49 UTC (rev 6669)
@@ -36,6 +36,7 @@
import org.jbpm.graph.action.Script;
import org.jbpm.graph.def.Node;
import org.jbpm.graph.exe.ExecutionContext;
+import org.jbpm.graph.exe.ProcessInstance;
import org.jbpm.graph.exe.Token;
import org.jbpm.jpdl.xml.JpdlXmlReader;
@@ -44,31 +45,31 @@
private static final long serialVersionUID = 1L;
/**
- * specifies what type of hibernate lock should be acquired. null value defaults to
- * LockMode.UPGRADE
+ * specifies what type of hibernate lock should be acquired. <code>null</code> means no lock
+ * is to be acquired.
*/
- String parentLockMode;
+ private String parentLockMode;
/**
* specifies if this join is a discriminator. a descriminator reactivates the parent when the
* first child token enters the join.
*/
- boolean isDiscriminator;
+ private boolean isDiscriminator;
/**
* a fixed set of child tokens.
*/
- Collection tokenNames;
+ private Collection tokenNames;
/**
* a script that calculates child tokens at runtime.
*/
- Script script;
+ private Script script;
/**
* reactivate the parent if the n-th token arrives in the join.
*/
- int nOutOfM = -1;
+ private int nOutOfM = -1;
public Join() {
}
@@ -109,20 +110,25 @@
if (!arrivingToken.isAbleToReactivateParent()) return;
arrivingToken.setAbleToReactivateParent(false);
- Token parentToken = arrivingToken.getParent();
- JbpmContext jbpmContext = executionContext.getJbpmContext();
- Session session;
- if (jbpmContext != null && (session = jbpmContext.getSession()) != null) {
- // obtain update lock by default (LockMode.UPGRADE)
- LockMode lockMode = parentLockMode != null ? LockMode.parse(parentLockMode)
- : LockMode.UPGRADE;
- // load() hits the database as required, no need to flush() here
- parentToken = (Token) session.load(Token.class, new Long(parentToken.getId()), lockMode);
- if (log.isDebugEnabled()) {
- log.debug(this + " acquires " + lockMode + " lock on " + parentToken);
+ if (parentLockMode != null) {
+ JbpmContext jbpmContext = executionContext.getJbpmContext();
+ Session session;
+ if (jbpmContext != null && (session = jbpmContext.getSession()) != null) {
+ // parse lock mode
+ LockMode lockMode = LockMode.parse(parentLockMode);
+ // call load() instead of lock() to obtain an unversioned lock
+ // https://jira.jboss.org/browse/SOA-1476
+ ProcessInstance processInstance = (ProcessInstance) session.load(ProcessInstance.class,
+ new Long(arrivingToken.getProcessInstance().getId()), lockMode);
+ // load() hits the database as required, no need to flush() here
+ // session.flush();
+ if (log.isDebugEnabled()) {
+ log.debug(this + " acquires " + lockMode + " lock on " + processInstance);
+ }
}
}
+ Token parentToken = arrivingToken.getParent();
boolean reactivateParent;
// if this is a discriminator
if (isDiscriminator) {
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/JobExecutor.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/JobExecutor.java 2010-09-23 04:57:13 UTC (rev 6668)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/JobExecutor.java 2010-09-24 03:33:49 UTC (rev 6669)
@@ -27,6 +27,7 @@
protected int nbrOfThreads;
protected int idleInterval;
protected int maxIdleInterval;
+ private int retryInterval;
/** @deprecated property has no effect */
protected int historyMaxSize;
@@ -243,6 +244,9 @@
}
public void setIdleInterval(int idleInterval) {
+ if (idleInterval <= 0) {
+ throw new IllegalArgumentException("idle interval must be positive");
+ }
this.idleInterval = idleInterval;
}
@@ -269,11 +273,25 @@
this.jbpmConfiguration = jbpmConfiguration;
}
+ public int getRetryInterval() {
+ return retryInterval;
+ }
+
+ public void setRetryInterval(int retryInterval) {
+ if (retryInterval <= 0) {
+ throw new IllegalArgumentException("retry interval must be positive");
+ }
+ this.retryInterval = retryInterval;
+ }
+
public int getMaxIdleInterval() {
return maxIdleInterval;
}
public void setMaxIdleInterval(int maxIdleInterval) {
+ if (maxIdleInterval <= 0) {
+ throw new IllegalArgumentException("max idle interval must be positive");
+ }
this.maxIdleInterval = maxIdleInterval;
}
@@ -324,6 +342,9 @@
}
public void setMaxLockTime(int maxLockTime) {
+ if (maxLockTime <= 0) {
+ throw new IllegalArgumentException("max lock time must be positive");
+ }
this.maxLockTime = maxLockTime;
}
@@ -342,6 +363,9 @@
}
public void setLockMonitorInterval(int lockMonitorInterval) {
+ if (lockMonitorInterval <= 0) {
+ throw new IllegalArgumentException("lock monitor interval must be positive");
+ }
this.lockMonitorInterval = lockMonitorInterval;
}
@@ -350,6 +374,9 @@
}
public void setNbrOfThreads(int nbrOfThreads) {
+ if (nbrOfThreads <= 0) {
+ throw new IllegalArgumentException("number of threads must be positive");
+ }
this.nbrOfThreads = nbrOfThreads;
}
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/JobExecutorThread.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/JobExecutorThread.java 2010-09-23 04:57:13 UTC (rev 6668)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/JobExecutorThread.java 2010-09-24 03:33:49 UTC (rev 6669)
@@ -6,7 +6,6 @@
import java.util.Collections;
import java.util.Date;
import java.util.Iterator;
-import java.util.Random;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -23,7 +22,6 @@
private final JobExecutor jobExecutor;
private volatile boolean isActive = true;
- private final Random random = new Random();
public JobExecutorThread(String name, JobExecutor jobExecutor) {
super(jobExecutor.getThreadGroup(), name);
@@ -41,14 +39,13 @@
}
public void run() {
- int currentIdleInterval = jobExecutor.getIdleInterval();
+ int retryInterval = jobExecutor.getRetryInterval();
while (isActive) {
- // acquire jobs; on exception, call returns empty collection
- Collection acquiredJobs = acquireJobs();
- // execute jobs
+ // acquire job; on exception, call returns null
+ Job job = acquireJob();
+ // execute job
boolean success = true;
- for (Iterator i = acquiredJobs.iterator(); i.hasNext() && isActive;) {
- Job job = (Job) i.next();
+ if (job != null) {
try {
executeJob(job);
}
@@ -56,7 +53,6 @@
// on exception, call returns normally
saveJobException(job, e);
success = false;
- break;
}
}
@@ -64,10 +60,10 @@
if (isActive) {
try {
if (success) {
- // reset current idle interval
- currentIdleInterval = jobExecutor.getIdleInterval();
+ // reset the current retry interval
+ retryInterval = jobExecutor.getRetryInterval();
// wait for next due job
- long waitPeriod = getWaitPeriod(currentIdleInterval);
+ long waitPeriod = getWaitPeriod(jobExecutor.getIdleInterval());
if (waitPeriod > 0) {
synchronized (jobExecutor) {
jobExecutor.wait(waitPeriod);
@@ -75,18 +71,16 @@
}
}
else {
- // wait a random period, at least half the current idle interval
- int waitPeriod = currentIdleInterval / 2;
// sleep instead of waiting on jobExecutor
// to prevent DbMessageService from waking up this thread
- sleep(waitPeriod + random.nextInt(waitPeriod));
- // after an exception, double the current idle interval
+ sleep(retryInterval);
+ // after an exception, double the current retry interval
// to avoid continuous failures during anomalous conditions
- currentIdleInterval *= 2;
+ retryInterval *= 2;
// enforce maximum idle interval
int maxIdleInterval = jobExecutor.getMaxIdleInterval();
- if (currentIdleInterval > maxIdleInterval || currentIdleInterval < 0) {
- currentIdleInterval = maxIdleInterval;
+ if (retryInterval > maxIdleInterval || retryInterval < 0) {
+ retryInterval = maxIdleInterval;
}
}
}
@@ -98,14 +92,15 @@
log.info(getName() + " leaves cyberspace");
}
+ /** @deprecated call {@link #acquireJob()} instead **/
protected Collection acquireJobs() {
boolean debug = log.isDebugEnabled();
Collection jobs;
- // acquire monitor before creating context and allocating resources
+ // acquire job executor's monitor before creating context and allocating resources
synchronized (jobExecutor) {
JbpmContext jbpmContext = jobExecutor.getJbpmConfiguration().createJbpmContext();
try {
- // search for acquirable job
+ // search for available job
String lockOwner = getName();
JobSession jobSession = jbpmContext.getJobSession();
Job firstJob = jobSession.getFirstAcquirableJob(lockOwner);
@@ -167,14 +162,69 @@
return jobs;
}
+ protected Job acquireJob() {
+ boolean debug = log.isDebugEnabled();
+ Job job;
+ // acquire job executor's monitor before creating context and allocating resources
+ synchronized (jobExecutor) {
+ JbpmContext jbpmContext = jobExecutor.getJbpmConfiguration().createJbpmContext();
+ try {
+ // search for available job
+ String lockOwner = getName();
+ JobSession jobSession = jbpmContext.getJobSession();
+ job = jobSession.getFirstAcquirableJob(lockOwner);
+ // is there a job?
+ if (job != null) {
+ // acquire jobs
+ Date lockTime = new Date();
+ // lock job
+ job.setLockOwner(lockOwner);
+ job.setLockTime(lockTime);
+ // has job failed previously?
+ if (job.getException() != null) {
+ // decrease retry count
+ int retries = job.getRetries() - 1;
+ job.setRetries(retries);
+ if (debug) log.debug(job + " has " + retries + " retries remaining");
+ }
+ if (debug) log.debug("acquired " + job);
+ }
+ else if (debug) log.debug("no acquirable job found");
+ }
+ catch (RuntimeException e) {
+ jbpmContext.setRollbackOnly();
+ job = null;
+ if (debug) log.debug("failed to acquire job", e);
+ }
+ catch (Error e) {
+ jbpmContext.setRollbackOnly();
+ throw e;
+ }
+ finally {
+ try {
+ jbpmContext.close();
+ }
+ catch (RuntimeException e) {
+ job = null;
+ if (debug) log.debug("failed to acquire job", e);
+ }
+ }
+ }
+ return job;
+ }
+
protected void executeJob(Job job) throws Exception {
JbpmContext jbpmContext = jobExecutor.getJbpmConfiguration().createJbpmContext();
try {
+ if (job.isExclusive()) {
+ jbpmContext.getGraphSession().lockProcessInstance(job.getProcessInstance());
+ }
+
JobSession jobSession = jbpmContext.getJobSession();
jobSession.reattachJob(job);
// register process instance for automatic save
- // see https://jira.jboss.org/jira/browse/JBPM-1015
+ // https://jira.jboss.org/browse/JBPM-1015
jbpmContext.addAutoSaveProcessInstance(job.getProcessInstance());
if (log.isDebugEnabled()) log.debug("executing " + job);
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/xml/JpdlParser.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/xml/JpdlParser.java 2010-09-23 04:57:13 UTC (rev 6668)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/jpdl/xml/JpdlParser.java 2010-09-24 03:33:49 UTC (rev 6669)
@@ -61,8 +61,8 @@
private static final String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";
private static final String JAXP_SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";
- private static SAXParserFactory saxParserFactory = createSaxParserFactory();
- private static Set schemaResources = getDefaultSchemaResources();
+ private static final SAXParserFactory saxParserFactory = createSaxParserFactory();
+ private static final Set schemaResources = getDefaultSchemaResources();
private static Object schemaSource;
private JpdlParser() {
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/util/XmlUtil.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/util/XmlUtil.java 2010-09-23 04:57:13 UTC (rev 6668)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/util/XmlUtil.java 2010-09-24 03:33:49 UTC (rev 6669)
@@ -113,7 +113,7 @@
return document;
}
- public synchronized static DocumentBuilder getDocumentBuilder() {
+ public static DocumentBuilder getDocumentBuilder() {
try {
return documentBuilderFactory.newDocumentBuilder();
}
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jbpm.cfg.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jbpm.cfg.xml 2010-09-23 04:57:13 UTC (rev 6668)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jbpm.cfg.xml 2010-09-24 03:33:49 UTC (rev 6669)
@@ -99,9 +99,13 @@
<int value="1" />
</property>
<property name="idleInterval">
- <!-- 5 seconds -->
- <int value="5000" />
+ <!-- 1 minute -->
+ <int value="60000" />
</property>
+ <property name="retryInterval">
+ <!-- 1 second -->
+ <int value="1000" />
+ </property>
<property name="maxIdleInterval">
<!-- 1 hour -->
<int value="3600000" />
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm1071/JBPM1071Test.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm1071/JBPM1071Test.java 2010-09-23 04:57:13 UTC (rev 6668)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm1071/JBPM1071Test.java 2010-09-24 03:33:49 UTC (rev 6669)
@@ -18,14 +18,14 @@
import org.jbpm.util.Semaphore;
/**
- * Possible problem in concurrent signaling from multiple threads
+ * Possible problem in concurrent signaling from multiple threads.
*
* @see <a href='https://jira.jboss.org/jira/browse/JBPM-1071'>JBPM-1071</a>
*/
public class JBPM1071Test extends AbstractDbTestCase {
static final int nbrOfThreads = 4;
- static final int nbrOfIterations = 20;
+ static final int nbrOfIterations = 10;
protected void setUp() throws Exception {
super.setUp();
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2908/JBPM2908Test.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2908/JBPM2908Test.java 2010-09-23 04:57:13 UTC (rev 6668)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2908/JBPM2908Test.java 2010-09-24 03:33:49 UTC (rev 6669)
@@ -22,17 +22,13 @@
package org.jbpm.jbpm2908;
import org.jbpm.JbpmConfiguration;
-import org.jbpm.JbpmContext;
import org.jbpm.db.AbstractDbTestCase;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ProcessInstance;
-import org.jbpm.persistence.JbpmPersistenceException;
/**
- * Change {@link JbpmConfiguration} and start a process instance in an action handler. This test
- * is only for detecting {@link StackOverflowError}. This nested {@link JbpmContext} usage may
- * not be properly asserted except in an integration test using JTA, so this test ignores many
- * {@link JbpmPersistenceException}s.
+ * Load an alternate {@link JbpmConfiguration} and start a process instance from within an
+ * action handler. This test chases a {@link StackOverflowError} or an infinite loop.
*
* @see <a href="https://jira.jboss.org/jira/browse/JBPM-2908">JBPM-2908</a>
* @author Toshiya Kobayashi
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2094/gpd.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2094/gpd.xml 2010-09-23 04:57:13 UTC (rev 6668)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2094/gpd.xml 2010-09-24 03:33:49 UTC (rev 6669)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<root-container name="bpm_orchestration2" width="494" height="548">
+<root-container name="jbpm2094" width="487" height="552">
<node name="Start" x="181" y="26" width="132" height="36">
<edge>
<label x="5" y="-10"/>
@@ -63,4 +63,11 @@
<label x="5" y="-10"/>
</edge>
</node>
+ <deployment serverName="" serverPort="" serverDeployer="">
+ <classesAndResources/>
+ <filesAndFolders>
+ <element value="/jbpm-jpdl/src/test/resources/org/jbpm/jbpm2094/gpd.xml"/>
+ <element value="/jbpm-jpdl/src/test/resources/org/jbpm/jbpm2094/processdefinition.xml"/>
+ </filesAndFolders>
+ </deployment>
</root-container>
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2094/processdefinition.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2094/processdefinition.xml 2010-09-23 04:57:13 UTC (rev 6668)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2094/processdefinition.xml 2010-09-24 03:33:49 UTC (rev 6669)
@@ -6,7 +6,7 @@
<transition to="Receive Order"/>
</start-state>
- <node async="true" name="Receive Order">
+ <node name="Receive Order" async="true">
<action class="org.jbpm.mock.EsbActionHandler">
<esbCategoryName>BPM_Orchestration2_Service1</esbCategoryName>
<esbServiceName>Service1</esbServiceName>
@@ -40,7 +40,7 @@
<transition name="Atlanta" to="Atlanta WHSE"/>
</fork>
- <node async="true" name="Los Angeles WHSE">
+ <node name="Los Angeles WHSE" async="true" >
<action class="org.jbpm.mock.EsbActionHandler">
<esbCategoryName>BPM_Orchestration2_Service5</esbCategoryName>
<esbServiceName>Service5</esbServiceName>
@@ -54,7 +54,7 @@
<transition to="join1"/>
</node>
- <node async="true" name="Dallas WHSE">
+ <node name="Dallas WHSE" async="true">
<action class="org.jbpm.mock.EsbActionHandler">
<esbCategoryName>BPM_Orchestration2_Service6</esbCategoryName>
<esbServiceName>Service6</esbServiceName>
@@ -68,7 +68,7 @@
<transition to="join1"/>
</node>
- <node async="true" name="Atlanta WHSE">
+ <node name="Atlanta WHSE" async="true">
<action class="org.jbpm.mock.EsbActionHandler">
<esbCategoryName>BPM_Orchestration2_Service7</esbCategoryName>
<esbServiceName>Service7</esbServiceName>
@@ -82,7 +82,7 @@
<transition to="join1"/>
</node>
- <join async="true" name="join1">
+ <join name="join1" async="exclusive">
<transition to="Shipment Notice"/>
</join>
@@ -105,7 +105,7 @@
<end-state name="End"/>
- <node async="true" name="Inventory Check">
+ <node name="Inventory Check" async="true">
<action class="org.jbpm.mock.EsbActionHandler">
<esbCategoryName>BPM_Orchestration2_Service4</esbCategoryName>
<esbServiceName>Service4</esbServiceName>
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2787/gpd.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2787/gpd.xml 2010-09-23 04:57:13 UTC (rev 6668)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2787/gpd.xml 2010-09-24 03:33:49 UTC (rev 6669)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<root-container name="prequalification" width="883" height="1236">
+<root-container name="jbpm2787" width="845" height="1236">
<node name="StartPrequalification" x="379" y="46" width="165" height="36">
<edge>
<label x="5" y="-10"/>
@@ -16,13 +16,13 @@
</node>
<node name="fork2" x="224" y="524" width="136" height="24">
<edge>
- <label x="-51" y="-9"/>
+ <label x="-110" y="-7"/>
</edge>
<edge>
- <label x="5" y="-10"/>
+ <label x="4" y="8"/>
</edge>
<edge>
- <label x="5" y="-10"/>
+ <label x="42" y="-6"/>
</edge>
</node>
<node name="join1" x="211" y="712" width="161" height="24">
@@ -114,4 +114,13 @@
</edge>
</node>
<node name="EndPrequalification" x="516" y="1199" width="181" height="36"/>
+ <deployment serverName="" serverPort="" serverDeployer="">
+ <classesAndResources>
+ <element value="/jbpm-jpdl/src/test/java/org/jbpm/mock/EsbActionHandler.java"/>
+ </classesAndResources>
+ <filesAndFolders>
+ <element value="/jbpm-jpdl/src/test/resources/org/jbpm/jbpm2787/gpd.xml"/>
+ <element value="/jbpm-jpdl/src/test/resources/org/jbpm/jbpm2787/processdefinition.xml"/>
+ </filesAndFolders>
+ </deployment>
</root-container>
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2787/processdefinition.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2787/processdefinition.xml 2010-09-23 04:57:13 UTC (rev 6668)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2787/processdefinition.xml 2010-09-24 03:33:49 UTC (rev 6669)
@@ -17,11 +17,11 @@
<transition to="LocateEBSACentral" name="to FindEBSA" />
</fork>
- <join name="join1" async="true">
+ <join name="join1" async="exclusive">
<transition to="ChooseCentralType" />
</join>
- <join name="join2" async="true">
+ <join name="join2" async="exclusive">
<transition to="ChooseLocalLoopType" />
</join>
@@ -45,12 +45,12 @@
<node name="LookupCentralOffice" async="true">
<action class="org.jbpm.mock.EsbActionHandler">
<esbServiceName>LookupCentralOffice</esbServiceName>
- <esbCategoryName>dk.telenor.esb.harlequin.tdc.columbine</esbCategoryName>
+ <esbCategoryName>org.jbpm.jbpm2787</esbCategoryName>
<bpmToEsbVars>
- <mapping bpm="contactInfoXML" esb="body.'dk.telenor.esb.harlequin.tdc.columbine.InputPayload'" />
+ <mapping bpm="contactInfoXML" esb="body.'org.jbpm.jbpm2787.InputPayload'" />
</bpmToEsbVars>
<esbToBpmVars>
- <mapping bpm="lookupCentralXML" esb="body.'dk.telenor.esb.harlequin.tdc.columbine.OutputPayload'" />
+ <mapping bpm="lookupCentralXML" esb="body.'org.jbpm.jbpm2787.OutputPayload'" />
</esbToBpmVars>
</action>
<transition to="FindCentralRequestMapper" />
@@ -59,12 +59,12 @@
<node name="LookupConnection" async="true">
<action class="org.jbpm.mock.EsbActionHandler">
<esbServiceName>LookupConnection</esbServiceName>
- <esbCategoryName>dk.telenor.esb.harlequin.tdc.columbine</esbCategoryName>
+ <esbCategoryName>org.jbpm.jbpm2787</esbCategoryName>
<bpmToEsbVars>
- <mapping bpm="contactInfoXML" esb="body.'dk.telenor.esb.harlequin.tdc.columbine.InputPayload'" />
+ <mapping bpm="contactInfoXML" esb="body.'org.jbpm.jbpm2787.InputPayload'" />
</bpmToEsbVars>
<esbToBpmVars>
- <mapping bpm="connectionXML" esb="body.'dk.telenor.esb.harlequin.tdc.columbine.OutputPayload'" />
+ <mapping bpm="connectionXML" esb="body.'org.jbpm.jbpm2787.OutputPayload'" />
</esbToBpmVars>
</action>
<transition to="join2" />
@@ -73,12 +73,12 @@
<node name="LocateBSACentral" async="true">
<action class="org.jbpm.mock.EsbActionHandler">
<esbServiceName>LocateCentralOffice</esbServiceName>
- <esbCategoryName>dk.telenor.esb.ods.geodata</esbCategoryName>
+ <esbCategoryName>org.jbpm.jbpm2787</esbCategoryName>
<bpmToEsbVars>
- <mapping bpm="bsaCentralXML" esb="body.'dk.telenor.esb.ods.geodata.InputPayload'" />
+ <mapping bpm="bsaCentralXML" esb="body.'org.jbpm.jbpm2787.InputPayload'" />
</bpmToEsbVars>
<esbToBpmVars>
- <mapping bpm="bsaCentralXML" esb="body.'dk.telenor.esb.ods.geodata.OutputPayload'" />
+ <mapping bpm="bsaCentralXML" esb="body.'org.jbpm.jbpm2787.OutputPayload'" />
</esbToBpmVars>
</action>
<transition to="join1" />
@@ -92,12 +92,12 @@
<node name="LocateColocCentral" async="true">
<action class="org.jbpm.mock.EsbActionHandler">
<esbServiceName>LocateCentralOffice</esbServiceName>
- <esbCategoryName>dk.telenor.esb.ods.geodata</esbCategoryName>
+ <esbCategoryName>org.jbpm.jbpm2787</esbCategoryName>
<bpmToEsbVars>
- <mapping bpm="colocCentralXML" esb="body.'dk.telenor.esb.ods.geodata.InputPayload'" />
+ <mapping bpm="colocCentralXML" esb="body.'org.jbpm.jbpm2787.InputPayload'" />
</bpmToEsbVars>
<esbToBpmVars>
- <mapping bpm="colocCentralXML" esb="body.'dk.telenor.esb.ods.geodata.OutputPayload'" />
+ <mapping bpm="colocCentralXML" esb="body.'org.jbpm.jbpm2787.OutputPayload'" />
</esbToBpmVars>
</action>
<transition to="join1" />
@@ -107,13 +107,13 @@
<event type="node-leave">
<action name="StoreResult" class="org.jbpm.mock.EsbActionHandler">
<esbServiceName>StoreResourceOrder</esbServiceName>
- <esbCategoryName>dk.telenor.esb.harlequin.resourceorder</esbCategoryName>
+ <esbCategoryName>org.jbpm.jbpm2787</esbCategoryName>
<bpmToEsbVars>
- <mapping bpm="prequalificationXML" esb="body.'dk.telenor.esb.harlequin.resourceorder.InputPayload'" />
+ <mapping bpm="prequalificationXML" esb="body.'org.jbpm.jbpm2787.InputPayload'" />
<mapping bpm="storeStatus"
- esb="body.'dk.telenor.esb.harlequin.resourceorder.InternalPayloadStatus'" />
+ esb="body.'org.jbpm.jbpm2787.InternalPayloadStatus'" />
<mapping bpm="transactionId"
- esb="body.'dk.telenor.esb.harlequin.resourceorder.InternalPayloadTransactionId'" />
+ esb="body.'org.jbpm.jbpm2787.InternalPayloadTransactionId'" />
</bpmToEsbVars>
</action>
</event>
@@ -128,12 +128,12 @@
<node name="LocateEBSACentral" async="true">
<action class="org.jbpm.mock.EsbActionHandler">
<esbServiceName>LocateCentralOffice</esbServiceName>
- <esbCategoryName>dk.telenor.esb.ods.geodata</esbCategoryName>
+ <esbCategoryName>org.jbpm.jbpm2787</esbCategoryName>
<bpmToEsbVars>
- <mapping bpm="ebsaCentralXML" esb="body.'dk.telenor.esb.ods.geodata.InputPayload'" />
+ <mapping bpm="ebsaCentralXML" esb="body.'org.jbpm.jbpm2787.InputPayload'" />
</bpmToEsbVars>
<esbToBpmVars>
- <mapping bpm="ebsaCentralXML" esb="body.'dk.telenor.esb.ods.geodata.OutputPayload'" />
+ <mapping bpm="ebsaCentralXML" esb="body.'org.jbpm.jbpm2787.OutputPayload'" />
</esbToBpmVars>
</action>
<transition to="join1" />
Modified: jbpm3/branches/jbpm-3.2-soa/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/pom.xml 2010-09-23 04:57:13 UTC (rev 6668)
+++ jbpm3/branches/jbpm-3.2-soa/pom.xml 2010-09-24 03:33:49 UTC (rev 6669)
@@ -816,9 +816,6 @@
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <quiet>true</quiet>
- </configuration>
<executions>
<execution>
<id>attach-javadocs</id>
13 years, 7 months
JBoss JBPM SVN: r6668 - jbpm3/branches/jbpm-3.2-soa/ci.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-09-23 00:57:13 -0400 (Thu, 23 Sep 2010)
New Revision: 6668
Modified:
jbpm3/branches/jbpm-3.2-soa/ci/container.sh
Log:
remove wget --no-verbose option, some machines in the qa lab have an old version that does not support it
Modified: jbpm3/branches/jbpm-3.2-soa/ci/container.sh
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/ci/container.sh 2010-09-23 03:25:00 UTC (rev 6667)
+++ jbpm3/branches/jbpm-3.2-soa/ci/container.sh 2010-09-23 04:57:13 UTC (rev 6668)
@@ -137,7 +137,7 @@
-u $MCAST_ADDR &> /dev/null &
# Was it successfully started?
-wget --spider --retry-connrefused --tries=24 --waitretry=24 --no-verbose $MYTESTIP_1:8080
+wget --spider --retry-connrefused --tries=24 --waitretry=24 $MYTESTIP_1:8080
if [ $? -ne 0 ]; then
tail -n 100 $JBOSS_HOME/server/$JBOSS_SERVER/log/server.log
$JBOSS_HOME/bin/shutdown.sh -s jnp://$MYTESTIP_1:1099 -S
13 years, 7 months
JBoss JBPM SVN: r6667 - in jbpm3/branches/jbpm-3.2-soa/core/src/main: resources/org/jbpm and 1 other directory.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-09-22 23:25:00 -0400 (Wed, 22 Sep 2010)
New Revision: 6667
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/instantiation/ProcessClassLoader.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/instantiation/SharedProcessClassLoaderFactory.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jbpm.cfg.xml
Log:
JBPM-2908 have shared process class loader factory remember the jbpm configuration that created it
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/instantiation/ProcessClassLoader.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/instantiation/ProcessClassLoader.java 2010-09-23 00:33:34 UTC (rev 6666)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/instantiation/ProcessClassLoader.java 2010-09-23 03:25:00 UTC (rev 6667)
@@ -76,20 +76,34 @@
};
public ProcessClassLoader(ClassLoader parent, ProcessDefinition processDefinition) {
+ this(parent, processDefinition, null);
+ }
+
+ ProcessClassLoader(ClassLoader parent, ProcessDefinition processDefinition,
+ JbpmConfiguration jbpmConfiguration) {
super(parent);
// check whether the given process definition is transient
long id = processDefinition.getId();
if (id != 0) {
// persistent, keep id only
processDefinitionId = id;
+ // remember jbpm configuration
+ if (jbpmConfiguration != null) {
+ this.jbpmConfiguration = jbpmConfiguration;
+ }
+ else {
+ JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
+ if (jbpmContext == null) {
+ throw new JbpmException("no active jbpm context");
+ }
+ this.jbpmConfiguration = jbpmContext.getJbpmConfiguration();
+ }
}
else {
// transient, keep full object
this.processDefinition = processDefinition;
+ this.jbpmConfiguration = null;
}
- // remember current jbpm configuration
- JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
- jbpmConfiguration = jbpmContext != null ? jbpmContext.getJbpmConfiguration() : null;
}
protected ProcessDefinition getProcessDefinition() {
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/instantiation/SharedProcessClassLoaderFactory.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/instantiation/SharedProcessClassLoaderFactory.java 2010-09-23 00:33:34 UTC (rev 6666)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/instantiation/SharedProcessClassLoaderFactory.java 2010-09-23 03:25:00 UTC (rev 6667)
@@ -28,6 +28,7 @@
import java.util.List;
import java.util.Map;
+import org.jbpm.JbpmConfiguration;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.util.ClassLoaderUtil;
@@ -39,10 +40,19 @@
*/
public class SharedProcessClassLoaderFactory implements ProcessClassLoaderFactory {
+ private final JbpmConfiguration jbpmConfiguration;
private transient Map classLoaderRefs = new HashMap();
private static final long serialVersionUID = 1L;
+ public SharedProcessClassLoaderFactory() {
+ jbpmConfiguration = null;
+ }
+
+ public SharedProcessClassLoaderFactory(JbpmConfiguration jbpmConfiguration) {
+ this.jbpmConfiguration = jbpmConfiguration;
+ }
+
public ClassLoader getProcessClassLoader(ProcessDefinition processDefinition) {
// determine the key to lookup a cached class loader
// observe that the given process definition may be transient
@@ -58,7 +68,7 @@
// the reference may not exist or may have been cleared already
if (processClassLoader == null) {
// (re-)create the class loader and the reference
- processClassLoader = new ProcessClassLoader(parentClassLoader, processDefinition);
+ processClassLoader = new ProcessClassLoader(parentClassLoader, processDefinition, jbpmConfiguration);
// cache the reference
putProcessClassLoader(key, processClassLoader);
}
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jbpm.cfg.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jbpm.cfg.xml 2010-09-23 00:33:34 UTC (rev 6666)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jbpm.cfg.xml 2010-09-23 03:25:00 UTC (rev 6667)
@@ -47,7 +47,13 @@
<string name="jbpm.class.loader" value="context" />
-->
<bean name="process.class.loader.factory"
- class="org.jbpm.instantiation.SharedProcessClassLoaderFactory" singleton="true" />
+ class="org.jbpm.instantiation.SharedProcessClassLoaderFactory" singleton="true">
+ <constructor>
+ <parameter class="org.jbpm.JbpmConfiguration">
+ <ref bean="jbpm.configuration" />
+ </parameter>
+ </constructor>
+ </bean>
<!-- make sure the block size matches the length in ByteArray.hbm.xml -->
<int name="jbpm.byte.block.size" value="1024" />
@@ -84,7 +90,7 @@
<!-- job execution properties -->
<bean name="jbpm.job.executor" class="org.jbpm.job.executor.JobExecutor" singleton="true">
<property name="jbpmConfiguration">
- <ref bean="jbpmConfiguration" />
+ <ref bean="jbpm.configuration" />
</property>
<property name="name">
<string value="JbpmJobExecutor" />
13 years, 7 months
JBoss JBPM SVN: r6666 - in jbpm3/branches/jbpm-3.2-soa: core/src/main/resources/org/jbpm and 3 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-09-22 20:33:34 -0400 (Wed, 22 Sep 2010)
New Revision: 6666
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/mail/Mail.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jbpm.cfg.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/mail/MailTest.java
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/mail/test.mail.properties
jbpm3/branches/jbpm-3.2-soa/examples/src/test/java/org/jbpm/examples/mail/MailTest.java
Log:
JBPM-2905 ensure "from" attribute is set in outgoing email
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/mail/Mail.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/mail/Mail.java 2010-09-22 09:18:35 UTC (rev 6665)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/mail/Mail.java 2010-09-23 00:33:34 UTC (rev 6666)
@@ -22,7 +22,7 @@
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Element;
-import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmConfiguration.Configs;
import org.jbpm.JbpmException;
import org.jbpm.graph.def.ActionHandler;
import org.jbpm.graph.exe.ExecutionContext;
@@ -93,8 +93,8 @@
List recipients = new ArrayList();
if (bccActors != null) recipients.addAll(evaluateActors(bccActors));
if (bcc != null) recipients.addAll(evaluateAddresses(bcc));
- if (JbpmConfiguration.Configs.hasObject("jbpm.mail.bcc.address")) {
- recipients.addAll(tokenize(JbpmConfiguration.Configs.getString("jbpm.mail.bcc.address")));
+ if (Configs.hasObject("jbpm.mail.bcc.address")) {
+ recipients.addAll(tokenize(Configs.getString("jbpm.mail.bcc.address")));
}
return recipients;
}
@@ -121,7 +121,7 @@
}
protected Collection resolveAddresses(List actorIds) {
- AddressResolver addressResolver = (AddressResolver) JbpmConfiguration.Configs.getObject("jbpm.mail.address.resolver");
+ AddressResolver addressResolver = (AddressResolver) Configs.getObject("jbpm.mail.address.resolver");
List addresses = new ArrayList();
for (Iterator iter = actorIds.iterator(); iter.hasNext();) {
@@ -176,10 +176,7 @@
}
public String getFromAddress() {
- if (JbpmConfiguration.Configs.hasObject("jbpm.mail.from.address")) {
- return JbpmConfiguration.Configs.getString("jbpm.mail.from.address");
- }
- return "no-reply(a)jbpm.org";
+ return Configs.getString("jbpm.mail.from.address");
}
public void send() {
@@ -259,6 +256,8 @@
private static void sendMailInternal(Session session, List recipients, List ccRecipients,
List bccRecipients, String subject, String text) throws MessagingException {
MimeMessage message = new MimeMessage(session);
+ // from - specified in the "mail.from" property
+ message.setFrom();
// to
for (Iterator iter = recipients.iterator(); iter.hasNext();) {
InternetAddress recipient = new InternetAddress((String) iter.next());
@@ -291,8 +290,8 @@
private Properties getServerProperties() {
Properties serverProperties;
- if (JbpmConfiguration.Configs.hasObject("resource.mail.properties")) {
- String resource = JbpmConfiguration.Configs.getString("resource.mail.properties");
+ if (Configs.hasObject("resource.mail.properties")) {
+ String resource = Configs.getString("resource.mail.properties");
synchronized (serverPropertiesByResource) {
serverProperties = (Properties) serverPropertiesByResource.get(resource);
if (serverProperties == null) {
@@ -305,13 +304,13 @@
else {
serverProperties = new Properties();
// host
- if (JbpmConfiguration.Configs.hasObject("jbpm.mail.smtp.host")) {
- String smtpHost = JbpmConfiguration.Configs.getString("jbpm.mail.smtp.host");
+ if (Configs.hasObject("jbpm.mail.smtp.host")) {
+ String smtpHost = Configs.getString("jbpm.mail.smtp.host");
serverProperties.setProperty("mail.smtp.host", smtpHost);
}
// port
- if (JbpmConfiguration.Configs.hasObject("jbpm.mail.smtp.port")) {
- int port = JbpmConfiguration.Configs.getInt("jbpm.mail.smtp.port");
+ if (Configs.hasObject("jbpm.mail.smtp.port")) {
+ int port = Configs.getInt("jbpm.mail.smtp.port");
serverProperties.setProperty("mail.smtp.port", Integer.toString(port));
}
// from
@@ -325,7 +324,7 @@
private static final Map templateVariablesByResource = new HashMap();
private static Properties getTemplateProperties(String templateName) {
- String resource = JbpmConfiguration.Configs.getString("resource.mail.templates");
+ String resource = Configs.getString("resource.mail.templates");
synchronized (templatePropertiesByResource) {
Map templateProperties = (Map) templatePropertiesByResource.get(resource);
if (templateProperties == null) {
@@ -337,7 +336,7 @@
}
private static Map getTemplateVariables() {
- String resource = JbpmConfiguration.Configs.getString("resource.mail.templates");
+ String resource = Configs.getString("resource.mail.templates");
synchronized (templateVariablesByResource) {
Map templateVariables = (Map) templateVariablesByResource.get(resource);
if (templateVariables == null) {
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jbpm.cfg.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jbpm.cfg.xml 2010-09-22 09:18:35 UTC (rev 6665)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/org/jbpm/default.jbpm.cfg.xml 2010-09-23 00:33:34 UTC (rev 6666)
@@ -76,8 +76,8 @@
<!-- outgoing mail properties
<string name="jbpm.mail.smtp.host" value="localhost" />
<int name="jbpm.mail.smtp.port" value="25" />
+ -->
<string name="jbpm.mail.from.address" value="no-reply(a)jbpm.org" />
- -->
<bean name="jbpm.mail.address.resolver" class="org.jbpm.identity.mail.IdentityAddressResolver"
singleton="true" />
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/mail/MailTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/mail/MailTest.java 2010-09-22 09:18:35 UTC (rev 6665)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/mail/MailTest.java 2010-09-23 00:33:34 UTC (rev 6666)
@@ -4,6 +4,7 @@
import java.util.Arrays;
import java.util.List;
+import javax.mail.Address;
import javax.mail.MessagingException;
import javax.mail.Message.RecipientType;
import javax.mail.internet.InternetAddress;
@@ -357,6 +358,32 @@
assertEquals("your cookies order", email.getContent());
}
+ public void testFrom() throws MessagingException {
+ ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(XML_DECL
+ + "<process-definition>"
+ + " <start-state>"
+ + " <transition to='end'>"
+ + " <mail name='send email' to='long.cat(a)meme.org'"
+ + " subject='important info' text='longcat iz looooooong' />"
+ + " </transition>"
+ + " </start-state>"
+ + " <end-state name='end' />"
+ + "</process-definition>");
+ ProcessInstance processInstance = new ProcessInstance(processDefinition);
+ processInstance.signal();
+
+ List messages = wiser.getMessages();
+ assertEquals(1, messages.size());
+
+ WiserMessage message = (WiserMessage) messages.get(0);
+ MimeMessage email = message.getMimeMessage();
+
+ Address[] from = email.getFrom();
+ assertEquals(1, from.length);
+ InternetAddress fromAddress = (InternetAddress) from[0];
+ assertEquals("workflow(a)redhat.com", fromAddress.getAddress());
+ }
+
public static class User {
String email;
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/mail/test.mail.properties
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/mail/test.mail.properties 2010-09-22 09:18:35 UTC (rev 6665)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/mail/test.mail.properties 2010-09-23 00:33:34 UTC (rev 6666)
@@ -1,2 +1,3 @@
mail.smtp.host = localhost
-mail.smtp.port = 2525
\ No newline at end of file
+mail.smtp.port = 2525
+mail.from = workflow(a)redhat.com
\ No newline at end of file
Modified: jbpm3/branches/jbpm-3.2-soa/examples/src/test/java/org/jbpm/examples/mail/MailTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/examples/src/test/java/org/jbpm/examples/mail/MailTest.java 2010-09-22 09:18:35 UTC (rev 6665)
+++ jbpm3/branches/jbpm-3.2-soa/examples/src/test/java/org/jbpm/examples/mail/MailTest.java 2010-09-23 00:33:34 UTC (rev 6666)
@@ -24,6 +24,7 @@
import java.util.Arrays;
import java.util.List;
+import javax.mail.Address;
import javax.mail.MessagingException;
import javax.mail.Message.RecipientType;
import javax.mail.internet.InternetAddress;
@@ -70,6 +71,11 @@
WiserMessage message = (WiserMessage) messages.get(0);
MimeMessage email = message.getMimeMessage();
assert Arrays.equals(InternetAddress.parse("grandma(a)dalton.com"), email.getRecipients(RecipientType.TO));
+
+ Address[] from = email.getFrom();
+ assertEquals(1, from.length);
+ InternetAddress fromAddress = (InternetAddress) from[0];
+ assertEquals("no-reply(a)jbpm.org", fromAddress.getAddress());
}
public static class MyAddressResolver implements AddressResolver {
13 years, 7 months
JBoss JBPM SVN: r6665 - jbpm3/branches/jbpm-3.2-soa.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-09-22 05:18:35 -0400 (Wed, 22 Sep 2010)
New Revision: 6665
Removed:
jbpm3/branches/jbpm-3.2-soa/modules/
Log:
JBPM-2934 remove the blissful modules directory
13 years, 7 months
JBoss JBPM SVN: r6664 - in jbpm3/branches/jbpm-3.2-soa: ci and 10 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-09-22 05:14:32 -0400 (Wed, 22 Sep 2010)
New Revision: 6664
Added:
jbpm3/branches/jbpm-3.2-soa/core/
jbpm3/branches/jbpm-3.2-soa/db/
jbpm3/branches/jbpm-3.2-soa/distribution/
jbpm3/branches/jbpm-3.2-soa/enterprise/
jbpm3/branches/jbpm-3.2-soa/examples/
jbpm3/branches/jbpm-3.2-soa/identity/
jbpm3/branches/jbpm-3.2-soa/simulation/
jbpm3/branches/jbpm-3.2-soa/soa-distribution/
jbpm3/branches/jbpm-3.2-soa/userguide/
Removed:
jbpm3/branches/jbpm-3.2-soa/modules/core/
jbpm3/branches/jbpm-3.2-soa/modules/db/
jbpm3/branches/jbpm-3.2-soa/modules/distribution/
jbpm3/branches/jbpm-3.2-soa/modules/enterprise/
jbpm3/branches/jbpm-3.2-soa/modules/examples/
jbpm3/branches/jbpm-3.2-soa/modules/identity/
jbpm3/branches/jbpm-3.2-soa/modules/simulation/
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/
jbpm3/branches/jbpm-3.2-soa/modules/userguide/
Modified:
jbpm3/branches/jbpm-3.2-soa/ci/container.sh
jbpm3/branches/jbpm-3.2-soa/core/pom.xml
jbpm3/branches/jbpm-3.2-soa/db/pom.xml
jbpm3/branches/jbpm-3.2-soa/distribution/pom.xml
jbpm3/branches/jbpm-3.2-soa/enterprise/pom.xml
jbpm3/branches/jbpm-3.2-soa/examples/pom.xml
jbpm3/branches/jbpm-3.2-soa/identity/pom.xml
jbpm3/branches/jbpm-3.2-soa/pom.xml
jbpm3/branches/jbpm-3.2-soa/simulation/pom.xml
jbpm3/branches/jbpm-3.2-soa/soa-distribution/pom.xml
jbpm3/branches/jbpm-3.2-soa/userguide/pom.xml
Log:
JBPM-2934 take project modules out of the modules directory
Modified: jbpm3/branches/jbpm-3.2-soa/ci/container.sh
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/ci/container.sh 2010-09-21 17:45:09 UTC (rev 6663)
+++ jbpm3/branches/jbpm-3.2-soa/ci/container.sh 2010-09-22 09:14:32 UTC (rev 6664)
@@ -69,8 +69,8 @@
unzip -q -d $WORKSPACE $SOURCE_REPO/jboss/$JBOSS_VERSION.zip
# Install jBPM
-$JAVA -jar modules/distribution/target/jbpm-distribution-$JBPM_VERSION-installer.jar \
- modules/distribution/target/classes/auto-install-template.xml
+$JAVA -jar distribution/target/jbpm-distribution-$JBPM_VERSION-installer.jar \
+ distribution/target/classes/auto-install-template.xml
if [ $? -ne 0 ]; then
echo "ERROR: failed to install distro"
exit 1
@@ -145,7 +145,7 @@
fi
# Run enterprise test suite
-mvn -f modules/enterprise/pom.xml -s /dev/null --fail-at-end -Djboss.bind.address=$MYTESTIP_1 \
+mvn -f enterprise/pom.xml -s /dev/null --fail-at-end -Djboss.bind.address=$MYTESTIP_1 \
-Dsurefire.jvm.args="-Xms64m -Xmx256m" integration-test | tee $WORKSPACE/tests.log
grep -E 'FIXME\|FAILED' $WORKSPACE/tests.log | sort -u > $WORKSPACE/fixme.txt
Copied: jbpm3/branches/jbpm-3.2-soa/core (from rev 6663, jbpm3/branches/jbpm-3.2-soa/modules/core)
Modified: jbpm3/branches/jbpm-3.2-soa/core/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/pom.xml 2010-09-21 17:45:09 UTC (rev 6663)
+++ jbpm3/branches/jbpm-3.2-soa/core/pom.xml 2010-09-22 09:14:32 UTC (rev 6664)
@@ -20,7 +20,7 @@
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm</artifactId>
<version>3.2.10-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
+ <relativePath>../pom.xml</relativePath>
</parent>
<!-- Dependencies -->
Copied: jbpm3/branches/jbpm-3.2-soa/db (from rev 6663, jbpm3/branches/jbpm-3.2-soa/modules/db)
Modified: jbpm3/branches/jbpm-3.2-soa/db/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/db/pom.xml 2010-09-21 17:45:09 UTC (rev 6663)
+++ jbpm3/branches/jbpm-3.2-soa/db/pom.xml 2010-09-22 09:14:32 UTC (rev 6664)
@@ -20,7 +20,7 @@
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm</artifactId>
<version>3.2.10-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
+ <relativePath>../pom.xml</relativePath>
</parent>
<properties>
Copied: jbpm3/branches/jbpm-3.2-soa/distribution (from rev 6663, jbpm3/branches/jbpm-3.2-soa/modules/distribution)
Modified: jbpm3/branches/jbpm-3.2-soa/distribution/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/distribution/pom.xml 2010-09-21 17:45:09 UTC (rev 6663)
+++ jbpm3/branches/jbpm-3.2-soa/distribution/pom.xml 2010-09-22 09:14:32 UTC (rev 6664)
@@ -20,7 +20,7 @@
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm</artifactId>
<version>3.2.10-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
+ <relativePath>../pom.xml</relativePath>
</parent>
<!-- Properties -->
Copied: jbpm3/branches/jbpm-3.2-soa/enterprise (from rev 6663, jbpm3/branches/jbpm-3.2-soa/modules/enterprise)
Modified: jbpm3/branches/jbpm-3.2-soa/enterprise/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/enterprise/pom.xml 2010-09-21 17:45:09 UTC (rev 6663)
+++ jbpm3/branches/jbpm-3.2-soa/enterprise/pom.xml 2010-09-22 09:14:32 UTC (rev 6664)
@@ -20,7 +20,7 @@
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm</artifactId>
<version>3.2.10-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
+ <relativePath>../pom.xml</relativePath>
</parent>
<!-- Dependencies -->
Copied: jbpm3/branches/jbpm-3.2-soa/examples (from rev 6663, jbpm3/branches/jbpm-3.2-soa/modules/examples)
Modified: jbpm3/branches/jbpm-3.2-soa/examples/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/examples/pom.xml 2010-09-21 17:45:09 UTC (rev 6663)
+++ jbpm3/branches/jbpm-3.2-soa/examples/pom.xml 2010-09-22 09:14:32 UTC (rev 6664)
@@ -20,7 +20,7 @@
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm</artifactId>
<version>3.2.10-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
+ <relativePath>../pom.xml</relativePath>
</parent>
<!-- Dependencies -->
Copied: jbpm3/branches/jbpm-3.2-soa/identity (from rev 6663, jbpm3/branches/jbpm-3.2-soa/modules/identity)
Modified: jbpm3/branches/jbpm-3.2-soa/identity/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/identity/pom.xml 2010-09-21 17:45:09 UTC (rev 6663)
+++ jbpm3/branches/jbpm-3.2-soa/identity/pom.xml 2010-09-22 09:14:32 UTC (rev 6664)
@@ -20,7 +20,7 @@
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm</artifactId>
<version>3.2.10-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
+ <relativePath>../pom.xml</relativePath>
</parent>
<!-- Dependencies -->
Modified: jbpm3/branches/jbpm-3.2-soa/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/pom.xml 2010-09-21 17:45:09 UTC (rev 6663)
+++ jbpm3/branches/jbpm-3.2-soa/pom.xml 2010-09-22 09:14:32 UTC (rev 6664)
@@ -32,11 +32,11 @@
<!-- Modules -->
<modules>
- <module>modules/core</module>
- <module>modules/identity</module>
- <module>modules/enterprise</module>
- <module>modules/examples</module>
- <module>modules/simulation</module>
+ <module>core</module>
+ <module>identity</module>
+ <module>enterprise</module>
+ <module>examples</module>
+ <module>simulation</module>
</modules>
<!-- Properties -->
@@ -501,7 +501,7 @@
<profile>
<id>distro</id>
<modules>
- <module>modules/distribution</module>
+ <module>distribution</module>
</modules>
<build>
<plugins>
@@ -534,9 +534,9 @@
<profile>
<id>release</id>
<modules>
- <module>modules/db</module>
- <module>modules/userguide</module>
- <module>modules/distribution</module>
+ <module>db</module>
+ <module>userguide</module>
+ <module>distribution</module>
</modules>
<build>
<plugins>
@@ -807,10 +807,10 @@
<profile>
<id>soa</id>
<modules>
- <module>modules/db</module>
- <module>modules/userguide</module>
- <module>modules/distribution</module>
- <module>modules/soa-distribution</module>
+ <module>db</module>
+ <module>userguide</module>
+ <module>distribution</module>
+ <module>soa-distribution</module>
</modules>
<build>
<plugins>
Copied: jbpm3/branches/jbpm-3.2-soa/simulation (from rev 6663, jbpm3/branches/jbpm-3.2-soa/modules/simulation)
Modified: jbpm3/branches/jbpm-3.2-soa/simulation/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/simulation/pom.xml 2010-09-21 17:45:09 UTC (rev 6663)
+++ jbpm3/branches/jbpm-3.2-soa/simulation/pom.xml 2010-09-22 09:14:32 UTC (rev 6664)
@@ -20,7 +20,7 @@
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm</artifactId>
<version>3.2.10-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
+ <relativePath>../pom.xml</relativePath>
</parent>
<!-- Profiles -->
Copied: jbpm3/branches/jbpm-3.2-soa/soa-distribution (from rev 6663, jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution)
Modified: jbpm3/branches/jbpm-3.2-soa/soa-distribution/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/pom.xml 2010-09-21 17:45:09 UTC (rev 6663)
+++ jbpm3/branches/jbpm-3.2-soa/soa-distribution/pom.xml 2010-09-22 09:14:32 UTC (rev 6664)
@@ -20,7 +20,7 @@
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm</artifactId>
<version>3.2.10-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
+ <relativePath>../pom.xml</relativePath>
</parent>
<properties>
Copied: jbpm3/branches/jbpm-3.2-soa/userguide (from rev 6663, jbpm3/branches/jbpm-3.2-soa/modules/userguide)
Modified: jbpm3/branches/jbpm-3.2-soa/userguide/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/userguide/pom.xml 2010-09-21 17:45:09 UTC (rev 6663)
+++ jbpm3/branches/jbpm-3.2-soa/userguide/pom.xml 2010-09-22 09:14:32 UTC (rev 6664)
@@ -20,7 +20,7 @@
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm</artifactId>
<version>3.2.10-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
+ <relativePath>../pom.xml</relativePath>
</parent>
<!-- Plugins -->
13 years, 7 months
JBoss JBPM SVN: r6663 - projects/exception_framework/branches.
by do-not-reply@jboss.org
Author: eschabell
Date: 2010-09-21 13:45:09 -0400 (Tue, 21 Sep 2010)
New Revision: 6663
Added:
projects/exception_framework/branches/exception_returns_to_any_node/
Log:
Branch to experiment from the 1.0.0.GA version to allow for returning to any given node in originating process. This was put forth by Pilar Bravo while working with a customer using this framework.
Copied: projects/exception_framework/branches/exception_returns_to_any_node (from rev 6662, projects/exception_framework/trunk)
13 years, 7 months
JBoss JBPM SVN: r6662 - projects/exception_framework/tags.
by do-not-reply@jboss.org
Author: eschabell
Date: 2010-09-21 13:36:44 -0400 (Tue, 21 Sep 2010)
New Revision: 6662
Added:
projects/exception_framework/tags/exception_framework-1.0.0.GA/
Log:
Tagging the framework 1.0.0.GA
Copied: projects/exception_framework/tags/exception_framework-1.0.0.GA (from rev 6661, projects/exception_framework/trunk)
13 years, 7 months
JBoss JBPM SVN: r6661 - jbpm3/branches/jbpm-3.2-soa.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-09-15 04:19:09 -0400 (Wed, 15 Sep 2010)
New Revision: 6661
Removed:
jbpm3/branches/jbpm-3.2-soa/hudson/
Log:
JBPM-2934 remove hudson directory
13 years, 7 months