Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

JBPM-3866 - Avoid task duplicates when querying for tasks

  • Loading branch information...
commit e8fbea998621608f02cac6f8963a41a18bb80b36 1 parent fc5be7a
Maciej Swiderski authored November 23, 2012
37  jbpm-human-task/jbpm-human-task-core/src/main/resources/META-INF/Taskorm.xml
@@ -50,7 +50,7 @@ where
50 50
     or t.descriptions.size = 0
51 51
     ) and
52 52
 
53  
-    t.taskData.expirationTime is null
  53
+    t.taskData.expirationTime is null group by t.id
54 54
           </query>
55 55
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
56 56
       </named-query>
@@ -101,7 +101,7 @@ where
101 101
     or t.descriptions.size = 0
102 102
     ) and
103 103
 
104  
-    t.taskData.expirationTime is null
  104
+    t.taskData.expirationTime is null group by t.id
105 105
           </query>
106 106
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
107 107
       </named-query>
@@ -154,7 +154,7 @@ where
154 154
 
155 155
     t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and
156 156
 
157  
-    t.taskData.expirationTime is null
  157
+    t.taskData.expirationTime is null group by t.id
158 158
           </query>
159 159
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
160 160
       </named-query>
@@ -207,7 +207,7 @@ where
207 207
 
208 208
     t.taskData.status in (:status) and
209 209
 
210  
-    t.taskData.expirationTime is null
  210
+    t.taskData.expirationTime is null group by t.id
211 211
           </query>
212 212
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
213 213
       </named-query>
@@ -260,7 +260,7 @@ where
260 260
 
261 261
     t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and
262 262
 
263  
-    t.taskData.expirationTime is null
  263
+    t.taskData.expirationTime is null group by t.id
264 264
           </query>
265 265
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
266 266
       </named-query>
@@ -313,7 +313,7 @@ where
313 313
 
314 314
     t.taskData.status in (:status) and
315 315
 
316  
-    t.taskData.expirationTime is null
  316
+    t.taskData.expirationTime is null group by t.id
317 317
           </query>
318 318
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
319 319
       </named-query>
@@ -366,7 +366,7 @@ where
366 366
 
367 367
     t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and
368 368
 
369  
-    t.taskData.expirationTime is null
  369
+    t.taskData.expirationTime is null group by t.id
370 370
           </query>
371 371
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
372 372
       </named-query>
@@ -421,7 +421,7 @@ where
421 421
 
422 422
     t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and
423 423
 
424  
-    t.taskData.expirationTime is null
  424
+    t.taskData.expirationTime is null group by t.id
425 425
           </query>
426 426
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
427 427
       </named-query>
@@ -473,7 +473,7 @@ where
473 473
 
474 474
     t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and
475 475
 
476  
-    t.taskData.expirationTime is null
  476
+    t.taskData.expirationTime is null group by t.id
477 477
           </query>
478 478
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
479 479
       </named-query>
@@ -526,7 +526,7 @@ where
526 526
     or t.descriptions.size = 0
527 527
     ) and
528 528
 
529  
-    t.taskData.expirationTime is null
  529
+    t.taskData.expirationTime is null group by t.id
530 530
           </query>
531 531
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
532 532
       </named-query>
@@ -577,7 +577,7 @@ where
577 577
     or t.descriptions.size = 0
578 578
     ) and
579 579
 
580  
-    t.taskData.expirationTime is null
  580
+    t.taskData.expirationTime is null group by t.id
581 581
           </query>
582 582
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
583 583
       </named-query>
@@ -628,7 +628,7 @@ where
628 628
     or t.descriptions.size = 0
629 629
     ) and
630 630
 
631  
-    t.taskData.expirationTime is null
  631
+    t.taskData.expirationTime is null group by t.id
632 632
           </query>
633 633
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
634 634
       </named-query>
@@ -677,7 +677,7 @@ where
677 677
     or t.descriptions.size = 0
678 678
     ) and
679 679
 
680  
-    t.taskData.expirationTime is null
  680
+    t.taskData.expirationTime is null group by t.id
681 681
           </query>
682 682
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
683 683
       </named-query>
@@ -727,7 +727,7 @@ where
727 727
             or t.descriptions.size = 0
728 728
             ) and
729 729
 
730  
-            t.taskData.expirationTime is null
  730
