Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0038804
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminoralways2018-06-21 12:472019-10-22 16:30
ReporterjarmendarizView Statuspublic 
Assigned Toplatform 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0038804: jobUnscheduled method in ProcessMonitor is never called

DescriptionProcessMonitor::jobUnscheduled() is never called when a job is unscheduled because the OB_GROUP is not used when creating Triggers at process schedule. This may affect other methods in ProcessMonitor as well.

This issue is caused because when unscheduling a job, Quartz attempts to remove the trigger given the trigger and the group names, but trigger group is set as DEFAULT instead of OB_QUARTZ_GROUP so no deletion is performed and then the Scheduled listeners (ProcessMonitor) are not notified.
Steps To Reproduce- Put a breakpoint in the jobUnscheduledMethod of ProcessMonitor class.
- Start tomcat in debug mode
- Go to Process Request
- Select an scheduled process
- Press "Unschedule Process" button
- Process should be unscheduled and the breakpoint is never reached.
Proposed SolutionWhen a job is scheduled, it uses TriggerProvider:newInstance(String, ProcessBundle, ConnectionProvider) to create a new Trigger. The trigger group should be set using trigger.setGroup(OB_GROUP) for scheduled triggers (data.timingOption.equals(TIMING_OPTION_SCHEDULED).

Then some testing should be performed to ensure no functionality is broken for this change and that all methods of ProcessMonitor are called.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0038766 closedjarmendariz audit fields don't get updated when scheduling/unscheduling process requests 
related to feature request 0041483 closedcaristu update quartz 

-  Notes
(0105305)
jarmendariz (developer)
2018-06-21 14:11

When fixing this issue, consider removing the update:
ProcessRequestData.update(getConnection(), UNSCHEDULED, null, null, null, "0", triggerName);

in ProcessMonitor::unscheduleJob, as this update is already made in OBScheduler.
(0115230)
caristu (developer)
2019-10-22 16:30

After upgrading quartz to version 2.3.1 (0041483), the jobUnscheduled method is now invoked, but its implementation is not needed because when unscheduling a process, the OBScheduler is already taking care of updating the AD_PROCESS_REQUEST information properly (in the unschedule method).

So the implementation of the jobUnscheduled was removed[1] because it was no longer needed.

[1] https://code.openbravo.com/erp/devel/pi/rev/7b818134d882 [^]

- Issue History
Date Modified Username Field Change
2018-06-21 12:47 jarmendariz New Issue
2018-06-21 12:47 jarmendariz Assigned To => platform
2018-06-21 12:47 jarmendariz Modules => Core
2018-06-21 12:47 jarmendariz Triggers an Emergency Pack => No
2018-06-21 12:51 jarmendariz Relationship added related to 0038766
2018-06-21 14:11 jarmendariz Note Added: 0105305
2018-07-06 09:18 alostale Severity major => minor
2018-07-06 09:18 alostale Status new => acknowledged
2019-10-09 18:02 caristu Relationship added related to 0041483
2019-10-22 16:27 caristu Status acknowledged => scheduled
2019-10-22 16:30 caristu Review Assigned To => caristu
2019-10-22 16:30 caristu Note Added: 0115230
2019-10-22 16:30 caristu Status scheduled => closed
2019-10-22 16:30 caristu Resolution open => fixed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker