[JBoss JIRA] Resolved: (JBPM-575) delete Timer fails in Scheduler
by Alejandro Guizar (JIRA)
[ https://jira.jboss.org/jira/browse/JBPM-575?page=com.atlassian.jira.plugi... ]
Alejandro Guizar resolved JBPM-575.
-----------------------------------
Fix Version/s: (was: jBPM 3.3.1 GA)
Resolution: Duplicate Issue
The solution was not to delete timers (or execute-node-jobs) that are locked (that is, under execution) when a process instance ends. This solution includes the issue at hand, where execution of a timer reaches the end of the process instance.
> delete Timer fails in Scheduler
> -------------------------------
>
> Key: JBPM-575
> URL: https://jira.jboss.org/jira/browse/JBPM-575
> Project: JBoss jBPM
> Issue Type: Bug
> Components: Core Engine
> Affects Versions: jBPM 3.1.0
> Environment: jbpm 3.1, PostgreSQL / MS SQL Server / DB/2, jboss 4.0.4 RC1
> Reporter: maplat
> Assignee: Alejandro Guizar
> Original Estimate: 10 minutes
> Remaining Estimate: 10 minutes
>
> if a timer is scheduled, which execution leeds to the process end, the timer can not be deleted,
> because at the end of the process instance all timers are canceld and after this the scheduler also tries
> to delete the timer
> I did a change on SchedulerSession.cancelTimersForProcessInstance
> (the commented code ist the original one, I also added a new named query to hibernate.queries.hbm.xml)
> The change does not directly delete the timers from database, it calls the deleteTimer methode, which causes the
> timers beeing deleted to be added to the deletedTimers collection. If another delete is done from the scheduler
> it is ignored, because in the delete timer methode the deletedTImers collection is checked.
> public void cancelTimersForProcessInstance(ProcessInstance processInstance) {
> try {
> /*Query query = session.getNamedQuery("SchedulerSession.deleteTimersForProcessInstance");
> query.setEntity("processInstance", processInstance);
> query.executeUpdate();*/
> Query query = session.getNamedQuery("SchedulerSession.findTimersForProcessInstance");
> query.setEntity("processInstance", processInstance);
> Iterator iter = query.list().iterator();
> while(iter.hasNext()) {
> deleteTimer((Timer) iter.next());
> }
> } catch (Exception e) {
> log.error(e);
> jbpmSession.handleException();
> throw new JbpmException("couldn't delete timers for process instance '"+processInstance+"'", e);
> }
> }
> -- new named query
> <query name="SchedulerSession.findTimersForProcessInstance">
> <![CDATA[
> select t from org.jbpm.scheduler.exe.Timer t
> where t.processInstance = :processInstance
> ]]>
> </query>
> I'm not sure if the deleteTimersForProcessInstance query is used somewhere else, so I left it.
> If this approch is right, someone of the developers maybe can fix it in the code, I do not have access to it
--
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
16 years, 1 month
[JBoss JIRA] Assigned: (JBPM-165) process instance versioning
by Thomas Diesler (JIRA)
[ https://jira.jboss.org/jira/browse/JBPM-165?page=com.atlassian.jira.plugi... ]
Thomas Diesler reassigned JBPM-165:
-----------------------------------
Assignee: Tom Baeyens
> process instance versioning
> ---------------------------
>
> Key: JBPM-165
> URL: https://jira.jboss.org/jira/browse/JBPM-165
> Project: JBoss jBPM
> Issue Type: Feature Request
> Components: Core Engine
> Reporter: Tom Baeyens
> Assignee: Tom Baeyens
> Fix For: jBPM 3.3.1 GA
>
>
> i think jbpm could offer some degree of assistence in process instance versioning.
> when a new version of a process is deployed, jbpm could do the following conversion for a process instance :
> * input required: mapping of the nodes from the old to the new definition.
> * cancel the old process instance
> * create a new process instance and copy the runtime (exe) information such as tokens and process variables from the old process instance.
> * then establish a special link between the 2 process instances to indicate that the new process instance is the continuation of the old process instance.
> this way we can avoid the problematic conversion of logs, while still keeping them in the system.
--
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
16 years, 1 month
[JBoss JIRA] Updated: (JBPM-575) delete Timer fails in Scheduler
by Thomas Diesler (JIRA)
[ https://jira.jboss.org/jira/browse/JBPM-575?page=com.atlassian.jira.plugi... ]
Thomas Diesler updated JBPM-575:
--------------------------------
Fix Version/s: jBPM 3.3.1 GA
Assignee: Alejandro Guizar
> delete Timer fails in Scheduler
> -------------------------------
>
> Key: JBPM-575
> URL: https://jira.jboss.org/jira/browse/JBPM-575
> Project: JBoss jBPM
> Issue Type: Bug
> Components: Core Engine
> Affects Versions: jBPM 3.1.0
> Environment: jbpm 3.1, PostgreSQL / MS SQL Server / DB/2, jboss 4.0.4 RC1
> Reporter: maplat
> Assignee: Alejandro Guizar
> Fix For: jBPM 3.3.1 GA
>
> Original Estimate: 10 minutes
> Remaining Estimate: 10 minutes
>
> if a timer is scheduled, which execution leeds to the process end, the timer can not be deleted,
> because at the end of the process instance all timers are canceld and after this the scheduler also tries
> to delete the timer
> I did a change on SchedulerSession.cancelTimersForProcessInstance
> (the commented code ist the original one, I also added a new named query to hibernate.queries.hbm.xml)
> The change does not directly delete the timers from database, it calls the deleteTimer methode, which causes the
> timers beeing deleted to be added to the deletedTimers collection. If another delete is done from the scheduler
> it is ignored, because in the delete timer methode the deletedTImers collection is checked.
> public void cancelTimersForProcessInstance(ProcessInstance processInstance) {
> try {
> /*Query query = session.getNamedQuery("SchedulerSession.deleteTimersForProcessInstance");
> query.setEntity("processInstance", processInstance);
> query.executeUpdate();*/
> Query query = session.getNamedQuery("SchedulerSession.findTimersForProcessInstance");
> query.setEntity("processInstance", processInstance);
> Iterator iter = query.list().iterator();
> while(iter.hasNext()) {
> deleteTimer((Timer) iter.next());
> }
> } catch (Exception e) {
> log.error(e);
> jbpmSession.handleException();
> throw new JbpmException("couldn't delete timers for process instance '"+processInstance+"'", e);
> }
> }
> -- new named query
> <query name="SchedulerSession.findTimersForProcessInstance">
> <![CDATA[
> select t from org.jbpm.scheduler.exe.Timer t
> where t.processInstance = :processInstance
> ]]>
> </query>
> I'm not sure if the deleteTimersForProcessInstance query is used somewhere else, so I left it.
> If this approch is right, someone of the developers maybe can fix it in the code, I do not have access to it
--
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
16 years, 1 month