+            t.taskData.expirationTime is null group by t.id
731 731
         </query>
732 732
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
733 733
     </named-query>
@@ -777,7 +777,7 @@ where
777 777
 
778 778
             t.taskData.status in (:status) and
779 779
 
780  
-            t.taskData.expirationTime is null
  780
+            t.taskData.expirationTime is null group by t.id
781 781
         </query>
782 782
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
783 783
     </named-query>
@@ -828,7 +828,7 @@ where
828 828
 
829 829
             t.taskData.status in (:status) and
830 830
 
831  
-            t.taskData.expirationTime is null
  831
+            t.taskData.expirationTime is null group by t.id
832 832
         </query>
833 833
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
834 834
     </named-query>
@@ -882,6 +882,7 @@ where
882 882
             and
883 883
     
884 884
             t.taskData.activationTime &lt; :since
  885
+             group by t.id
885 886
         </query>
886 887
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
887 888
     </named-query>
@@ -930,7 +931,7 @@ where
930 931
             or t.descriptions.size = 0
931 932
             ) and
932 933
 
933  
-            t.taskData.expirationTime is null
  934
+            t.taskData.expirationTime is null group by t.id
934 935
         </query>
935 936
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
936 937
     </named-query>
@@ -982,7 +983,7 @@ where
982 983
     or t.descriptions.size = 0
983 984
     ) and
984 985
 
985  
-    t.taskData.expirationTime is null
  986
+    t.taskData.expirationTime is null group by t.id
986 987
           </query>
987 988
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
988 989
       </named-query>
37  jbpm-human-task/jbpm-human-task-war/src/main/assembly/resources/Taskorm-JPA2.xml
@@ -50,7 +50,7 @@ where
50 50
     or t.descriptions.size = 0
51 51
     ) and
52 52
 
53  
-    t.taskData.expirationTime is null
  53
+    t.taskData.expirationTime is null group by t.id
54 54
           </query>
55 55
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
56 56
       </named-query>
@@ -101,7 +101,7 @@ where
101 101
     or t.descriptions.size = 0
102 102
     ) and
103 103
 
104  
-    t.taskData.expirationTime is null
  104
+    t.taskData.expirationTime is null group by t.id
105 105
           </query>
106 106
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
107 107
       </named-query>
@@ -154,7 +154,7 @@ where
154 154
 
155 155
     t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and
156 156
 
157  
-    t.taskData.expirationTime is null
  157
+    t.taskData.expirationTime is null group by t.id
158 158
           </query>
159 159
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
160 160
       </named-query>
@@ -207,7 +207,7 @@ where
207 207
 
208 208
     t.taskData.status in (:status) and
209 209
 
210  
-    t.taskData.expirationTime is null
  210
+    t.taskData.expirationTime is null group by t.id
211 211
           </query>
212 212
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
213 213
       </named-query>
@@ -260,7 +260,7 @@ where
260 260
 
261 261
     t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and
262 262
 
263  
-    t.taskData.expirationTime is null
  263
+    t.taskData.expirationTime is null group by t.id
264 264
           </query>
265 265
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
266 266
       </named-query>
@@ -313,7 +313,7 @@ where
313 313
 
314 314
     t.taskData.status in (:status) and
315 315
 
316  
-    t.taskData.expirationTime is null
  316
+    t.taskData.expirationTime is null group by t.id
317 317
           </query>
318 318
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
319 319
       </named-query>
@@ -366,7 +366,7 @@ where
366 366
 
367 367
     t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and
368 368
 
369  
-    t.taskData.expirationTime is null
  369
+    t.taskData.expirationTime is null group by t.id
370 370
           </query>
371 371
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
372 372
       </named-query>
@@ -421,7 +421,7 @@ where
421 421
 
422 422
     t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and
423 423
 
424  
-    t.taskData.expirationTime is null
  424
+    t.taskData.expirationTime is null group by t.id
425 425
           </query>
426 426
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
427 427
       </named-query>
@@ -473,7 +473,7 @@ where
473 473
 
474 474
     t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and
475 475
 
476  
-    t.taskData.expirationTime is null
  476
+    t.taskData.expirationTime is null group by t.id
477 477
           </query>
478 478
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
479 479
       </named-query>
@@ -526,7 +526,7 @@ where
526 526
     or t.descriptions.size = 0
