[JBoss JIRA] Created: (JBPM-2537) A triggered timer does not end the task which is left
by Alexis Seigneurin (JIRA)
A triggered timer does not end the task which is left
-----------------------------------------------------
Key: JBPM-2537
URL: https://jira.jboss.org/jira/browse/JBPM-2537
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.0, jBPM 4.1
Reporter: Alexis Seigneurin
In my process definition, "task1" has a transition with a due date. When this timer is triggered by the job executor, the transition takes the process to "task2" but "task1" still looks active. For instance, when I run a "task query", instead of only finding "task2", both "task1" and "task2" are found.
Here is my process definition:
<?xml version="1.0" encoding="UTF-8"?>
<process name="test1" xmlns="http://jbpm.org/4.0/jpdl">
<start g="-9,192,48,48" name="start1">
<transition g="-44,-18" name="to task3" to="task3" />
</start>
<end g="490,192,48,48" name="end1" />
<task g="272,189,92,52" name="task1">
<transition g="-42,-18" name="to end1" to="end1" />
<transition g="-45,-18" name="to java1" to="reminder">
<timer duedate="10 seconds" />
</transition>
</task>
<java class="fr.idm.SimpleReminder" g="272,316,92,52" method="remind" name="reminder">
<transition to="task2" />
</java>
<end g="626,319,48,48" name="end2" />
<task g="454,316,92,52" name="task2">
<transition g="-42,-18" name="to end2" to="end2" />
</task>
<task g="113,189,92,52" name="task3">
<transition g="-44,-18" to="task1" name="to end1" />
</task>
</process>
For testing purpose, I introduced "task3" before "task1". It is not listed by the task query, which makes me think that, once "task1" is left, it should no longer be active.
This looks like https://jira.jboss.org/jira/browse/JBPM-967 but the suggested solution does not seem applicable to JBPM 4.x.
I will attached the whole source code.
--
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
14 years, 7 months
[JBoss JIRA] Created: (JBPM-2828) ContextInstance.deleteVariable() does not delete the variable from the database
by Martin Putz (JIRA)
ContextInstance.deleteVariable() does not delete the variable from the database
-------------------------------------------------------------------------------
Key: JBPM-2828
URL: https://jira.jboss.org/jira/browse/JBPM-2828
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: jBPM 3.2.8
Reporter: Martin Putz
Assignee: Martin Putz
A call to ContextInstance.deleteVariable(name) does not actually delete the variable from the database. Instead, in the VariableContainer.deleteVariable() method, only the references to the process execution are removed, and a new log entry is added. This can lead to orphaned records in the database.
The applied fix removes the variable instances from the database *if the logging service is disabled*. With the logging service enabled, the variable cannot be deleted right away, as the new VariableDeleteLog instance holds a reference to the variable. These records will eventually be deleted upon process instance deletion.
--
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
14 years, 7 months
[JBoss JIRA] Created: (JBPM-1162) Problem with exception handling within the Decision nodes
by Jon Folland (JIRA)
Problem with exception handling within the Decision nodes
---------------------------------------------------------
Key: JBPM-1162
URL: http://jira.jboss.com/jira/browse/JBPM-1162
Project: JBoss jBPM
Issue Type: Bug
Components: Core Engine
Affects Versions: jBPM jPDL 3.2.2
Environment: Vaio laptop running Windows Vista, Java 1.5, JBPM 3.2.2
Reporter: Jon Folland
Assigned To: Tom Baeyens
I believe there may be a bug in the Decision class where exception handling is concerned which causes this failure:
If the line: String transitionName = decisionHandler.decide(executionContext); ...
...in the method public void execute(ExecutionContext executionContext)
throws an exception, which is caught here in the same method:
raiseException(exception, executionContext);
We miss the block:
if (transition==null) {
transition = getDefaultLeavingTransition();
log.debug("decision didn't select transition, taking default "+transition);
}
So when executionContext.leaveNode(transition); is called at the bottom, there wil be no transition set.
I believe we need to check for a tranistion==null condition regardless of whether an excpetion has been handled. Otherwise you will never be able to handle an exception in a Decision without another unhandled exception being thrown (which kind of defeits the point :-)
--
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
14 years, 7 months
[JBoss JIRA] Created: (JBPM-2641) taskService.addTaskParticipatingUser adds multiple participations for a user
by Robert Moskal (JIRA)
taskService.addTaskParticipatingUser adds multiple participations for a user
----------------------------------------------------------------------------
Key: JBPM-2641
URL: https://jira.jboss.org/jira/browse/JBPM-2641
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Environment: JDK 1.6 HSQL
Reporter: Robert Moskal
Perhaps this is the intended behavior, but calling taskService.addTaskParticipatingUser with the same user creates multiple participates:
taskService.addTaskParticipatingUser(_task.getId(), "boss_rigging", Participation.CANDIDATE);
taskService.addTaskParticipatingUser(_task.getId(), "boss_rigging", Participation.CANDIDATE);
assertEquals(1,taskService.createTaskQuery().candidate("boss_rigging").activityName("Investigate").list().size());
The query comes back with two tasks. This is somewhat surprising.
--
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
14 years, 7 months
[JBoss JIRA] Created: (JBPM-2836) Process execution terminates with NullPointerException, when there is task with candidate-groups after join node in process definition.
by Jiri Mecner (JIRA)
Process execution terminates with NullPointerException, when there is task with candidate-groups after join node in process definition.
---------------------------------------------------------------------------------------------------------------------------------------
Key: JBPM-2836
URL: https://jira.jboss.org/jira/browse/JBPM-2836
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.3
Environment: Windows 2007, HSQL
Reporter: Jiri Mecner
Process execution terminates with NullPointerException, when there is task with candidate-groups after join node in process definition.
Example test case:
process.jpdl.xml
<?xml version="1.0" encoding="UTF-8"?>
<process name="TaskAfterJoinTest" xmlns="http://jbpm.org/4.3/jpdl">
<start g="16,60,48,48">
<transition to="fork"/>
</start>
<fork g="96,60,48,48" name="fork">
<transition g="120,41:" to="state1"/>
<transition to="state2" g="120,126:"/>
</fork>
<state g="176,16,149,52" name="state1">
<transition g="379,40:" to="join"/>
</state>
<state g="176,100,149,52" name="state2">
<transition to="join" g="382,125:"/>
</state>
<join g="357,60,48,48" name="join">
<transition to="task1"/>
</join>
<end g="561,60,48,48" name="end"/>
<task candidate-groups="sales-dept" g="437,58,92,52" name="task1">
<transition to="end"/>
</task>
</process>
TaskAfterJoinTest.java
public class TaskAfterJoinTest extends JbpmTestCase {
String deploymentId;
protected void setUp() throws Exception {
super.setUp();
deploymentId = repositoryService.createDeployment()
.addResourceFromClasspath("process.jpdl.xml")
.deploy();
}
protected void tearDown() throws Exception {
repositoryService.deleteDeploymentCascade(deploymentId);
super.tearDown();
}
public void test() {
ProcessInstance processInstance = executionService.startProcessInstanceByKey("TaskAfterJoinTest");
String pid = processInstance.getId();
Set<String> expectedActivityNames = new HashSet<String>();
expectedActivityNames.add("state1");
expectedActivityNames.add("state2");
assertEquals(expectedActivityNames, processInstance.findActiveActivityNames());
assertNotNull(processInstance.findActiveExecutionIn("state1"));
assertNotNull(processInstance.findActiveExecutionIn("state2"));
String state1Id = processInstance.findActiveExecutionIn("state1").getId();
processInstance = executionService.signalExecutionById(state1Id);
expectedActivityNames.remove("state1");
assertEquals(expectedActivityNames, processInstance.findActiveActivityNames());
assertNotNull(processInstance.findActiveExecutionIn("state2"));
String state2Id = processInstance.findActiveExecutionIn("state2").getId();
// HERE - it raises NullPointerException
processInstance = executionService.signalExecutionById(state2Id);
expectedActivityNames.remove("state1");
expectedActivityNames.remove("task1");
assertEquals(expectedActivityNames, processInstance.findActiveActivityNames());
assertNotNull(processInstance.findActiveExecutionIn("task1"));
String task1Id = processInstance.findActiveExecutionIn("task1").getId();
processInstance = executionService.signalExecutionById(task1Id);
assertNull("execution "+pid+" should not exist", executionService.findExecutionById(pid));
}
stack trace:
java.lang.NullPointerException
at org.jbpm.pvm.internal.wire.usercode.UserCodeReference.getProcessDefinition(UserCodeReference.java:75)
at org.jbpm.pvm.internal.wire.usercode.UserCodeReference.getObject(UserCodeReference.java:60)
at org.jbpm.pvm.internal.wire.usercode.UserCodeReference.getObject(UserCodeReference.java:51)
at org.jbpm.pvm.internal.model.ExecutionImpl.initializeAssignments(ExecutionImpl.java:759)
at org.jbpm.jpdl.internal.activity.TaskActivity.execute(TaskActivity.java:95)
at org.jbpm.jpdl.internal.activity.TaskActivity.execute(TaskActivity.java:58)
at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60)
at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:656)
at org.jbpm.pvm.internal.model.ExecutionImpl.fire(ExecutionImpl.java:566)
at org.jbpm.pvm.internal.model.ExecutionImpl.take(ExecutionImpl.java:472)
at org.jbpm.jpdl.internal.activity.JoinActivity.execute(JoinActivity.java:93)
at org.jbpm.jpdl.internal.activity.JoinActivity.execute(JoinActivity.java:49)
at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60)
at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:656)
at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:616)
at org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:417)
at org.jbpm.pvm.internal.cmd.SignalCmd.execute(SignalCmd.java:61)
at org.jbpm.pvm.internal.cmd.SignalCmd.execute(SignalCmd.java:35)
at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)
at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.signalExecutionById(ExecutionServiceImpl.java:84)
at TaskAfterJoinTest.test(TaskAfterJoinTest.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:164)
at org.jbpm.test.BaseJbpmTestCase.runTest(BaseJbpmTestCase.java:80)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
--
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
14 years, 7 months
[JBoss JIRA] Created: (JBPM-2835) HistroyDetail not saved in database.
by Arul Kalai (JIRA)
HistroyDetail not saved in database.
------------------------------------
Key: JBPM-2835
URL: https://jira.jboss.org/jira/browse/JBPM-2835
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.4
Reporter: Arul Kalai
Fix For: jBPM 4.4
JBPM version : 4.4-SNAPSHOT
org.jbpm.pvm.internal.history.model.HistoryTaskImpl
Newly created HistoryDetail is not added to the collection of the HistoryTaskImpl(Highlighted).
public void updated(TaskImpl task) {
if ( (assignee==null && task.getAssignee()!=null)
|| (assignee!=null) && (!assignee.equals(task.getAssignee()))
) {
addDetail(new HistoryTaskAssignmentImpl(assignee, task.getAssignee()));
this.assignee = task.getAssignee();
}
if (priority!=task.getPriority()) {
addDetail(new HistoryPriorityUpdateImpl(priority, task.getPriority()));
this.priority = task.getPriority();
}
if ( (duedate==null && task.getDuedate()!=null)
|| (duedate!=null) && (!duedate.equals(task.getDuedate()))
) {
addDetail(new HistoryTaskDuedateUpdateImpl(duedate, task.getDuedate()));
this.duedate = task.getDuedate();
}
}
// details //////////////////////////////////////////////////////////////////
public void addDetail(HistoryDetailImpl detail) {
detail.setHistoryTask(this, nextDetailIndex);
details.add(detail);
nextDetailIndex++;
}
--
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
14 years, 7 months