[JBoss JIRA] Created: (JBPM-2608) JobSession.findJobsWithOverdueLockTime returns incorrect list of overdue jobs for LockMonitorThread
by Martin Putz (JIRA)
JobSession.findJobsWithOverdueLockTime returns incorrect list of overdue jobs for LockMonitorThread
---------------------------------------------------------------------------------------------------
Key: JBPM-2608
URL: https://jira.jboss.org/jira/browse/JBPM-2608
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: jBPM 3.2.7, jBPM 3.2.8
Reporter: Martin Putz
Assignee: Alejandro Guizar
Fix For: jBPM 3.2.9
In org.jbpm.job.executor.LockMonitorThread#unlockOverdueJobs(), the list of overdue jobs to be unlocked is queried the following way:
Date threshold = new Date(System.currentTimeMillis() - maxLockTime - lockBufferTime);
List overdueJobs = jbpmContext.getJobSession().findJobsWithOverdueLockTime(threshold);
But the query is incorrect, as it returns all jobs where the lockTime is bigger than the threshold, which means that the job has been locked shorter than (maxLockTime + lockBufferTime):
<query name="JobSession.findJobsWithOverdueLockTime">
<![CDATA[
select job
from org.jbpm.job.Job as job
where job.lockTime > :threshold
]]>
</query>
As a result, the LockMonitorThread will set the lockTime and lockOwner to null, where the same Job instance is also updated by a JobExecutorThread, which will lead to a StaleObjectStateException:
ERROR [org.hibernate.event.def.AbstractFlushingEventListener] (JbpmJobExector:LockMonitorThread@169.1.1.1)
Could not synchronize database state with session
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction
(or unsaved-value mapping was incorrect): [org.jbpm.job.ExecuteActionJob#123]
The 'where' clause in the query needs to be reversed:
Index: modules/core/src/main/resources/org/jbpm/db/hibernate.queries.hbm.xml
===================================================================
--- modules/core/src/main/resources/org/jbpm/db/hibernate.queries.hbm.xml (revision 5825)
+++ modules/core/src/main/resources/org/jbpm/db/hibernate.queries.hbm.xml (working copy)
@@ -385,7 +385,7 @@
<![CDATA[
select job
from org.jbpm.job.Job as job
- where job.lockTime > :threshold
+ where job.lockTime < :threshold
]]>
</query>
--
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
[JBoss JIRA] Created: (JBPM-2491) Deleting a ProcessInstance having a running Sub-ProcessInstance fails
by Flavio Donzé (JIRA)
Deleting a ProcessInstance having a running Sub-ProcessInstance fails
---------------------------------------------------------------------
Key: JBPM-2491
URL: https://jira.jboss.org/jira/browse/JBPM-2491
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.0
Reporter: Flavio Donzé
When trying to delete a ProcessInstance using ExecutionService.deleteProcessInstance() an SQLException is thrown if the ProcessInstance has a running Sub-ProcessInstance.
Trying to delete the Sub-ProcessInstance first doesn't work either.
The problem here are the foreign key constraints:
Deleting the super process:
org.postgresql.util.PSQLException: ERROR: update or delete on table "jbpm4_execution" violates foreign key constraint "fk_exec_superexec" on table "jbpm4_execution"
Detail: Key (dbid_)=(176) is still referenced from table "jbpm4_execution".
Deleting the sub process:
org.postgresql.util.PSQLException: ERROR: update or delete on table "jbpm4_execution" violates foreign key constraint "fk_exec_subpi" on table "jbpm4_execution"
Detail: Key (dbid_)=(179) is still referenced from table "jbpm4_execution".
Maybe loosen up the sub>super constraint?
--
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, 1 month
[JBoss JIRA] Created: (JBPM-2606) Process files not suffixed with .jpdl.xml are not loaded correctly
by Paul Smith (JIRA)
Process files not suffixed with .jpdl.xml are not loaded correctly
------------------------------------------------------------------
Key: JBPM-2606
URL: https://jira.jboss.org/jira/browse/JBPM-2606
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: jBPM 4.1
Environment: Windows XP using JBPM4.1
Reporter: Paul Smith
If you try to deploy a process definition in a file that is not suffixed with .jpdl.xml then then the process is not deployed correctly. I have demonstrated this with the code in the attached jar file. There are two identical processes one called helloWorldOK and one called helloWorldBroken. One is in a file suffixed as .jpdl.xml and the other suffixed as _jpdl.xml. Both files seem to deploy correctly but when one tries to perform a startProcessInstanceByKey the process contained in the file suffixed by _jpdl.xml cannot be located. I have tried this with other file suffixes but it seems the file MUST be suffixed with .jpdl.xml. The name of the file should be irrelevant as all information is contained in the xml.
--
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, 1 month
[JBoss JIRA] Created: (JBPM-2595) introduce an attribute "description" for transitions and show it in the process diagram
by Sebastian Schneider (JIRA)
introduce an attribute "description" for transitions and show it in the process diagram
---------------------------------------------------------------------------------------
Key: JBPM-2595
URL: https://jira.jboss.org/jira/browse/JBPM-2595
Project: jBPM
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Runtime Engine
Reporter: Sebastian Schneider
Priority: Minor
Fix For: jBPM 4.3
Normally I prefer to use short "kind of technical" names for the transitions but I would rather have a long name or a description in the process diagram which is shown by the console.
So my suggestion is to add an attribute description to transitions and to display the transitions' descriptions instead of their names in the diagram. If the description is not set or empty the name could be displayed instead. By the term description I don't mean a long text but rather a long user friendly name for the transition in contrast to a short technical one.
--
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, 1 month