527 527
     ) and
528 528
 
529  
-    t.taskData.expirationTime is null
  529
+    t.taskData.expirationTime is null group by t.id
530 530
           </query>
531 531
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
532 532
       </named-query>
@@ -577,7 +577,7 @@ where
577 577
     or t.descriptions.size = 0
578 578
     ) and
579 579
 
580  
-    t.taskData.expirationTime is null
  580
+    t.taskData.expirationTime is null group by t.id
581 581
           </query>
582 582
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
583 583
       </named-query>
@@ -628,7 +628,7 @@ where
628 628
     or t.descriptions.size = 0
629 629
     ) and
630 630
 
631  
-    t.taskData.expirationTime is null
  631
+    t.taskData.expirationTime is null group by t.id
632 632
           </query>
633 633
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
634 634
       </named-query>
@@ -677,7 +677,7 @@ where
677 677
     or t.descriptions.size = 0
678 678
     ) and
679 679
 
680  
-    t.taskData.expirationTime is null
  680
+    t.taskData.expirationTime is null group by t.id
681 681
           </query>
682 682
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
683 683
       </named-query>
@@ -727,7 +727,7 @@ where
727 727
             or t.descriptions.size = 0
728 728
             ) and
729 729
 
730  
-            t.taskData.expirationTime is null
  730
+            t.taskData.expirationTime is null group by t.id
731 731
         </query>
732 732
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
733 733
     </named-query>
@@ -777,7 +777,7 @@ where
777 777
 
778 778
             t.taskData.status in (:status) and
779 779
 
780  
-            t.taskData.expirationTime is null
  780
+            t.taskData.expirationTime is null group by t.id
781 781
         </query>
782 782
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
783 783
     </named-query>
@@ -828,7 +828,7 @@ where
828 828
 
829 829
             t.taskData.status in (:status) and
830 830
 
831  
-            t.taskData.expirationTime is null
  831
+            t.taskData.expirationTime is null group by t.id
832 832
         </query>
833 833
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
834 834
     </named-query>
@@ -882,6 +882,7 @@ where
882 882
             and
883 883
     
884 884
             t.taskData.activationTime &lt; :since
  885
+             group by t.id
885 886
         </query>
886 887
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
887 888
     </named-query>
@@ -930,7 +931,7 @@ where
930 931
             or t.descriptions.size = 0
931 932
             ) and
932 933
 
933  
-            t.taskData.expirationTime is null
  934
+            t.taskData.expirationTime is null group by t.id
934 935
         </query>
935 936
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
936 937
     </named-query>
@@ -982,7 +983,7 @@ where
982 983
     or t.descriptions.size = 0
983 984
     ) and
984 985
 
985  
-    t.taskData.expirationTime is null
  986
+    t.taskData.expirationTime is null group by t.id
986 987
           </query>
987 988
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
988 989
       </named-query>
37  jbpm-installer/db/Taskorm-JPA2.xml
@@ -50,7 +50,7 @@ where
50 50
     or t.descriptions.size = 0
51 51
     ) and
52 52
 
53  
-    t.taskData.expirationTime is null
  53
+    t.taskData.expirationTime is null group by t.id
54 54
           </query>
55 55
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
56 56
       </named-query>
@@ -101,7 +101,7 @@ where
101 101
     or t.descriptions.size = 0
102 102
     ) and
103 103
 
104  
-    t.taskData.expirationTime is null
  104
+    t.taskData.expirationTime is null group by t.id
105 105
           </query>
106 106
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
107 107
       </named-query>
@@ -154,7 +154,7 @@ where
154 154
 
155 155
     t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and
156 156
 
157  
-    t.taskData.expirationTime is null
  157
+    t.taskData.expirationTime is null group by t.id
158 158
           </query>
159 159
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
160 160
       </named-query>
@@ -207,7 +207,7 @@ where
207 207
 
208 208
     t.taskData.status in (:status) and
209 209
 
210  
-    t.taskData.expirationTime is null
  210
+    t.taskData.expirationTime is null group by t.id
211 211
           </query>
212 212
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
213 213
       </named-query>
@@ -260,7 +260,7 @@ where
260 260
 
261 261
     t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and
262 262
 
263  
-    t.taskData.expirationTime is null
  263
+    t.taskData.expirationTime is null group by t.id
264 264
           </query>
