Improve InstanceManagement.listInstancesSummary() to include failure information
Also, as part of this improvement, improve ProcessAndInstanceManagementImpl.getInstanceSummaryActivityFailure() which is hugely inefficient... it loads all active instances in memory....
Patch file attached.
1. For hibernate DAO, the basic form of query is:
select count, max(last_failed_date) from instance where failed_count > 0
2. For OpenJPA DAO, the basic form of query is:
select count, max(last_failed_date) from instance where exists(select * from activity_recovery where instance.id = activity_recovery.instance_id)
New patch attached with performance improvement on fault select in the ProcessAndInstanceManagementImp.listInstancesSummary(); the faults are eager loaded when selecting the instances. There is only one fault at most per process, so joining them together is not bad.
Attached third retry:
The counts of activity recoveries are pre-fetched on the activity recovery member variable on the process instances.
Patch applied to 1.x branch. Thanks!
boisvert@boog:~/svn/ode/1.1$ svn commit -m "ODE-460: Improve InstanceManagement.listInstancesSummary() to include failure information"
Transmitting file data ........
Committed revision 726820.