[jbpm-commits] JBoss JBPM SVN: r6210 - in jbpm3/branches/jbpm-3.2-soa: modules/core and 9 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Thu Mar 4 23:26:41 EST 2010
Author: alex.guizar at jboss.com
Date: 2010-03-04 23:26:40 -0500 (Thu, 04 Mar 2010)
New Revision: 6210
Added:
jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/jbpm2787/
jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/jbpm2787/JBPM2787Test.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/resources/org/jbpm/jbpm2787/
jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/resources/org/jbpm/jbpm2787/gpd.xml
jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/resources/org/jbpm/jbpm2787/processdefinition.xml
Modified:
jbpm3/branches/jbpm-3.2-soa/modules/core/pom.xml
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/graph/node/Join.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/job/ExecuteNodeJob.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/jpdl/xml/JpdlParser.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/msg/db/DbMessageService.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/scheduler/def/CreateTimerAction.java
jbpm3/branches/jbpm-3.2-soa/pom.xml
Log:
JBPM-2787: end concurrent tokens on enter, check for active children of the parent token on execute
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/pom.xml 2010-03-04 13:17:09 UTC (rev 6209)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/pom.xml 2010-03-05 04:26:40 UTC (rev 6210)
@@ -168,19 +168,6 @@
</execution>
</executions>
</plugin>
-
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <argLine>${surefire.jvm.args}</argLine>
- <systemProperties>
- <property>
- <name>log4j.output.dir</name>
- <value>${project.build.directory}</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
</plugins>
</build>
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/graph/node/Join.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/graph/node/Join.java 2010-03-04 13:17:09 UTC (rev 6209)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/graph/node/Join.java 2010-03-05 04:26:40 UTC (rev 6210)
@@ -22,7 +22,6 @@
package org.jbpm.graph.node;
import java.util.Collection;
-import java.util.Date;
import java.util.Iterator;
import org.apache.commons.logging.Log;
@@ -97,137 +96,118 @@
public void enter(ExecutionContext executionContext) {
Token token = executionContext.getToken();
token.end(false);
+ token.setAbleToReactivateParent(true);
super.enter(executionContext);
}
public void execute(ExecutionContext executionContext) {
Token arrivingToken = executionContext.getToken();
- Token parentToken = arrivingToken.getParent();
- if (parentToken != null) {
- 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);
- log.debug("acquired " + lockMode + " lock on " + parentToken);
- }
- boolean reactivateParent;
+ // if this token is not able to reactivate the parent,
+ // there is no need to check anything
+ if (!arrivingToken.isAbleToReactivateParent()) return;
+ arrivingToken.setAbleToReactivateParent(false);
- // if this is a discriminator
- if (isDiscriminator) {
- // reactivate the parent when the first token arrives in the join
- reactivateParent = true;
+ 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);
+ log.debug(this + " acquires " + lockMode + " lock on " + parentToken);
+ }
+
+ boolean reactivateParent;
+ // if this is a discriminator
+ if (isDiscriminator) {
+ // reactivate the parent when the first token arrives in the join
+ reactivateParent = true;
+ }
+ // if a fixed set of tokenNames is specified at design time...
+ else if (tokenNames != null) {
+ // check reactivation on the basis of those tokenNames
+ reactivateParent = !parentToken.hasActiveChildren()
+ && mustParentBeReactivated(parentToken, tokenNames);
+ }
+ // if a script is specified
+ else if (script != null) {
+ // check if the script returns a collection or a boolean
+ Object result = null;
+ try {
+ result = script.eval(arrivingToken);
}
- // if a fixed set of tokenNames is specified at design time...
- else if (tokenNames != null) {
- // check reactivation on the basis of those tokenNames
- reactivateParent = mustParentBeReactivated(parentToken, tokenNames)
- && isLastToArrive(arrivingToken, tokenNames);
+ catch (Exception e) {
+ raiseException(e, executionContext);
}
- // if a script is specified
- else if (script != null) {
- // check if the script returns a collection or a boolean
- Object result = null;
- try {
- result = script.eval(arrivingToken);
- }
- catch (Exception e) {
- raiseException(e, executionContext);
- }
- // if the result is a collection
- if (result instanceof Collection) {
- // interpret as a collection of token names
- Collection tokenNames = (Collection) result;
- reactivateParent = mustParentBeReactivated(parentToken, tokenNames)
- && isLastToArrive(arrivingToken, tokenNames);
- }
- // if it is a boolean...
- else if (result instanceof Boolean) {
- // the boolean specifies if the parent needs to be reactivated
- reactivateParent = ((Boolean) result).booleanValue();
- }
- // any other object
- else {
- // non-null result means the parent needs to be reactivated
- reactivateParent = result != null;
- }
+ // if the result is a collection
+ if (result instanceof Collection) {
+ // interpret as a collection of token names
+ Collection tokenNames = (Collection) result;
+ reactivateParent = !parentToken.hasActiveChildren()
+ && mustParentBeReactivated(parentToken, tokenNames);
}
- // if a nOutOfM is specified
- else if (nOutOfM != -1) {
- int n = 0;
- // check how many tokens already arrived in the join
- for (Iterator iter = parentToken.getChildren().values().iterator(); iter.hasNext();) {
- Token concurrentToken = (Token) iter.next();
- if (equals(concurrentToken.getNode())) n++;
- }
- reactivateParent = n >= nOutOfM;
+ // if it is a boolean...
+ else if (result instanceof Boolean) {
+ // the boolean specifies if the parent needs to be reactivated
+ reactivateParent = ((Boolean) result).booleanValue();
}
- // if no configuration is specified
+ // any other object
else {
- // check all concurrent tokens and reactivate the parent
- // when the last token arrives in the join
- Collection tokenNames = parentToken.getChildren().keySet();
- reactivateParent = mustParentBeReactivated(parentToken, tokenNames)
- && isLastToArrive(arrivingToken, tokenNames);
+ // non-null result means the parent needs to be reactivated
+ reactivateParent = result != null;
}
+ }
+ // if a nOutOfM is specified
+ else if (nOutOfM != -1) {
+ int n = 0;
+ // check how many tokens already arrived in the join
+ for (Iterator iter = parentToken.getChildren().values().iterator(); iter.hasNext();) {
+ Token concurrentToken = (Token) iter.next();
+ if (equals(concurrentToken.getNode())) n++;
+ }
+ reactivateParent = n >= nOutOfM;
+ }
+ // if no configuration is specified
+ else {
+ // check all concurrent tokens and reactivate the parent
+ // when the last token arrives in the join
+ Collection tokenNames = parentToken.getChildren().keySet();
+ reactivateParent = !parentToken.hasActiveChildren()
+ && mustParentBeReactivated(parentToken, tokenNames);
+ }
- // if the parent token needs to be reactivated from this join node
- if (reactivateParent) {
- // write to all child tokens that the parent is already reactivated
- for (Iterator iter = parentToken.getChildren().values().iterator(); iter.hasNext();) {
- Token concurrentToken = (Token) iter.next();
- concurrentToken.setAbleToReactivateParent(false);
- }
- // leave the join node
- leave(new ExecutionContext(parentToken));
+ // if the parent token is to leave this node
+ if (reactivateParent) {
+ // ensure concurrent tokens are unable to reactivate the parent
+ for (Iterator iter = parentToken.getChildren().values().iterator(); iter.hasNext();) {
+ Token concurrentToken = (Token) iter.next();
+ concurrentToken.setAbleToReactivateParent(false);
}
+ // leave the join node
+ leave(new ExecutionContext(parentToken));
}
}
- private boolean mustParentBeReactivated(Token parentToken,
- Collection childTokenNames) {
+ private boolean mustParentBeReactivated(Token parentToken, Collection childTokenNames) {
return mustParentBeReactivated(parentToken, childTokenNames.iterator());
}
- public boolean mustParentBeReactivated(Token parentToken,
- Iterator childTokenNames) {
+ public boolean mustParentBeReactivated(Token parentToken, Iterator childTokenNames) {
while (childTokenNames.hasNext()) {
String childTokenName = (String) childTokenNames.next();
Token childToken = parentToken.getChild(childTokenName);
if (childToken.isAbleToReactivateParent()) {
- log.debug(parentToken + " will not leave " + this + ", " + childToken
- + " can still reactivate parent");
+ log.debug(parentToken + " does not leave " + this + " as " + childToken
+ + " can still reactivate it");
return false;
}
}
return true;
}
- private boolean isLastToArrive(Token arrivingToken,
- Collection concurrentTokenNames) {
- Date enterDate = arrivingToken.getNodeEnter();
- Token parentToken = arrivingToken.getParent();
- for (Iterator i = concurrentTokenNames.iterator(); i.hasNext();) {
- String concurrentTokenName = (String) i.next();
- Token concurrentToken = (Token) parentToken.getChild(concurrentTokenName);
- if (arrivingToken.equals(concurrentToken)
- || !equals(concurrentToken.getNode())) continue;
-
- Date concurrentEnterDate = concurrentToken.getNodeEnter();
- if (enterDate.before(concurrentEnterDate)) {
- log.debug(parentToken + " will not leave " + this + ", "
- + arrivingToken + " was not the last to arrive");
- return false;
- }
- }
- return true;
- }
-
public String getParentLockMode() {
return parentLockMode;
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/job/ExecuteNodeJob.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/job/ExecuteNodeJob.java 2010-03-04 13:17:09 UTC (rev 6209)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/job/ExecuteNodeJob.java 2010-03-05 04:26:40 UTC (rev 6210)
@@ -9,7 +9,7 @@
private static final long serialVersionUID = 1L;
- Node node;
+ private Node node;
public ExecuteNodeJob() {
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/jpdl/xml/JpdlParser.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/jpdl/xml/JpdlParser.java 2010-03-04 13:17:09 UTC (rev 6209)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/jpdl/xml/JpdlParser.java 2010-03-05 04:26:40 UTC (rev 6210)
@@ -128,7 +128,7 @@
URL schemaURL = classLoader.getResource(schemaResource);
if (schemaURL != null) {
String schemaLocation = schemaURL.toString();
- log.debug("schema resource found: " + schemaResource);
+ log.debug("found schema resource " + schemaResource);
schemaLocations.add(schemaLocation);
}
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/msg/db/DbMessageService.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/msg/db/DbMessageService.java 2010-03-04 13:17:09 UTC (rev 6209)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/msg/db/DbMessageService.java 2010-03-05 04:26:40 UTC (rev 6210)
@@ -21,8 +21,6 @@
*/
package org.jbpm.msg.db;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.jbpm.JbpmContext;
import org.jbpm.JbpmException;
import org.jbpm.db.JobSession;
@@ -52,13 +50,12 @@
}
public void close() {
+ // if messages were produced
if (hasProducedJobs && jobExecutor != null) {
- log.debug("messages were produced, job executor will be notified");
+ // notify job executor
synchronized (jobExecutor) {
jobExecutor.notify();
}
}
}
-
- private static Log log = LogFactory.getLog(DbMessageService.class);
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/scheduler/def/CreateTimerAction.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/scheduler/def/CreateTimerAction.java 2010-03-04 13:17:09 UTC (rev 6209)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/scheduler/def/CreateTimerAction.java 2010-03-05 04:26:40 UTC (rev 6210)
@@ -26,6 +26,7 @@
import org.dom4j.Element;
+import org.jbpm.JbpmContext;
import org.jbpm.JbpmException;
import org.jbpm.calendar.BusinessCalendar;
import org.jbpm.calendar.Duration;
@@ -42,13 +43,13 @@
public class CreateTimerAction extends Action {
private static final long serialVersionUID = 1L;
- static final BusinessCalendar businessCalendar = new BusinessCalendar();
+ private static final BusinessCalendar businessCalendar = new BusinessCalendar();
- String timerName;
- String dueDate;
- String repeat;
- String transitionName;
- Action timerAction;
+ private String timerName;
+ private String dueDate;
+ private String repeat;
+ private String transitionName;
+ private Action timerAction;
public void read(Element actionElement, JpdlXmlReader jpdlReader) {
timerName = actionElement.attributeValue("name");
@@ -73,9 +74,20 @@
}
public void execute(ExecutionContext executionContext) throws Exception {
+ // grab jbpm context
+ JbpmContext jbpmContext = executionContext.getJbpmContext();
+ if (jbpmContext == null) {
+ throw new JbpmException("jbpm context unavailable");
+ }
+ // retrieve scheduler service
+ SchedulerService schedulerService = jbpmContext
+ .getServices()
+ .getSchedulerService();
+ if (schedulerService == null) {
+ throw new JbpmException("scheduler service unavailable");
+ }
+ // schedule timer
Timer timer = createTimer(executionContext);
- SchedulerService schedulerService =
- executionContext.getJbpmContext().getServices().getSchedulerService();
schedulerService.createTimer(timer);
}
@@ -93,13 +105,11 @@
if (dueDate.startsWith("#{")) {
int braceIndex = dueDate.indexOf("}");
if (braceIndex == -1) {
- throw new JbpmException("invalid due date, closing brace missing: "
- + dueDate);
+ throw new JbpmException("invalid due date, closing brace missing: " + dueDate);
}
String baseDateEL = dueDate.substring(0, braceIndex + 1);
- Object result =
- JbpmExpressionEvaluator.evaluate(baseDateEL, executionContext);
+ Object result = JbpmExpressionEvaluator.evaluate(baseDateEL, executionContext);
Date baseDate;
if (result instanceof Date) {
@@ -109,28 +119,24 @@
baseDate = ((Calendar) result).getTime();
}
else {
- throw new JbpmException("invalid base date type: "
- + result.getClass().getName());
+ throw new JbpmException("invalid base date type: " + result.getClass().getName());
}
String durationString = dueDate.substring(braceIndex + 1).trim();
if (durationString.length() > 0) {
char durationSeparator = durationString.charAt(0);
if (durationSeparator != '+' && durationSeparator != '-') {
- throw new JbpmException("invalid due date, + or - missing: "
- + dueDate);
+ throw new JbpmException("invalid due date, + or - missing: " + dueDate);
}
durationString = dueDate.substring(braceIndex + 1).trim();
- dueDateDate =
- businessCalendar.add(baseDate, new Duration(durationString));
+ dueDateDate = businessCalendar.add(baseDate, new Duration(durationString));
}
else {
dueDateDate = baseDate;
}
}
else {
- dueDateDate =
- businessCalendar.add(Clock.getCurrentTime(), new Duration(dueDate));
+ dueDateDate = businessCalendar.add(Clock.getCurrentTime(), new Duration(dueDate));
}
timer.setDueDate(dueDateDate);
}
Added: jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/jbpm2787/JBPM2787Test.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/jbpm2787/JBPM2787Test.java (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/jbpm2787/JBPM2787Test.java 2010-03-05 04:26:40 UTC (rev 6210)
@@ -0,0 +1,82 @@
+/*
+ * 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.jbpm2787;
+
+import org.jbpm.db.AbstractDbTestCase;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ProcessInstance;
+
+/**
+ * Process instances get stuck in a fork.
+ *
+ * @author Alejandro Guizar
+ * @see <a href="https://jira.jboss.org/jira/browse/JBPM-2787">JBPM-2787</a>
+ */
+public class JBPM2787Test extends AbstractDbTestCase {
+
+ private long processDefinitionId;
+
+ private static final int TIMEOUT = 60 * 1000;
+ private static final int INSTANCE_COUNT = 10;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ String dialect = getHibernateDialect();
+ if (dialect.indexOf("DB2") == -1 // [JBPM-2115] multiple threads not supported on DB2 < 9.7
+ && dialect.indexOf("HSQL") == -1) { // multiple threads will not be supported on HSQL
+ jbpmConfiguration.getJobExecutor().setNbrOfThreads(4);
+ }
+
+ ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource("org/jbpm/jbpm2787/processdefinition.xml");
+ jbpmContext.deployProcessDefinition(processDefinition);
+ processDefinitionId = processDefinition.getId();
+ newTransaction();
+ }
+
+ protected void tearDown() throws Exception {
+ graphSession.deleteProcessDefinition(processDefinitionId);
+
+ jbpmConfiguration.getJobExecutor().setNbrOfThreads(1);
+ super.tearDown();
+ }
+
+ public void testJobExecutorDeadlock() {
+ long[] processInstanceIds = new long[INSTANCE_COUNT];
+ for (int i = 0; i < INSTANCE_COUNT; i++) {
+ ProcessInstance processInstance = jbpmContext.newProcessInstance("prequalification");
+ processInstance.signal();
+ jbpmContext.save(processInstance);
+
+ newTransaction();
+ processInstanceIds[i] = processInstance.getId();
+ }
+
+ processJobs(TIMEOUT);
+
+ for (int i = 0; i < INSTANCE_COUNT; i++) {
+ ProcessInstance processInstance = jbpmContext.loadProcessInstance(processInstanceIds[i]);
+ assertTrue("expected " + processInstance + " to have ended", processInstance.hasEnded());
+ }
+ }
+
+}
Property changes on: jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/jbpm2787/JBPM2787Test.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ native
Added: jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/resources/org/jbpm/jbpm2787/gpd.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/resources/org/jbpm/jbpm2787/gpd.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/resources/org/jbpm/jbpm2787/gpd.xml 2010-03-05 04:26:40 UTC (rev 6210)
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<root-container name="prequalification" width="883" height="1236">
+ <node name="StartPrequalification" x="379" y="46" width="165" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="fork1" x="360" y="279" width="205" height="24">
+ <edge>
+ <label x="-167" y="-14"/>
+ </edge>
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="fork2" x="224" y="524" width="136" height="24">
+ <edge>
+ <label x="-51" y="-9"/>
+ </edge>
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="join1" x="211" y="712" width="161" height="24">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="join2" x="526" y="792" width="158" height="24">
+ <edge>
+ <label x="-80" y="-9"/>
+ </edge>
+ </node>
+ <node name="ChooseLocalLoopType" x="527" y="864" width="157" height="36">
+ <edge>
+ <label x="12" y="-10"/>
+ </edge>
+ </node>
+ <node name="ChooseCentralType" x="221" y="785" width="142" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="Reply" x="540" y="1112" width="132" height="36">
+ <edge>
+ <label x="-50" y="-9"/>
+ </edge>
+ </node>
+ <node name="CheckCache" x="395" y="191" width="132" height="36">
+ <edge>
+ <label x="-120" y="-12"/>
+ </edge>
+ <edge>
+ <label x="5" y="-10"/>
+ <bendpoint w1="321" h1="0" w2="176" h2="-921"/>
+ <bendpoint w1="321" h1="921" w2="176" h2="0"/>
+ </edge>
+ </node>
+ <node name="LookupCentralOffice" x="218" y="364" width="147" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="LookupConnection" x="536" y="511" width="139" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="LocateBSACentral" x="62" y="623" width="134" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="FindCentralRequestMapper" x="201" y="438" width="181" height="36">
+ <edge>
+ <label x="-4" y="-196"/>
+ <bendpoint w1="-246" h1="0" w2="-247" h2="-346"/>
+ <bendpoint w1="-246" h1="347" w2="-247" h2="1"/>
+ </edge>
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="LocateColocCentral" x="220" y="622" width="143" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="StoreResult" x="389" y="1044" width="132" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="StoreResultRequestMapper" x="503" y="959" width="204" height="36">
+ <edge>
+ <label x="-62" y="-4"/>
+ </edge>
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="LocateEBSACentral" x="392" y="621" width="132" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="InitializeVariables" x="383" y="118" width="158" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="EndPrequalification" x="516" y="1199" width="181" height="36"/>
+</root-container>
Property changes on: jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/resources/org/jbpm/jbpm2787/gpd.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ native
Added: jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/resources/org/jbpm/jbpm2787/processdefinition.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/resources/org/jbpm/jbpm2787/processdefinition.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/resources/org/jbpm/jbpm2787/processdefinition.xml 2010-03-05 04:26:40 UTC (rev 6210)
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process-definition xmlns="" name="prequalification">
+
+ <start-state name="StartPrequalification">
+ <transition to="InitializeVariables" />
+ </start-state>
+
+ <fork name="fork1">
+ <transition to="LookupCentralOffice" name="to LookupCentralOffice" />
+ <transition to="LookupConnection" name="to LookupConnection" />
+ </fork>
+
+ <fork name="fork2">
+ <transition to="LocateBSACentral" name="to FindBSA" />
+ <transition to="LocateColocCentral" name="to FindColoc" />
+ <transition to="LocateEBSACentral" name="to FindEBSA" />
+ </fork>
+
+ <join name="join1" async="true">
+ <transition to="ChooseCentralType" />
+ </join>
+
+ <join name="join2" async="true">
+ <transition to="ChooseLocalLoopType" />
+ </join>
+
+ <node name="ChooseLocalLoopType">
+ <transition to="StoreResultRequestMapper" />
+ </node>
+
+ <node name="ChooseCentralType">
+ <transition to="join2" />
+ </node>
+
+ <node name="Reply">
+ <transition to="EndPrequalification" />
+ </node>
+
+ <decision name="CheckCache" expression="PerformPrequalification">
+ <transition to="fork1" name="PerformPrequalification" />
+ <transition to="Reply" name="to Reply" />
+ </decision>
+
+ <node name="LookupCentralOffice" async="true">
+ <action class="org.jbpm.mock.EsbActionHandler">
+ <esbServiceName>LookupCentralOffice</esbServiceName>
+ <esbCategoryName>dk.telenor.esb.harlequin.tdc.columbine</esbCategoryName>
+ <bpmToEsbVars>
+ <mapping bpm="contactInfoXML" esb="body.'dk.telenor.esb.harlequin.tdc.columbine.InputPayload'" />
+ </bpmToEsbVars>
+ <esbToBpmVars>
+ <mapping bpm="lookupCentralXML" esb="body.'dk.telenor.esb.harlequin.tdc.columbine.OutputPayload'" />
+ </esbToBpmVars>
+ </action>
+ <transition to="FindCentralRequestMapper" />
+ </node>
+
+ <node name="LookupConnection" async="true">
+ <action class="org.jbpm.mock.EsbActionHandler">
+ <esbServiceName>LookupConnection</esbServiceName>
+ <esbCategoryName>dk.telenor.esb.harlequin.tdc.columbine</esbCategoryName>
+ <bpmToEsbVars>
+ <mapping bpm="contactInfoXML" esb="body.'dk.telenor.esb.harlequin.tdc.columbine.InputPayload'" />
+ </bpmToEsbVars>
+ <esbToBpmVars>
+ <mapping bpm="connectionXML" esb="body.'dk.telenor.esb.harlequin.tdc.columbine.OutputPayload'" />
+ </esbToBpmVars>
+ </action>
+ <transition to="join2" />
+ </node>
+
+ <node name="LocateBSACentral" async="true">
+ <action class="org.jbpm.mock.EsbActionHandler">
+ <esbServiceName>LocateCentralOffice</esbServiceName>
+ <esbCategoryName>dk.telenor.esb.ods.geodata</esbCategoryName>
+ <bpmToEsbVars>
+ <mapping bpm="bsaCentralXML" esb="body.'dk.telenor.esb.ods.geodata.InputPayload'" />
+ </bpmToEsbVars>
+ <esbToBpmVars>
+ <mapping bpm="bsaCentralXML" esb="body.'dk.telenor.esb.ods.geodata.OutputPayload'" />
+ </esbToBpmVars>
+ </action>
+ <transition to="join1" />
+ </node>
+
+ <decision name="FindCentralRequestMapper" expression="to FindCentrals">
+ <transition to="ChooseCentralType" name="to ChooseCentralType" />
+ <transition to="fork2" name="to FindCentrals" />
+ </decision>
+
+ <node name="LocateColocCentral" async="true">
+ <action class="org.jbpm.mock.EsbActionHandler">
+ <esbServiceName>LocateCentralOffice</esbServiceName>
+ <esbCategoryName>dk.telenor.esb.ods.geodata</esbCategoryName>
+ <bpmToEsbVars>
+ <mapping bpm="colocCentralXML" esb="body.'dk.telenor.esb.ods.geodata.InputPayload'" />
+ </bpmToEsbVars>
+ <esbToBpmVars>
+ <mapping bpm="colocCentralXML" esb="body.'dk.telenor.esb.ods.geodata.OutputPayload'" />
+ </esbToBpmVars>
+ </action>
+ <transition to="join1" />
+ </node>
+
+ <node name="StoreResult">
+ <event type="node-leave">
+ <action name="StoreResult" class="org.jbpm.mock.EsbActionHandler">
+ <esbServiceName>StoreResourceOrder</esbServiceName>
+ <esbCategoryName>dk.telenor.esb.harlequin.resourceorder</esbCategoryName>
+ <bpmToEsbVars>
+ <mapping bpm="prequalificationXML" esb="body.'dk.telenor.esb.harlequin.resourceorder.InputPayload'" />
+ <mapping bpm="storeStatus"
+ esb="body.'dk.telenor.esb.harlequin.resourceorder.InternalPayloadStatus'" />
+ <mapping bpm="transactionId"
+ esb="body.'dk.telenor.esb.harlequin.resourceorder.InternalPayloadTransactionId'" />
+ </bpmToEsbVars>
+ </action>
+ </event>
+ <transition to="Reply" />
+ </node>
+
+ <decision name="StoreResultRequestMapper" expression="to Reply">
+ <transition to="StoreResult" name="to StoreResult" />
+ <transition to="Reply" name="to Reply" />
+ </decision>
+
+ <node name="LocateEBSACentral" async="true">
+ <action class="org.jbpm.mock.EsbActionHandler">
+ <esbServiceName>LocateCentralOffice</esbServiceName>
+ <esbCategoryName>dk.telenor.esb.ods.geodata</esbCategoryName>
+ <bpmToEsbVars>
+ <mapping bpm="ebsaCentralXML" esb="body.'dk.telenor.esb.ods.geodata.InputPayload'" />
+ </bpmToEsbVars>
+ <esbToBpmVars>
+ <mapping bpm="ebsaCentralXML" esb="body.'dk.telenor.esb.ods.geodata.OutputPayload'" />
+ </esbToBpmVars>
+ </action>
+ <transition to="join1" />
+ </node>
+
+ <node name="InitializeVariables">
+ <transition to="CheckCache" />
+ </node>
+
+ <end-state name="EndPrequalification" />
+
+</process-definition>
\ No newline at end of file
Property changes on: jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/resources/org/jbpm/jbpm2787/processdefinition.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ native
Modified: jbpm3/branches/jbpm-3.2-soa/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/pom.xml 2010-03-04 13:17:09 UTC (rev 6209)
+++ jbpm3/branches/jbpm-3.2-soa/pom.xml 2010-03-05 04:26:40 UTC (rev 6210)
@@ -337,6 +337,19 @@
<target>1.4</target>
</configuration>
</plugin>
+
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>${surefire.jvm.args}</argLine>
+ <systemProperties>
+ <property>
+ <name>log4j.output.dir</name>
+ <value>${project.build.directory}</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </plugin>
</plugins>
</build>
More information about the jbpm-commits
mailing list