265 265
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
266 266
       </named-query>
@@ -313,7 +313,7 @@ where
313 313
 
314 314
     t.taskData.status in (:status) and
315 315
 
316  
-    t.taskData.expirationTime is null
  316
+    t.taskData.expirationTime is null group by t.id
317 317
           </query>
318 318
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
319 319
       </named-query>
@@ -366,7 +366,7 @@ where
366 366
 
367 367
     t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and
368 368
 
369  
-    t.taskData.expirationTime is null
  369
+    t.taskData.expirationTime is null group by t.id
370 370
           </query>
371 371
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
372 372
       </named-query>
@@ -421,7 +421,7 @@ where
421 421
 
422 422
     t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and
423 423
 
424  
-    t.taskData.expirationTime is null
  424
+    t.taskData.expirationTime is null group by t.id
425 425
           </query>
426 426
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
427 427
       </named-query>
@@ -473,7 +473,7 @@ where
473 473
 
474 474
     t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and
475 475
 
476  
-    t.taskData.expirationTime is null
  476
+    t.taskData.expirationTime is null group by t.id
477 477
           </query>
478 478
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
479 479
       </named-query>
@@ -526,7 +526,7 @@ where
526 526
     or t.descriptions.size = 0
527 527
     ) and
528 528
 
529  
-    t.taskData.expirationTime is null
  529
+    t.taskData.expirationTime is null group by t.id
530 530
           </query>
531 531
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
532 532
       </named-query>
@@ -577,7 +577,7 @@ where
577 577
     or t.descriptions.size = 0
578 578
     ) and
579 579
 
580  
-    t.taskData.expirationTime is null
  580
+    t.taskData.expirationTime is null group by t.id
581 581
           </query>
582 582
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
583 583
       </named-query>
@@ -628,7 +628,7 @@ where
628 628
     or t.descriptions.size = 0
629 629
     ) and
630 630
 
631  
-    t.taskData.expirationTime is null
  631
+    t.taskData.expirationTime is null group by t.id
632 632
           </query>
633 633
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
634 634
       </named-query>
@@ -677,7 +677,7 @@ where
677 677
     or t.descriptions.size = 0
678 678
     ) and
679 679
 
680  
-    t.taskData.expirationTime is null
  680
+    t.taskData.expirationTime is null group by t.id
681 681
           </query>
682 682
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
683 683
       </named-query>
@@ -727,7 +727,7 @@ where
727 727
             or t.descriptions.size = 0
728 728
             ) and
729 729
 
730  
-            t.taskData.expirationTime is null
  730
+            t.taskData.expirationTime is null group by t.id
731 731
         </query>
732 732
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
733 733
     </named-query>
@@ -777,7 +777,7 @@ where
777 777
 
778 778
             t.taskData.status in (:status) and
779 779
 
780  
-            t.taskData.expirationTime is null
  780
+            t.taskData.expirationTime is null group by t.id
781 781
         </query>
782 782
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
783 783
     </named-query>
@@ -828,7 +828,7 @@ where
828 828
 
829 829
             t.taskData.status in (:status) and
830 830
 
831  
-            t.taskData.expirationTime is null
  831
+            t.taskData.expirationTime is null group by t.id
832 832
         </query>
833 833
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
834 834
     </named-query>
@@ -882,6 +882,7 @@ where
882 882
             and
883 883
     
884 884
             t.taskData.activationTime &lt; :since
  885
+	    group by t.id
885 886
         </query>
886 887
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
887 888
     </named-query>
@@ -930,7 +931,7 @@ where
930 931
             or t.descriptions.size = 0
931 932
             ) and
932 933
 
933  
-            t.taskData.expirationTime is null
  934
+            t.taskData.expirationTime is null group by t.id
934 935
         </query>
935 936
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
936 937
     </named-query>
@@ -982,7 +983,7 @@ where
982 983
     or t.descriptions.size = 0
983 984
     ) and
984 985
 
985  
-    t.taskData.expirationTime is null
  986
+    t.taskData.expirationTime is null group by t.id
986 987
           </query>
987 988
           <!-- hint name="org.hibernate.timeout" value="200"/ -->
988 989
       </named-query>

0 notes on commit e8fbea9

Please sign in to comment.
Something went wrong with that request. Please try again.