[JBoss JIRA] Created: (JBPM-1185) Node, State and ProcessState don't support Conditions on Transitions
by Britt Miner (JIRA)
Node, State and ProcessState don't support Conditions on Transitions
--------------------------------------------------------------------
Key: JBPM-1185
URL: http://jira.jboss.com/jira/browse/JBPM-1185
Project: JBoss jBPM
Issue Type: Bug
Components: Core Engine
Affects Versions: jBPM jPDL 3.2.2
Reporter: Britt Miner
Assigned To: Tom Baeyens
Node, State, and ProcessState don't provide any preliminary check for conditions provided on transitions. No check is performed until the transition is signaled, at which point the process will barf if a condition is present on the default transition, and that condition evaluates to false.
Regardless if a person "should" be using transition conditions in Node or State, the schema allows it, the documentation doesn't forbid it, and the current behavior of a Transition element in the jpdl is inconsistent. The fix to make everything consistent is fairly simple--only org.jbpm.graph.def.Node needs to really be altered (and a one-liner in ProcessState):
In org.jbpm.graph.def.Node, add the following method:
// BRITT--
public Transition calculateLeavingTransition(ExecutionContext executionContext) {
Transition transition = null;
boolean hasTransitioned = false;
Iterator iter = leavingTransitions.iterator();
while (iter.hasNext()) {
Transition candidate = (Transition) iter.next();
String conditionExpression = candidate.getCondition();
if (conditionExpression != null) {
Object result = JbpmExpressionEvaluator.evaluate(conditionExpression, executionContext);
if (Boolean.TRUE.equals(result)) {
transition = candidate;
}
} else {
transition = candidate;
}
}
if (!hasTransitioned) {
this.getDefaultLeavingTransition().removeConditionEnforcement();
log.warn("All transition conditions have evaluated to 'false'. Taking the default transition.");
transition = this.getDefaultLeavingTransition();
}
return transition;
}
// --BRITT
...and modify "leave(ExecutionContext executionContext)":
// BRITT --replace the following line with the code below
// to check conditions before selecting the transition to take...
//leave(executionContext, getDefaultLeavingTransition()); //original line
leave(executionContext, calculateLeavingTransition(executionContext));
// --BRITT
For consistency, ProcessState should also have one line modified at the very end of it's "leave(ExecutionContext, Transition)" method:
// BRITT-- rather than specify which transition, let the super class decide...
//super.leave(executionContext, getDefaultLeavingTransition());
super.leave(executionContext, calculateLeavingTransition(executionContext));
// --BRITT
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 9 months
[JBoss JIRA] Created: (JBPM-1471) Do not signal ENDED super process token when ending process instance
by Pavel Kadlec (JIRA)
Do not signal ENDED super process token when ending process instance
--------------------------------------------------------------------
Key: JBPM-1471
URL: https://jira.jboss.org/jira/browse/JBPM-1471
Project: JBoss jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: jPDL 3.2.3
Reporter: Pavel Kadlec
The path of execution of the super process token should not continue when the token was ended. If it is not tested, the ended super process token is signalled and the path of execution continues. I think it should not.
I suggest following fix to org.jbpm.graph.exe.ProcessInstance.end() method. There is one change in if statement bellow...
/**
* ends (=cancels) this process instance and all the tokens in it.
*/
public void end() {
// end the main path of execution
rootToken.end();
if (end==null) {
// mark this process instance as ended
end = Clock.getCurrentTime();
// fire the process-end event
ExecutionContext executionContext = new ExecutionContext(rootToken);
processDefinition.fireEvent(Event.EVENTTYPE_PROCESS_END, executionContext);
// add the process instance end log
rootToken.addLog(new ProcessInstanceEndLog());
// check if this process was started as a subprocess of a super process
if (superProcessToken!=null && !superProcessToken.hasEnded()) { // THIS IS THE FIX, TEST IF SUPER PROCESS TOKEN HAS ENDED
addCascadeProcessInstance(superProcessToken.getProcessInstance());
ExecutionContext superExecutionContext = new ExecutionContext(superProcessToken);
superExecutionContext.setSubProcessInstance(this);
superProcessToken.signal(superExecutionContext);
}
// make sure all the timers for this process instance are cancelled when the process end updates get saved in the database.
// TODO route this directly through the jobSession. just like the suspend and resume.
// NOTE Only timers should be deleted, messages-type of jobs should be kept.
SchedulerService schedulerService = (SchedulerService) Services.getCurrentService(Services.SERVICENAME_SCHEDULER, false);
if (schedulerService!=null) schedulerService.deleteTimersByProcessInstance(this);
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 10 months
[JBoss JIRA] Created: (JBPM-1686) NPE when reading a process definition with a decision name which contains the "/" character
by Julien Kronegg (JIRA)
NPE when reading a process definition with a decision name which contains the "/" character
-------------------------------------------------------------------------------------------
Key: JBPM-1686
URL: https://jira.jboss.org/jira/browse/JBPM-1686
Project: JBoss jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: jPDL 3.2.2
Environment: JDK1.6.0, Eclipse 3.3
Reporter: Julien Kronegg
Priority: Minor
When a process definition is read and when it contains a decision named with a "/" character, a NullPointerException is raised:
import org.jbpm.graph.def.ProcessDefinition;
public class TestDecisionNPE {
public static final void main(String[] args){
ProcessDefinition.parseXmlString(
"<process-definition>" +
" <start-state>" +
" <transition to='d/e' />" +
" </start-state>" +
" <decision name='d/e'>" +
" <transition name='one' to='a'>" +
" <condition>#{a == 1}</condition>" +
" </transition>" +
" <transition name='three' to='c'>" +
" <condition>#{a == 3}</condition>" +
" </transition>" +
" </decision>" +
" <state name='a' />" +
" <state name='c' />" +
"</process-definition>");
}
}
raises:
GRAVE: couldn't parse process definition
java.lang.NullPointerException
at org.jbpm.graph.def.ProcessDefinition.findNode(ProcessDefinition.java:345)
at org.jbpm.graph.def.ProcessDefinition.findNode(ProcessDefinition.java:299)
at org.jbpm.jpdl.xml.JpdlXmlReader.resolveTransitionDestination(JpdlXmlReader.java:774)
at org.jbpm.jpdl.xml.JpdlXmlReader.resolveTransitionDestinations(JpdlXmlReader.java:740)
at org.jbpm.jpdl.xml.JpdlXmlReader.resolveTransitionDestinations(JpdlXmlReader.java:732)
at org.jbpm.jpdl.xml.JpdlXmlReader.readProcessDefinition(JpdlXmlReader.java:162)
at org.jbpm.graph.def.ProcessDefinition.parseXmlString(ProcessDefinition.java:151)
at test.TestDecisionNPE.main(TestDecisionNPE.java:7)
Exception in thread "main" org.jbpm.jpdl.JpdlException: [[ERROR] couldn't parse process definition]
at org.jbpm.jpdl.xml.JpdlXmlReader.readProcessDefinition(JpdlXmlReader.java:172)
at org.jbpm.graph.def.ProcessDefinition.parseXmlString(ProcessDefinition.java:151)
at test.TestDecisionNPE.main(TestDecisionNPE.java:7)
This is due to a "node = nodeCollection.getNode(namePart);" in ProcessDefinition.findNode(): a Decision has no nodes, so the nodeCollection is null.
It should be :
1. a more descriptive exception message, such as "could not get the node with name XXX"
2. a validation step which prevent the node name to contain "/" characters, e.g. throw an exception "the node name cannot contain a "/" character"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 10 months
[JBoss JIRA] Created: (JBPM-1280) QA job executor
by Tom Baeyens (JIRA)
QA job executor
---------------
Key: JBPM-1280
URL: http://jira.jboss.com/jira/browse/JBPM-1280
Project: JBoss jBPM
Issue Type: Task
Security Level: Public (Everyone can see)
Components: PVM
Reporter: Tom Baeyens
First, we need to establish what we're going to QA and how. I see 3 distinct types of tests for the job executor
1) Using JobSession to create jobs and then use the JobExecutor API's to control the execution of those jobs. This way, all these tests can and should be done in a single thread.
* a commit for processing an asynchronous message
* a commit for processing a timer
* a commit for the combination of a an asynchronous message and a timer
* a commit with a custom resource in the standard transaction
* test a rollback caused by a user code exception in an asynchronous continuation
* test a rollback caused by a user code exception in an timer
* test a rollback caused by a user code exception with a custom resource in the standard transaction
* test a rollback caused by an optimistic locking exception in an asynchronous continuation
* test a rollback caused by an optimistic locking exception in an timer
* test a rollback caused by an optimistic locking with a custom resource in the standard transaction
2) If we only use the public, stable API's, we'll be a lot more limited in what we're able to test. We can e.g. run this test suite against the jBPM 3 codebase.
* create and execute a process with a couple of asynchronous continuation in it.
* create and execute a process with asynchronous continuations in a concurrent section.
* create and execute a process with a couple of timers in it.
* create and execute a process with a couple of timers in a concurrent section
* a combination of a timer and an asynchronous continuation
3) Load and stress tests. Also these should only make use of public API's and ways to deploy processes. So that this test suite is configurable/runnable on different environments (and also against the jBPM 3 codebase)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 10 months
[JBoss JIRA] Created: (JBPM-1141) The jBPM 'websale' sample application fails - project JIRA for SOA-446
by Len DiMaggio (JIRA)
The jBPM 'websale' sample application fails - project JIRA for SOA-446
----------------------------------------------------------------------
Key: JBPM-1141
URL: http://jira.jboss.com/jira/browse/JBPM-1141
Project: JBoss jBPM
Issue Type: Bug
Components: Training
Affects Versions: jBPM jPDL 3.2.2
Environment: JBoss Developer Studio
Build id: 1.0.0.GA
SOA-P GA
/opt/GA/soa-4.2.0.GA.zip
/opt/GA/standalone-soa-4.2.0.GA.zip
RHEL5
Linux ldimaggi.csb 2.6.18-53.1.13.el5 #1 SMP Mon Feb 11 13:27:52 EST 2008 i686 i686 i386 GNU/Linux
Sun Java 1.5
java version "1.5.0_14"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
Java HotSpot(TM) Client VM (build 1.5.0_14-b03, mixed mode)
RDBMS
H2, version: 1.0.66 (2008-01-18)
CPU
cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 13
model name : Intel(R) Pentium(R) M processor 1.70GHz
stepping : 6
cpu MHz : 1700.000
cache size : 2048 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr mce cx8 mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe up est tm2
bogomips : 3398.35
Reporter: Len DiMaggio
Assigned To: Tom Baeyens
Details are in:
http://jira.jboss.com/jira/browse/SOA-446
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 10 months