TSK-406: Added pagination for TaskController.

This commit is contained in:
Holger Hagen 2018-03-27 11:57:02 +02:00 committed by Mustapha Zorgati
parent a321d275ed
commit 106df46a69
15 changed files with 1596 additions and 141 deletions

View File

@ -410,18 +410,18 @@ public interface QueryMapper {
+ "<if test='custom9Like != null'>AND (<foreach item='item' collection='custom9Like' separator=' OR '>UPPER(t.CUSTOM_9) LIKE #{item}</foreach>)</if> "
+ "<if test='custom10In != null'>AND t.CUSTOM_10 IN(<foreach item='item' collection='custom10In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom10Like != null'>AND (<foreach item='item' collection='custom10Like' separator=' OR '>UPPER(t.CUSTOM_10) LIKE #{item}</foreach>)</if> "
+ "<if test='custom11In != null'>AND t.CUSTOM_10 IN(<foreach item='item' collection='custom11In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom11Like != null'>AND (<foreach item='item' collection='custom11Like' separator=' OR '>UPPER(t.CUSTOM_10) LIKE #{item}</foreach>)</if> "
+ "<if test='custom12In != null'>AND t.CUSTOM_10 IN(<foreach item='item' collection='custom12In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom12Like != null'>AND (<foreach item='item' collection='custom12Like' separator=' OR '>UPPER(t.CUSTOM_10) LIKE #{item}</foreach>)</if> "
+ "<if test='custom13In != null'>AND t.CUSTOM_10 IN(<foreach item='item' collection='custom13In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom13Like != null'>AND (<foreach item='item' collection='custom13Like' separator=' OR '>UPPER(t.CUSTOM_10) LIKE #{item}</foreach>)</if> "
+ "<if test='custom14In != null'>AND t.CUSTOM_10 IN(<foreach item='item' collection='custom14In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom14Like != null'>AND (<foreach item='item' collection='custom14Like' separator=' OR '>UPPER(t.CUSTOM_10) LIKE #{item}</foreach>)</if> "
+ "<if test='custom15In != null'>AND t.CUSTOM_10 IN(<foreach item='item' collection='custom15In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom15Like != null'>AND (<foreach item='item' collection='custom15Like' separator=' OR '>UPPER(t.CUSTOM_10) LIKE #{item}</foreach>)</if> "
+ "<if test='custom16In != null'>AND t.CUSTOM_10 IN(<foreach item='item' collection='custom16In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom16Like != null'>AND (<foreach item='item' collection='custom16Like' separator=' OR '>UPPER(t.CUSTOM_10) LIKE #{item}</foreach>)</if> "
+ "<if test='custom11In != null'>AND t.CUSTOM_11 IN(<foreach item='item' collection='custom11In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom11Like != null'>AND (<foreach item='item' collection='custom11Like' separator=' OR '>UPPER(t.CUSTOM_11) LIKE #{item}</foreach>)</if> "
+ "<if test='custom12In != null'>AND t.CUSTOM_12 IN(<foreach item='item' collection='custom12In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom12Like != null'>AND (<foreach item='item' collection='custom12Like' separator=' OR '>UPPER(t.CUSTOM_12) LIKE #{item}</foreach>)</if> "
+ "<if test='custom13In != null'>AND t.CUSTOM_13 IN(<foreach item='item' collection='custom13In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom13Like != null'>AND (<foreach item='item' collection='custom13Like' separator=' OR '>UPPER(t.CUSTOM_13) LIKE #{item}</foreach>)</if> "
+ "<if test='custom14In != null'>AND t.CUSTOM_14 IN(<foreach item='item' collection='custom14In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom14Like != null'>AND (<foreach item='item' collection='custom14Like' separator=' OR '>UPPER(t.CUSTOM_14) LIKE #{item}</foreach>)</if> "
+ "<if test='custom15In != null'>AND t.CUSTOM_15 IN(<foreach item='item' collection='custom15In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom15Like != null'>AND (<foreach item='item' collection='custom15Like' separator=' OR '>UPPER(t.CUSTOM_15) LIKE #{item}</foreach>)</if> "
+ "<if test='custom16In != null'>AND t.CUSTOM_16 IN(<foreach item='item' collection='custom16In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom16Like != null'>AND (<foreach item='item' collection='custom16Like' separator=' OR '>UPPER(t.CUSTOM_16) LIKE #{item}</foreach>)</if> "
+ "</where>"
+ "GROUP BY WORKBASKET_ID "
+ "<if test=\"_databaseId == 'db2'\">with UR </if> "

View File

@ -55,7 +55,9 @@ public class SampleLoginModule implements LoginModule {
default:
// necessary for checkstyle
}
subject.getPrincipals().add(new GroupPrincipal("team_" + username.substring(2, 6)));
if (username.length() > 6) {
subject.getPrincipals().add(new GroupPrincipal("team_" + username.substring(2, 6)));
}
}
private void addUserPrincipalToSubject() {

View File

@ -1,74 +1,74 @@
-- TASK TABLE (ID , CREATED , CLAIMED , COMPLETED , modified , planned , due , name , creator , description , note , priority, state , classification_category , classification_key, classification_id , workbasket_id , workbasket_key, domain , business_process_id, parent_business_process_id, owner , por_company , por_system , por_system_instance, por_type , por_value , is_read, is_transferred, custom_attributes, custom1, custom2, custom3, custom4, custom5, custom6, custom7, custom8, custom9, custom10, custom11, custom12, custom13, custom14, custom15, custom16
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000000', '2018-01-29 15:55:00', '2018-01-30 15:55:00', null , '2018-01-30 15:55:00', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Task99' , 'creator_user_id' , 'Lorem ipsum was n Quatsch dolor sit amet.', 'Some custom Note' , 1 , 'CLAIMED' , 'MANUAL' , 'T2000' , 'CLI:100000000000000000000000000000000016', 'WBI:100000000000000000000000000000000006' , 'USER_1_1' , 'DOMAIN_A', 'BPI21' , 'PBPI21' , 'user_1_1' , 'MyCompany1', 'MySystem1', 'MyInstance1' , 'MyType1', 'MyValue1' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000001', '2018-01-29 15:55:01', '2018-01-30 15:55:00', null , '2018-01-30 15:55:01', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Task01' , 'creator_user_id' , 'Lorem ipsum was n Quatsch dolor sit amet.', 'Some custom Note' , 2 , 'CLAIMED' , 'EXTERN' , 'L110102' , 'CLI:100000000000000000000000000000000005', 'WBI:100000000000000000000000000000000006' , 'USER_1_1' , 'DOMAIN_A', 'BPI21' , 'PBPI21' , 'user_1_1' , 'MyCompany1', 'MySystem1', 'MyInstance1' , 'MyType1', 'MyValue1' , true , false , null , 'pqr' , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000002', '2018-01-29 15:55:02', '2018-01-30 15:55:00', null , '2018-01-30 15:55:02', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Task02' , 'creator_user_id' , 'Lorem ipsum was n Quatsch t. Aber stimmt.', 'Some custom Note' , 2 , 'CLAIMED' , 'MANUAL' , 'T2000' , 'CLI:100000000000000000000000000000000016', 'WBI:100000000000000000000000000000000006' , 'USER_1_1' , 'DOMAIN_A', 'BPI21' , 'PBPI21' , 'user_1_1' , 'MyCompany1', 'MySystem1', 'MyInstance1' , 'MyType1', 'MyValue1' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000003', '2018-01-29 15:55:03', null , null , '2018-01-29 15:55:03', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000003' , 'DOC_0000000000000000003' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , null , 'efg' , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000004', '2018-01-29 15:55:04', null , null , '2018-01-29 15:55:04', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000004' , 'DOC_0000000000000000004' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , null , null , 'ade' , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000005', '2018-01-29 15:55:05', null , null , '2018-01-29 15:55:05', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000005' , 'DOC_0000000000000000005' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000006', '2018-01-29 15:55:06', null , null , '2018-01-29 15:55:06', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000006' , 'DOC_0000000000000000006' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000007', '2018-01-29 15:55:07', null , null , '2018-01-29 15:55:07', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000007' , 'DOC_0000000000000000007' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , null , null , null , 'ffg' , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000008', '2018-01-29 15:55:08', null , null , '2018-01-29 15:55:08', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000008' , 'DOC_0000000000000000008' , null , '00' , 'PASystem' , '00' , 'VNR' , '22334455' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000009', '2018-01-29 15:55:09', null , null , '2018-01-29 15:55:09', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000009' , 'DOC_0000000000000000009' , null , '00' , 'PASystem' , '00' , 'VNR' , '22334455' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000010', '2018-01-29 15:55:10', null , null , '2018-01-29 15:55:10', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000010' , 'DOC_0000000000000000010' , null , '00' , 'PASystem' , '00' , 'VNR' , '22334455' , false , false , null , null , null , null , 'rty' , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000011', '2018-01-29 15:55:11', null , null , '2018-01-29 15:55:11', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000011' , 'DOC_0000000000000000011' , null , '00' , 'PASystem' , '00' , 'VNR' , '22334455' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000012', '2018-01-29 15:55:12', null , null , '2018-01-29 15:55:12', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000012' , 'DOC_0000000000000000012' , null , '00' , 'PASystem' , '00' , 'VNR' , '22334455' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000013', '2018-01-29 15:55:13', null , null , '2018-01-29 15:55:13', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000013' , 'DOC_0000000000000000013' , null , '00' , 'PASystem' , '00' , 'VNR' , '22334455' , false , false , null , null , null , null , null , 'rty' , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000014', '2018-01-29 15:55:14', null , null , '2018-01-29 15:55:14', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000014' , 'DOC_0000000000000000014' , null , '00' , 'PASystem' , '00' , 'VNR' , '12345678' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000015', '2018-01-29 15:55:15', null , null , '2018-01-29 15:55:15', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000015' , 'DOC_0000000000000000015' , null , '00' , 'PASystem' , '00' , 'VNR' , '23456789' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000016', '2018-01-29 15:55:16', null , null , '2018-01-29 15:55:16', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000016' , 'DOC_0000000000000000016' , null , '00' , 'PASystem' , '00' , 'VNR' , '34567890' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000017', '2018-01-29 15:55:17', null , null , '2018-01-29 15:55:17', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000017' , 'DOC_0000000000000000017' , null , '00' , 'PASystem' , '00' , 'VNR' , '45678901' , false , false , null , null , null , null , null , null , 'vvg' , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000018', '2018-01-29 15:55:18', null , null , '2018-01-29 15:55:18', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000018' , 'DOC_0000000000000000018' , null , '00' , 'PASystem' , '00' , 'VNR' , '56789012' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000019', '2018-01-29 15:55:19', null , null , '2018-01-29 15:55:19', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000019' , 'DOC_0000000000000000019' , null , '00' , 'PASystem' , '00' , 'VNR' , '67890123' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000020', '2018-01-29 15:55:20', null , null , '2018-01-29 15:55:20', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000020' , 'DOC_0000000000000000020' , null , '00' , 'PASystem' , '00' , 'SDNR' , '11223344' , false , false , null , null , null , null , null , null , null , 'ijk' , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000021', '2018-01-29 15:55:21', null , null , '2018-01-29 15:55:21', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000021' , 'DOC_0000000000000000021' , null , '00' , 'PASystem' , '00' , 'SDNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000022', '2018-01-29 15:55:22', null , null , '2018-01-29 15:55:22', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000022' , 'DOC_0000000000000000022' , null , '00' , 'PASystem' , '00' , 'SDNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000023', '2018-01-29 15:55:23', null , null , '2018-01-29 15:55:23', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000023' , 'DOC_0000000000000000023' , null , '00' , 'PASystem' , '00' , 'SDNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , 'lnp' , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000024', '2018-01-29 15:55:24', null , null , '2018-01-29 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000024' , 'DOC_0000000000000000024' , null , '00' , 'PASystem' , '00' , 'SDNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , 'bbq' , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000001', '2018-01-29 15:55:01', '2018-01-30 15:55:00', null , '2018-01-30 15:55:01', '2018-01-29 15:55:00', '2018-01-30 15:55:01', 'Task01' , 'creator_user_id' , 'Lorem ipsum was n Quatsch dolor sit amet.', 'Some custom Note' , 2 , 'CLAIMED' , 'EXTERN' , 'L110102' , 'CLI:100000000000000000000000000000000005', 'WBI:100000000000000000000000000000000006' , 'USER_1_1' , 'DOMAIN_A', 'BPI21' , 'PBPI21' , 'user_1_1' , 'MyCompany1', 'MySystem1', 'MyInstance1' , 'MyType1', 'MyValue1' , true , false , null , 'pqr' , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000002', '2018-01-29 15:55:02', '2018-01-30 15:55:00', null , '2018-01-30 15:55:02', '2018-01-29 15:55:00', '2018-01-30 15:55:02', 'Task02' , 'creator_user_id' , 'Lorem ipsum was n Quatsch t. Aber stimmt.', 'Some custom Note' , 2 , 'CLAIMED' , 'MANUAL' , 'T2000' , 'CLI:100000000000000000000000000000000016', 'WBI:100000000000000000000000000000000006' , 'USER_1_1' , 'DOMAIN_A', 'BPI21' , 'PBPI21' , 'user_1_1' , 'MyCompany1', 'MySystem1', 'MyInstance1' , 'MyType1', 'MyValue1' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000003', '2018-01-29 15:55:03', null , null , '2018-01-29 15:55:03', '2018-01-29 15:55:00', '2018-01-30 15:55:03', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000003' , 'DOC_0000000000000000003' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , null , 'efg' , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000004', '2018-01-29 15:55:04', null , null , '2018-01-29 15:55:04', '2018-01-29 15:55:00', '2018-01-30 15:55:04', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000004' , 'DOC_0000000000000000004' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , null , null , 'ade' , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000005', '2018-01-29 15:55:05', null , null , '2018-01-29 15:55:05', '2018-01-29 15:55:00', '2018-01-30 15:55:05', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000005' , 'DOC_0000000000000000005' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000006', '2018-01-29 15:55:06', null , null , '2018-01-29 15:55:06', '2018-01-29 15:55:00', '2018-01-30 15:55:06', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000006' , 'DOC_0000000000000000006' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000007', '2018-01-29 15:55:07', null , null , '2018-01-29 15:55:07', '2018-01-29 15:55:00', '2018-01-30 15:55:07', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000007' , 'DOC_0000000000000000007' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , null , null , null , 'ffg' , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000008', '2018-01-29 15:55:08', null , null , '2018-01-29 15:55:08', '2018-01-29 15:55:00', '2018-01-30 15:55:08', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000008' , 'DOC_0000000000000000008' , null , '00' , 'PASystem' , '00' , 'VNR' , '22334455' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000009', '2018-01-29 15:55:09', null , null , '2018-01-29 15:55:09', '2018-01-29 15:55:00', '2018-01-30 15:55:09', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000009' , 'DOC_0000000000000000009' , null , '00' , 'PASystem' , '00' , 'VNR' , '22334455' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000010', '2018-01-29 15:55:10', null , null , '2018-01-29 15:55:10', '2018-01-29 15:55:00', '2018-01-30 15:55:10', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000010' , 'DOC_0000000000000000010' , null , '00' , 'PASystem' , '00' , 'VNR' , '22334455' , false , false , null , null , null , null , 'rty' , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000011', '2018-01-29 15:55:11', null , null , '2018-01-29 15:55:11', '2018-01-29 15:55:00', '2018-01-30 15:55:11', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000011' , 'DOC_0000000000000000011' , null , '00' , 'PASystem' , '00' , 'VNR' , '22334455' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000012', '2018-01-29 15:55:12', null , null , '2018-01-29 15:55:12', '2018-01-29 15:55:00', '2018-01-30 15:55:12', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000012' , 'DOC_0000000000000000012' , null , '00' , 'PASystem' , '00' , 'VNR' , '22334455' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000013', '2018-01-29 15:55:13', null , null , '2018-01-29 15:55:13', '2018-01-29 15:55:00', '2018-01-30 15:55:13', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000013' , 'DOC_0000000000000000013' , null , '00' , 'PASystem' , '00' , 'VNR' , '22334455' , false , false , null , null , null , null , null , 'rty' , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000014', '2018-01-29 15:55:14', null , null , '2018-01-29 15:55:14', '2018-01-29 15:55:00', '2018-01-30 15:55:14', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000014' , 'DOC_0000000000000000014' , null , '00' , 'PASystem' , '00' , 'VNR' , '12345678' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000015', '2018-01-29 15:55:15', null , null , '2018-01-29 15:55:15', '2018-01-29 15:55:00', '2018-01-30 15:55:15', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000015' , 'DOC_0000000000000000015' , null , '00' , 'PASystem' , '00' , 'VNR' , '23456789' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000016', '2018-01-29 15:55:16', null , null , '2018-01-29 15:55:16', '2018-01-29 15:55:00', '2018-01-30 15:55:16', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000016' , 'DOC_0000000000000000016' , null , '00' , 'PASystem' , '00' , 'VNR' , '34567890' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000017', '2018-01-29 15:55:17', null , null , '2018-01-29 15:55:17', '2018-01-29 15:55:00', '2018-01-30 15:55:17', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000017' , 'DOC_0000000000000000017' , null , '00' , 'PASystem' , '00' , 'VNR' , '45678901' , false , false , null , null , null , null , null , null , 'vvg' , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000018', '2018-01-29 15:55:18', null , null , '2018-01-29 15:55:18', '2018-01-29 15:55:00', '2018-01-30 15:55:18', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000018' , 'DOC_0000000000000000018' , null , '00' , 'PASystem' , '00' , 'VNR' , '56789012' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000019', '2018-01-29 15:55:19', null , null , '2018-01-29 15:55:19', '2018-01-29 15:55:00', '2018-01-30 15:55:19', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000019' , 'DOC_0000000000000000019' , null , '00' , 'PASystem' , '00' , 'VNR' , '67890123' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000020', '2018-01-29 15:55:20', null , null , '2018-01-29 15:55:20', '2018-01-29 15:55:00', '2018-01-30 15:55:20', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000020' , 'DOC_0000000000000000020' , null , '00' , 'PASystem' , '00' , 'SDNR' , '11223344' , false , false , null , null , null , null , null , null , null , 'ijk' , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000021', '2018-01-29 15:55:21', null , null , '2018-01-29 15:55:21', '2018-01-29 15:55:00', '2018-01-30 15:55:21', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000021' , 'DOC_0000000000000000021' , null , '00' , 'PASystem' , '00' , 'SDNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000022', '2018-01-29 15:55:22', null , null , '2018-01-29 15:55:22', '2018-01-29 15:55:00', '2018-01-30 15:55:22', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000022' , 'DOC_0000000000000000022' , null , '00' , 'PASystem' , '00' , 'SDNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000023', '2018-01-29 15:55:23', null , null , '2018-01-29 15:55:23', '2018-01-29 15:55:00', '2018-01-30 15:55:23', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000023' , 'DOC_0000000000000000023' , null , '00' , 'PASystem' , '00' , 'SDNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , 'lnp' , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000024', '2018-01-29 15:55:24', null , null , '2018-01-29 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:24', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000001' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000024' , 'DOC_0000000000000000024' , null , '00' , 'PASystem' , '00' , 'SDNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , 'bbq' , null , null , null , null , null , null , null );
-- Tasks for WorkOnTaskAccTest
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000025', '2018-01-29 15:55:24', null , null , '2018-01-29 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000025' , 'DOC_0000000000000000025' , null , 'abcd00' , 'PASystem' , '00' , 'SDNR' , '98765432' , false , false , null , null , null , null , null , null , null , null , null , null , 'ert' , 'ert' , 'ert' , 'ert' , 'ert' , 'ert' , 'ert' );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000026', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000026' , 'DOC_0000000000000000026' , 'user_1_1' , 'bcde00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000027', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000027' , 'DOC_0000000000000000027' , 'user_1_2' , 'cdef00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000028', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000028' , 'DOC_0000000000000000028' , 'user_1_1' , 'efgh00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000029', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000029' , 'DOC_0000000000000000029' , 'user_1_2' , 'fghj00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , 'rew' , null , null , null , 'dde' , 'dde' , 'dde' , 'dde' , 'dde' , 'dde' , 'dde' );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000030', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000030' , 'DOC_0000000000000000030' , 'user_1_1' , 'ABCD00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000031', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000031' , 'DOC_0000000000000000031' , 'user_1_1' , 'BDCE00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000032', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000032' , 'DOC_0000000000000000032' , 'user_1_2' , 'CDEF00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000033', '2018-01-29 15:55:24', null , null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000033' , 'DOC_0000000000000000033' , 'user_1_2' , 'DEFG00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000034', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000034' , 'DOC_0000000000000000034' , 'user_1_1' , 'GHIJ00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000035', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000035' , 'DOC_0000000000000000035' , 'user_1_1' , '00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000100', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000100' , 'DOC_0000000000000000100' , 'user_1_2' , '00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000101', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000101' , 'DOC_0000000000000000101' , 'user_1_2' , '00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , 'el' , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000102', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000102' , 'DOC_0000000000000000102' , 'user_1_2' , '00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000103', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000103' , 'DOC_0000000000000000103' , 'user_1_2' , '00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000025', '2018-01-29 15:55:24', null , null , '2018-01-29 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:25', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000025' , 'DOC_0000000000000000025' , null , 'abcd00' , 'PASystem' , '00' , 'SDNR' , '98765432' , false , false , null , null , null , null , null , null , null , null , null , null , 'ert' , 'ert' , 'ert' , 'ert' , 'ert' , 'ert' , 'ert' );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000026', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:26', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000026' , 'DOC_0000000000000000026' , 'user_1_1' , 'bcde00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000027', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:27', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000027' , 'DOC_0000000000000000027' , 'user_1_2' , 'cdef00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000028', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:28', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000028' , 'DOC_0000000000000000028' , 'user_1_1' , 'efgh00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000029', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:29', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000029' , 'DOC_0000000000000000029' , 'user_1_2' , 'fghj00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , 'rew' , null , null , null , 'dde' , 'dde' , 'dde' , 'dde' , 'dde' , 'dde' , 'dde' );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000030', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:30', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000030' , 'DOC_0000000000000000030' , 'user_1_1' , 'ABCD00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000031', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:31', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000031' , 'DOC_0000000000000000031' , 'user_1_1' , 'BDCE00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000032', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:32', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000032' , 'DOC_0000000000000000032' , 'user_1_2' , 'CDEF00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000033', '2018-01-29 15:55:24', null , null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:33', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000033' , 'DOC_0000000000000000033' , 'user_1_2' , 'DEFG00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000034', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:35', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000034' , 'DOC_0000000000000000034' , 'user_1_1' , 'GHIJ00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000035', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:36', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000035' , 'DOC_0000000000000000035' , 'user_1_1' , '00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000100', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:37', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000100' , 'DOC_0000000000000000100' , 'user_1_2' , '00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000101', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:38', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000101' , 'DOC_0000000000000000101' , 'user_1_2' , '00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , 'el' , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000102', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:39', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000102' , 'DOC_0000000000000000102' , 'user_1_2' , '00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000103', '2018-01-29 15:55:24', '2018-01-30 15:55:24', null , '2018-01-30 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:40', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'CLAIMED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000103' , 'DOC_0000000000000000103' , 'user_1_2' , '00' , 'PASystem' , '00' , 'SDNR' , '98765432' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
-- Tasks for DeleteTaskAccTest
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000036', '2018-01-29 15:55:24', '2018-01-30 15:55:24', '2018-01-30 16:55:24', '2018-01-30 16:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'COMPLETED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000036' , 'DOC_0000000000000000036' , 'user_1_2' , '00' , 'PASystem' , '00' , 'SDNR' , '00011122' , true , false , null , null , null , null , null , 'ew' , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000037', '2018-01-29 15:55:24', '2018-01-30 15:55:24', '2018-01-30 16:55:24', '2018-01-30 16:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'COMPLETED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000037' , 'DOC_0000000000000000037' , 'user_1_2' , '00' , 'PASystem' , '00' , 'SDNR' , '00011122' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000038', '2018-01-29 15:55:24', '2018-01-30 15:55:24', '2018-01-30 16:55:24', '2018-01-30 16:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'COMPLETED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000038' , 'DOC_0000000000000000038' , 'user_1_2' , '00' , 'PASystem' , '00' , 'SDNR' , '00011122' , true , false , null , null , null , null , null , null , '11' , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000039', '2018-01-29 15:55:24', '2018-01-30 15:55:24', '2018-01-30 16:55:24', '2018-01-30 16:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'COMPLETED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000039' , 'DOC_0000000000000000039' , 'user_1_2' , '00' , 'PASystem' , '00' , 'SDNR' , '00011122' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000040', '2018-01-29 15:55:24', '2018-01-30 15:55:24', '2018-01-30 16:55:24', '2018-01-30 16:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'COMPLETED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000040' , 'DOC_0000000000000000040' , 'user_1_2' , '00' , 'PASystem' , '00' , 'SDNR' , '00011122' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000036', '2018-01-29 15:55:24', '2018-01-30 15:55:24', '2018-01-30 16:55:24', '2018-01-30 16:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:41', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'COMPLETED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000036' , 'DOC_0000000000000000036' , 'user_1_2' , '00' , 'PASystem' , '00' , 'SDNR' , '00011122' , true , false , null , null , null , null , null , 'ew' , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000037', '2018-01-29 15:55:24', '2018-01-30 15:55:24', '2018-01-30 16:55:24', '2018-01-30 16:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:42', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'COMPLETED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000037' , 'DOC_0000000000000000037' , 'user_1_2' , '00' , 'PASystem' , '00' , 'SDNR' , '00011122' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000038', '2018-01-29 15:55:24', '2018-01-30 15:55:24', '2018-01-30 16:55:24', '2018-01-30 16:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:43', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'COMPLETED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000038' , 'DOC_0000000000000000038' , 'user_1_2' , '00' , 'PASystem' , '00' , 'SDNR' , '00011122' , true , false , null , null , null , null , null , null , '11' , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000039', '2018-01-29 15:55:24', '2018-01-30 15:55:24', '2018-01-30 16:55:24', '2018-01-30 16:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:44', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'COMPLETED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000039' , 'DOC_0000000000000000039' , 'user_1_2' , '00' , 'PASystem' , '00' , 'SDNR' , '00011122' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000040', '2018-01-29 15:55:24', '2018-01-30 15:55:24', '2018-01-30 16:55:24', '2018-01-30 16:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:45', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'COMPLETED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000007' , 'USER_1_2' , 'DOMAIN_A', 'PI_0000000000040' , 'DOC_0000000000000000040' , 'user_1_2' , '00' , 'PASystem' , '00' , 'SDNR' , '00011122' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
-- Tasks for QueryTasksWithSortingTest
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000041', '2018-01-29 15:55:00', '2018-01-30 15:55:00', null , '2018-01-30 15:55:00', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Task99' , 'creator_user_id' , 'Lorem ipsum was n Quatsch dolor sit amet.', 'Some custom Note' , 1 , 'CLAIMED' , 'AUTOMATIC' , 'T6310' , 'CLI:000000000000000000000000000000000011', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'BPI21' , 'PBPI21' , 'user_3_1' , 'MyCompany1', 'MySystem1', 'MyInstance1' , 'MyType1', 'MyValue1' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000042', '2018-01-29 15:55:01', '2018-01-30 15:55:00', null , '2018-01-30 15:55:01', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Task01' , 'creator_user_id' , 'Lorem ipsum was n Quatsch dolor sit amet.', 'Some custom Note' , 2 , 'CLAIMED' , 'EXTERN' , 'L10303' , 'CLI:100000000000000000000000000000000005', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'BPI21' , 'PBPI21' , 'user_3_1' , 'MyCompany1', 'MySystem1', 'MyInstance1' , 'MyType1', 'MyValue1' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000043', '2018-01-29 15:55:02', '2018-01-30 15:55:00', null , '2018-01-30 15:55:02', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Task02' , 'creator_user_id' , 'Lorem ipsum was n Quatsch t. Aber stimmt.', 'Some custom Note' , 2 , 'CLAIMED' , 'EXTERN' , 'A12' , 'CLI:200000000000000000000000000000000001', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'BPI21' , 'PBPI21' , 'user_3_1' , 'MyCompany1', 'MySystem1', 'MyInstance1' , 'MyType1', 'MyValue1' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000044', '2018-01-29 15:55:03', null , null , '2018-01-29 15:55:03', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000003' , 'DOC_0000000000000000003' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000045', '2018-01-29 15:55:04', null , null , '2018-01-29 15:55:04', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000004' , 'DOC_0000000000000000004' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000046', '2018-01-29 15:55:05', null , null , '2018-01-29 15:55:05', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000004' , 'DOC_0000000000000000003' , null , '00' , 'PASystem' , '06' , 'VNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000047', '2018-01-29 15:55:06', null , null , '2018-01-29 15:55:06', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000004' , 'DOC_0000000000000000003' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000048', '2018-01-29 15:55:07', null , null , '2018-01-29 15:55:07', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000004' , 'DOC_0000000000000000007' , null , '00' , 'PASystem' , '05' , 'VNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000049', '2018-01-29 15:55:08', null , null , '2018-01-29 15:55:08', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000008' , 'DOC_0000000000000000003' , null , '00' , 'PASyste1' , '00' , 'VNR' , '22334455' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000050', '2018-01-29 15:55:09', null , null , '2018-01-29 15:55:09', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000009' , 'DOC_0000000000000000009' , null , '00' , 'PASyste1' , '05' , 'VNR' , '22334455' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000051', '2018-01-29 15:55:10', null , null , '2018-01-29 15:55:10', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000010' , 'DOC_0000000000000000010' , null , '00' , 'PASyste1' , '00' , 'VNR' , '22334455' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000052', '2018-01-29 15:55:11', null , null , '2018-01-29 15:55:11', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000011' , 'DOC_0000000000000000011' , null , '00' , 'PASystem' , '04' , 'VNR' , '22334455' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000053', '2018-01-29 15:55:12', null , null , '2018-01-29 15:55:12', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000012' , 'DOC_0000000000000000012' , null , '00' , 'PASystem' , '00' , 'VNR' , '22334455' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000054', '2018-01-29 15:55:13', null , null , '2018-01-29 15:55:13', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000010' , 'DOC_0000000000000000011' , null , '00' , 'PASystem' , '00' , 'VNR' , '22334455' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000055', '2018-01-29 15:55:14', null , null , '2018-01-29 15:55:14', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000014' , 'DOC_0000000000000000014' , null , '00' , 'PASyste1' , '04' , 'VNR' , '12345678' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000056', '2018-01-29 15:55:15', null , null , '2018-01-29 15:55:15', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000015' , 'DOC_0000000000000000015' , null , '00' , 'PASyste1' , '00' , 'VNR' , '23456789' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000057', '2018-01-29 15:55:16', null , null , '2018-01-29 15:55:16', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000010' , 'DOC_0000000000000000011' , null , '00' , 'PASyste2' , '00' , 'VNR' , '34567890' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000058', '2018-01-29 15:55:17', null , null , '2018-01-29 15:55:17', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000017' , 'DOC_0000000000000000017' , null , '00' , 'PASystem' , '03' , 'VNR' , '45678901' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000059', '2018-01-29 15:55:18', null , null , '2018-01-29 15:55:18', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000018' , 'DOC_0000000000000000018' , null , '00' , 'PASystem' , '02' , 'VNR' , '56789012' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000060', '2018-01-29 15:55:19', null , null , '2018-01-29 15:55:19', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000010' , 'DOC_0000000000000000011' , null , '00' , 'PASyste2' , '00' , 'VNR' , '67890123' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000061', '2018-01-29 15:55:20', null , null , '2018-01-29 15:55:20', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000020' , 'DOC_0000000000000000020' , null , '00' , 'PASyste2' , '01' , 'SDNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000062', '2018-01-29 15:55:21', null , null , '2018-01-29 15:55:21', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000020' , 'DOC_0000000000000000021' , null , '00' , 'PASyste2' , '01' , 'SDNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000063', '2018-01-29 15:55:22', null , null , '2018-01-29 15:55:22', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000022' , 'DOC_0000000000000000022' , null , '00' , 'PASystem' , '00' , 'SDNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000064', '2018-01-29 15:55:23', null , null , '2018-01-29 15:55:23', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000020' , 'DOC_0000000000000000021' , null , '00' , 'PASystem' , '00' , 'SDNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000065', '2018-01-29 15:55:24', null , null , '2018-01-29 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000024' , 'DOC_0000000000000000024' , null , '00' , 'PASystem' , '00' , 'SDNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000041', '2018-01-29 15:55:00', '2018-01-30 15:55:00', null , '2018-01-30 15:55:00', '2018-01-29 15:55:00', '2018-01-30 15:55:46', 'Task99' , 'creator_user_id' , 'Lorem ipsum was n Quatsch dolor sit amet.', 'Some custom Note' , 1 , 'CLAIMED' , 'AUTOMATIC' , 'T6310' , 'CLI:000000000000000000000000000000000011', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'BPI21' , 'PBPI21' , 'user_3_1' , 'MyCompany1', 'MySystem1', 'MyInstance1' , 'MyType1', 'MyValue1' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000042', '2018-01-29 15:55:01', '2018-01-30 15:55:00', null , '2018-01-30 15:55:01', '2018-01-29 15:55:00', '2018-01-30 15:55:47', 'Task01' , 'creator_user_id' , 'Lorem ipsum was n Quatsch dolor sit amet.', 'Some custom Note' , 2 , 'CLAIMED' , 'EXTERN' , 'L10303' , 'CLI:100000000000000000000000000000000005', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'BPI21' , 'PBPI21' , 'user_3_1' , 'MyCompany1', 'MySystem1', 'MyInstance1' , 'MyType1', 'MyValue1' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000043', '2018-01-29 15:55:02', '2018-01-30 15:55:00', null , '2018-01-30 15:55:02', '2018-01-29 15:55:00', '2018-01-30 15:55:48', 'Task02' , 'creator_user_id' , 'Lorem ipsum was n Quatsch t. Aber stimmt.', 'Some custom Note' , 2 , 'CLAIMED' , 'EXTERN' , 'A12' , 'CLI:200000000000000000000000000000000001', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'BPI21' , 'PBPI21' , 'user_3_1' , 'MyCompany1', 'MySystem1', 'MyInstance1' , 'MyType1', 'MyValue1' , true , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000044', '2018-01-29 15:55:03', null , null , '2018-01-29 15:55:03', '2018-01-29 15:55:00', '2018-01-30 15:55:49', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000003' , 'DOC_0000000000000000003' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000045', '2018-01-29 15:55:04', null , null , '2018-01-29 15:55:04', '2018-01-29 15:55:00', '2018-01-30 15:55:50', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000004' , 'DOC_0000000000000000004' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000046', '2018-01-29 15:55:05', null , null , '2018-01-29 15:55:05', '2018-01-29 15:55:00', '2018-01-30 15:55:51', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000004' , 'DOC_0000000000000000003' , null , '00' , 'PASystem' , '06' , 'VNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000047', '2018-01-29 15:55:06', null , null , '2018-01-29 15:55:06', '2018-01-29 15:55:00', '2018-01-30 15:55:52', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000004' , 'DOC_0000000000000000003' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000048', '2018-01-29 15:55:07', null , null , '2018-01-29 15:55:07', '2018-01-29 15:55:00', '2018-01-30 15:55:53', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000004' , 'DOC_0000000000000000007' , null , '00' , 'PASystem' , '05' , 'VNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000049', '2018-01-29 15:55:08', null , null , '2018-01-29 15:55:08', '2018-01-29 15:55:00', '2018-01-30 15:55:54', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000008' , 'DOC_0000000000000000003' , null , '00' , 'PASyste1' , '00' , 'VNR' , '22334455' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000050', '2018-01-29 15:55:09', null , null , '2018-01-29 15:55:09', '2018-01-29 15:55:00', '2018-01-30 15:55:55', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000009' , 'DOC_0000000000000000009' , null , '00' , 'PASyste1' , '05' , 'VNR' , '22334455' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000051', '2018-01-29 15:55:10', null , null , '2018-01-29 15:55:10', '2018-01-29 15:55:00', '2018-01-30 15:55:56', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000010' , 'DOC_0000000000000000010' , null , '00' , 'PASyste1' , '00' , 'VNR' , '22334455' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000052', '2018-01-29 15:55:11', null , null , '2018-01-29 15:55:11', '2018-01-29 15:55:00', '2018-01-30 15:55:57', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000011' , 'DOC_0000000000000000011' , null , '00' , 'PASystem' , '04' , 'VNR' , '22334455' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000053', '2018-01-29 15:55:12', null , null , '2018-01-29 15:55:12', '2018-01-29 15:55:00', '2018-01-30 15:55:58', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000012' , 'DOC_0000000000000000012' , null , '00' , 'PASystem' , '00' , 'VNR' , '22334455' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000054', '2018-01-29 15:55:13', null , null , '2018-01-29 15:55:13', '2018-01-29 15:55:00', '2018-01-30 15:55:59', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000010' , 'DOC_0000000000000000011' , null , '00' , 'PASystem' , '00' , 'VNR' , '22334455' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000055', '2018-01-29 15:55:14', null , null , '2018-01-29 15:55:14', '2018-01-29 15:55:00', '2018-01-30 15:56:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000014' , 'DOC_0000000000000000014' , null , '00' , 'PASyste1' , '04' , 'VNR' , '12345678' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000056', '2018-01-29 15:55:15', null , null , '2018-01-29 15:55:15', '2018-01-29 15:55:00', '2018-01-30 15:56:01', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000015' , 'DOC_0000000000000000015' , null , '00' , 'PASyste1' , '00' , 'VNR' , '23456789' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000057', '2018-01-29 15:55:16', null , null , '2018-01-29 15:55:16', '2018-01-29 15:55:00', '2018-01-30 15:56:02', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000010' , 'DOC_0000000000000000011' , null , '00' , 'PASyste2' , '00' , 'VNR' , '34567890' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000058', '2018-01-29 15:55:17', null , null , '2018-01-29 15:55:17', '2018-01-29 15:55:00', '2018-01-30 15:56:03', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000017' , 'DOC_0000000000000000017' , null , '00' , 'PASystem' , '03' , 'VNR' , '45678901' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000059', '2018-01-29 15:55:18', null , null , '2018-01-29 15:55:18', '2018-01-29 15:55:00', '2018-01-30 15:56:04', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000018' , 'DOC_0000000000000000018' , null , '00' , 'PASystem' , '02' , 'VNR' , '56789012' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000060', '2018-01-29 15:55:19', null , null , '2018-01-29 15:55:19', '2018-01-29 15:55:00', '2018-01-30 15:56:05', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000010' , 'DOC_0000000000000000011' , null , '00' , 'PASyste2' , '00' , 'VNR' , '67890123' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000061', '2018-01-29 15:55:20', null , null , '2018-01-29 15:55:20', '2018-01-29 15:55:00', '2018-01-30 15:56:06', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000020' , 'DOC_0000000000000000020' , null , '00' , 'PASyste2' , '01' , 'SDNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000062', '2018-01-29 15:55:21', null , null , '2018-01-29 15:55:21', '2018-01-29 15:55:00', '2018-01-30 15:56:07', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000020' , 'DOC_0000000000000000021' , null , '00' , 'PASyste2' , '01' , 'SDNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000063', '2018-01-29 15:55:22', null , null , '2018-01-29 15:55:22', '2018-01-29 15:55:00', '2018-01-30 15:56:08', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000022' , 'DOC_0000000000000000022' , null , '00' , 'PASystem' , '00' , 'SDNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000064', '2018-01-29 15:55:23', null , null , '2018-01-29 15:55:23', '2018-01-29 15:55:00', '2018-01-30 15:56:09', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000020' , 'DOC_0000000000000000021' , null , '00' , 'PASystem' , '00' , 'SDNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000065', '2018-01-29 15:55:24', null , null , '2018-01-29 15:55:24', '2018-01-29 15:55:00', '2018-01-30 15:56:10', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'READY' , 'EXTERN' , 'L1060' , 'CLI:200000000000000000000000000000000017', 'WBI:100000000000000000000000000000000015' , 'USER_3_2' , 'DOMAIN_B', 'PI_0000000000024' , 'DOC_0000000000000000024' , null , '00' , 'PASystem' , '00' , 'SDNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );

View File

@ -0,0 +1,201 @@
package pro.taskana.rest;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.util.Collections;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.boot.web.server.LocalServerPort;
import org.springframework.context.annotation.Import;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.hateoas.Link;
import org.springframework.hateoas.PagedResources;
import org.springframework.hateoas.hal.Jackson2HalModule;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.web.client.RestTemplate;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import pro.taskana.rest.resource.TaskSummaryResource;
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
@Import(RestConfiguration.class)
public class TaskControllerIntTest {
@LocalServerPort
int port;
@Test
public void testGetAllTasks() {
RestTemplate template = getRestTemplate();
HttpHeaders headers = new HttpHeaders();
headers.add("Authorization", "Basic dGVhbWxlYWRfMTp0ZWFtbGVhZF8x");
HttpEntity<String> request = new HttpEntity<String>(headers);
ResponseEntity<PagedResources<TaskSummaryResource>> response = template.exchange(
"http://127.0.0.1:" + port + "/v1/tasks", HttpMethod.GET, request,
new ParameterizedTypeReference<PagedResources<TaskSummaryResource>>() {
});
assertNotNull(response.getBody().getLink(Link.REL_SELF));
assertEquals(22, response.getBody().getContent().size());
}
@Test
public void testGetAllTasksWithAdminRole() {
RestTemplate template = getRestTemplate();
HttpHeaders headers = new HttpHeaders();
headers.add("Authorization", "Basic YWRtaW46YWRtaW4="); // Role Admin
HttpEntity<String> request = new HttpEntity<String>(headers);
ResponseEntity<PagedResources<TaskSummaryResource>> response = template.exchange(
"http://127.0.0.1:" + port + "/v1/tasks", HttpMethod.GET, request,
new ParameterizedTypeReference<PagedResources<TaskSummaryResource>>() {
});
assertNotNull(response.getBody().getLink(Link.REL_SELF));
assertEquals(70, response.getBody().getContent().size());
}
@Test
public void testGetAllTasksKeepingFilters() {
RestTemplate template = getRestTemplate();
HttpHeaders headers = new HttpHeaders();
headers.add("Authorization", "Basic dGVhbWxlYWRfMTp0ZWFtbGVhZF8x");
HttpEntity<String> request = new HttpEntity<String>(headers);
ResponseEntity<PagedResources<TaskSummaryResource>> response = template.exchange(
"http://127.0.0.1:" + port + "/v1/tasks?por.type=VNR&por.value=22334455&sortBy=por.value&order=desc",
HttpMethod.GET, request,
new ParameterizedTypeReference<PagedResources<TaskSummaryResource>>() {
});
assertNotNull(response.getBody().getLink(Link.REL_SELF));
assertTrue(response.getBody()
.getLink(Link.REL_SELF)
.getHref()
.endsWith("/v1/tasks?por.type=VNR&por.value=22334455&sortBy=por.value&order=desc"));
}
@Test
public void testGetLastPageSortedByDue() {
RestTemplate template = getRestTemplate();
HttpHeaders headers = new HttpHeaders();
headers.add("Authorization", "Basic YWRtaW46YWRtaW4="); // Role Admin
HttpEntity<String> request = new HttpEntity<String>(headers);
ResponseEntity<PagedResources<TaskSummaryResource>> response = template.exchange(
"http://127.0.0.1:" + port + "/v1/tasks?sortBy=due&order=desc&page=14&pageSize=5", HttpMethod.GET,
request,
new ParameterizedTypeReference<PagedResources<TaskSummaryResource>>() {
});
assertEquals(5, response.getBody().getContent().size());
assertTrue(response.getBody().getLink(Link.REL_LAST).getHref().contains("page=14"));
assertEquals("TKI:000000000000000000000000000000000004",
response.getBody().getContent().iterator().next().getTaskId());
assertNotNull(response.getBody().getLink(Link.REL_SELF));
assertTrue(response.getBody()
.getLink(Link.REL_SELF)
.getHref()
.endsWith("/v1/tasks?sortBy=due&order=desc&page=14&pageSize=5"));
assertNotNull(response.getBody().getLink("allTasks"));
assertTrue(response.getBody()
.getLink("allTasks")
.getHref()
.endsWith("/v1/tasks"));
assertNotNull(response.getBody().getLink(Link.REL_FIRST));
assertNotNull(response.getBody().getLink(Link.REL_LAST));
assertNotNull(response.getBody().getLink(Link.REL_PREVIOUS));
}
@Test
@Ignore
public void testGetLastPageSortedByDueWithHiddenTasksRemovedFromResult() {
RestTemplate template = getRestTemplate();
HttpHeaders headers = new HttpHeaders();
headers.add("Authorization", "Basic dGVhbWxlYWRfMTp0ZWFtbGVhZF8x");
HttpEntity<String> request = new HttpEntity<String>(headers);
ResponseEntity<PagedResources<TaskSummaryResource>> response = template.exchange(
"http://127.0.0.1:" + port + "/v1/tasks?sortBy=due&order=desc&page=14&pageSize=5", HttpMethod.GET,
request,
new ParameterizedTypeReference<PagedResources<TaskSummaryResource>>() {
});
assertEquals(5, response.getBody().getContent().size());
assertTrue(response.getBody().getLink(Link.REL_LAST).getHref().contains("page=14"));
assertEquals("TKI:000000000000000000000000000000000005",
response.getBody().getContent().iterator().next().getTaskId());
assertNotNull(response.getBody().getLink(Link.REL_SELF));
assertTrue(response.getBody()
.getLink(Link.REL_SELF)
.getHref()
.endsWith("/v1/tasks?sortBy=due&order=desc&page=2&pageSize=5"));
assertNotNull(response.getBody().getLink("allTasks"));
assertTrue(response.getBody()
.getLink("allTasks")
.getHref()
.endsWith("/v1/tasks"));
assertNotNull(response.getBody().getLink(Link.REL_FIRST));
assertNotNull(response.getBody().getLink(Link.REL_LAST));
assertNotNull(response.getBody().getLink(Link.REL_NEXT));
assertNotNull(response.getBody().getLink(Link.REL_PREVIOUS));
}
@Test
@Ignore
public void testGetQueryByPorSecondPageSortedByType() {
RestTemplate template = getRestTemplate();
HttpHeaders headers = new HttpHeaders();
headers.add("Authorization", "Basic dGVhbWxlYWRfMTp0ZWFtbGVhZF8x");
HttpEntity<String> request = new HttpEntity<String>(headers);
ResponseEntity<PagedResources<TaskSummaryResource>> response = template.exchange(
"http://127.0.0.1:" + port
+ "/v1/tasks?porCompany=00&porSystem=PASystem&porInstance=00&porType=VNR&porValue=22334455&sortBy=porType&order=asc&page=2&pageSize=5",
HttpMethod.GET,
request,
new ParameterizedTypeReference<PagedResources<TaskSummaryResource>>() {
});
assertEquals(5, response.getBody().getContent().size());
assertEquals("USER_1_1", response.getBody().getContent().iterator().next().getTaskId());
assertNotNull(response.getBody().getLink(Link.REL_SELF));
assertTrue(response.getBody()
.getLink(Link.REL_SELF)
.getHref()
.endsWith("/v1/tasks?sortBy=due&order=desc&page=2&pageSize=5"));
assertNotNull(response.getBody().getLink("allTasks"));
assertTrue(response.getBody()
.getLink("allTasks")
.getHref()
.endsWith("/v1/tasks"));
assertNotNull(response.getBody().getLink(Link.REL_FIRST));
assertNotNull(response.getBody().getLink(Link.REL_LAST));
assertNotNull(response.getBody().getLink(Link.REL_NEXT));
assertNotNull(response.getBody().getLink(Link.REL_PREVIOUS));
}
/**
* Return a REST template which is capable of dealing with responses in HAL format
*
* @return RestTemplate
*/
private RestTemplate getRestTemplate() {
ObjectMapper mapper = new ObjectMapper();
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
mapper.registerModule(new Jackson2HalModule());
MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
converter.setSupportedMediaTypes(MediaType.parseMediaTypes("application/hal+json"));
converter.setObjectMapper(mapper);
RestTemplate template = new RestTemplate(Collections.<HttpMessageConverter<?>> singletonList(converter));
return template;
}
}

View File

@ -0,0 +1,26 @@
package pro.taskana.rest;
import org.springframework.hateoas.PagedResources.PageMetadata;
import pro.taskana.exceptions.InvalidArgumentException;
/**
* Abstract superclass for taskana REST controller with pagable resources.
*/
public abstract class AbstractPagingController {
protected PageMetadata initPageMetadata(String pagesizeParam, String pageParam, long totalElements)
throws InvalidArgumentException {
long pagesize;
long page;
try {
pagesize = Long.valueOf(pagesizeParam);
page = Long.valueOf(pageParam);
} catch (NumberFormatException e) {
throw new InvalidArgumentException("page and pagesize must be a integer value.");
}
PageMetadata pageMetadata = new PageMetadata(pagesize, page, totalElements);
return pageMetadata;
}
}

View File

@ -1,12 +1,17 @@
package pro.taskana.rest;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.hateoas.PagedResources;
import org.springframework.hateoas.PagedResources.PageMetadata;
import org.springframework.hateoas.config.EnableHypermediaSupport;
import org.springframework.hateoas.config.EnableHypermediaSupport.HypermediaType;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.MultiValueMap;
@ -19,7 +24,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import pro.taskana.BaseQuery.SortDirection;
import pro.taskana.Task;
import pro.taskana.TaskQuery;
import pro.taskana.TaskService;
import pro.taskana.TaskState;
import pro.taskana.TaskSummary;
@ -32,95 +39,273 @@ import pro.taskana.exceptions.NotAuthorizedException;
import pro.taskana.exceptions.TaskAlreadyExistException;
import pro.taskana.exceptions.TaskNotFoundException;
import pro.taskana.exceptions.WorkbasketNotFoundException;
import pro.taskana.rest.query.TaskFilter;
import pro.taskana.rest.resource.TaskResource;
import pro.taskana.rest.resource.TaskSummaryResource;
import pro.taskana.rest.resource.mapper.TaskResourceAssembler;
import pro.taskana.rest.resource.mapper.TaskSummaryResourcesAssembler;
/**
* Controller for all {@link Task} related endpoints.
*/
@RestController
@RequestMapping(path = "/v1/tasks", produces = {MediaType.APPLICATION_JSON_VALUE})
public class TaskController {
@EnableHypermediaSupport(type = HypermediaType.HAL)
@RequestMapping(path = "/v1/tasks", produces = "application/hal+json")
public class TaskController extends AbstractPagingController {
private static final Logger LOGGER = LoggerFactory.getLogger(TaskController.class);
private static final String STATE = "state";
private static final String STATE_VALUE_CLAIMED = "CLAIMED";
private static final String STATE_VALUE_COMPLETED = "COMPLETED";
private static final String STATE_VALUE_READY = "READY";
private static final String PRIORITY = "priority";
private static final String NAME = "name";
private static final String OWNER = "owner";
private static final String WORKBASKET_ID = "workbasketId";
private static final String CLASSIFICATION_KEY = "classification.key";
private static final String POR_PREFIX = "por.";
private static final String POR_VALUE = "por.value";
private static final String POR_TYPE = "por.type";
private static final String POR_SYSTEM_INSTANCE = "por.instance";
private static final String POR_SYSTEM = "por.system";
private static final String POR_COMPANY = "por.company";
private static final String DUE = "due";
private static final String PLANNED = "planned";
private static final String SORT_BY = "sortBy";
private static final String SORT_DIRECTION = "order";
private static final String PAGING_PAGE = "page";
private static final String PAGING_PAGE_SIZE = "pageSize";
@Autowired
private TaskService taskService;
@Autowired
private TaskFilter taskLogic;
@GetMapping
@Transactional(readOnly = true, rollbackFor = Exception.class)
public ResponseEntity<List<TaskSummary>> getTasks(@RequestParam MultiValueMap<String, String> params)
throws NotAuthorizedException, InvalidArgumentException {
if (params.keySet().size() == 0) {
// get all
return ResponseEntity.status(HttpStatus.OK).body(taskLogic.getAll());
public ResponseEntity<PagedResources<TaskSummaryResource>> getTasks(
@RequestParam MultiValueMap<String, String> params) throws InvalidArgumentException, NotAuthorizedException {
TaskQuery query = taskService.createTaskQuery();
query = applyFilterParams(query, params);
query = applySortingParams(query, params);
PageMetadata pageMetadata = null;
List<TaskSummary> taskSummaries = null;
String page = params.getFirst(PAGING_PAGE);
String pageSize = params.getFirst(PAGING_PAGE_SIZE);
if (page != null && pageSize != null) {
// paging
long totalElements = query.count();
pageMetadata = initPageMetadata(pageSize, page,
totalElements);
taskSummaries = query.listPage((int) pageMetadata.getNumber(),
(int) pageMetadata.getSize());
} else if (page == null && pageSize == null) {
// not paging
taskSummaries = query.list();
} else {
throw new InvalidArgumentException("Paging information is incomplete.");
}
return ResponseEntity.status(HttpStatus.OK).body(taskLogic.inspectParams(params));
TaskSummaryResourcesAssembler taskSummaryResourcesAssembler = new TaskSummaryResourcesAssembler();
PagedResources<TaskSummaryResource> pagedResources = taskSummaryResourcesAssembler.toResources(taskSummaries,
pageMetadata);
return new ResponseEntity<>(pagedResources, HttpStatus.OK);
}
@GetMapping(path = "/{taskId}")
@Transactional(readOnly = true, rollbackFor = Exception.class)
public ResponseEntity<Task> getTask(@PathVariable String taskId)
public ResponseEntity<TaskResource> getTask(@PathVariable String taskId)
throws TaskNotFoundException, NotAuthorizedException {
Task task = taskService.getTask(taskId);
return ResponseEntity.status(HttpStatus.OK).body(task);
}
@GetMapping(path = "/workbasket/{workbasketId}/state/{taskState}")
@Transactional(readOnly = true, rollbackFor = Exception.class)
public ResponseEntity<List<TaskSummary>> getTasksByWorkbasketIdAndState(@PathVariable String workbasketId,
@PathVariable TaskState taskState) {
List<TaskSummary> taskList = taskService.createTaskQuery()
.workbasketIdIn(workbasketId)
.stateIn(taskState)
.list();
return ResponseEntity.status(HttpStatus.OK).body(taskList);
TaskResourceAssembler taskResourceAssembler = new TaskResourceAssembler();
ResponseEntity<TaskResource> result = new ResponseEntity<>(taskResourceAssembler.toResource(task),
HttpStatus.OK);
return result;
}
@PostMapping(path = "/{taskId}/claim")
@Transactional(rollbackFor = Exception.class)
public ResponseEntity<Task> claimTask(@PathVariable String taskId, @RequestBody String userName)
public ResponseEntity<TaskResource> claimTask(@PathVariable String taskId, @RequestBody String userName)
throws TaskNotFoundException, InvalidStateException, InvalidOwnerException, NotAuthorizedException {
// TODO verify user
taskService.claim(taskId);
Task updatedTask = taskService.getTask(taskId);
return ResponseEntity.status(HttpStatus.OK).body(updatedTask);
TaskResourceAssembler taskResourceAssembler = new TaskResourceAssembler();
ResponseEntity<TaskResource> result = new ResponseEntity<>(taskResourceAssembler.toResource(updatedTask),
HttpStatus.OK);
return result;
}
@RequestMapping(method = RequestMethod.POST, value = "/{taskId}/complete")
@Transactional(rollbackFor = Exception.class)
public ResponseEntity<Task> completeTask(@PathVariable String taskId)
public ResponseEntity<TaskResource> completeTask(@PathVariable String taskId)
throws TaskNotFoundException, InvalidOwnerException, InvalidStateException, NotAuthorizedException {
taskService.completeTask(taskId, true);
Task updatedTask = taskService.getTask(taskId);
return ResponseEntity.status(HttpStatus.OK).body(updatedTask);
TaskResourceAssembler taskResourceAssembler = new TaskResourceAssembler();
ResponseEntity<TaskResource> result = new ResponseEntity<>(taskResourceAssembler.toResource(updatedTask),
HttpStatus.OK);
return result;
}
@RequestMapping(method = RequestMethod.POST)
@Transactional(rollbackFor = Exception.class)
public ResponseEntity<Task> createTask(@RequestBody Task task)
public ResponseEntity<TaskResource> createTask(@RequestBody Task task)
throws WorkbasketNotFoundException, ClassificationNotFoundException, NotAuthorizedException,
TaskAlreadyExistException, InvalidWorkbasketException, InvalidArgumentException {
Task createdTask = taskService.createTask(task);
return ResponseEntity.status(HttpStatus.CREATED).body(createdTask);
TaskResourceAssembler taskResourceAssembler = new TaskResourceAssembler();
ResponseEntity<TaskResource> result = new ResponseEntity<>(taskResourceAssembler.toResource(createdTask),
HttpStatus.CREATED);
return result;
}
@RequestMapping(path = "/{taskId}/transfer/{workbasketKey}")
@Transactional(rollbackFor = Exception.class)
public ResponseEntity<Task> transferTask(@PathVariable String taskId, @PathVariable String workbasketKey)
public ResponseEntity<TaskResource> transferTask(@PathVariable String taskId, @PathVariable String workbasketKey)
throws TaskNotFoundException, WorkbasketNotFoundException, NotAuthorizedException, InvalidWorkbasketException {
Task updatedTask = taskService.transfer(taskId, workbasketKey);
return ResponseEntity.status(HttpStatus.CREATED).body(updatedTask);
TaskResourceAssembler taskResourceAssembler = new TaskResourceAssembler();
ResponseEntity<TaskResource> result = new ResponseEntity<>(taskResourceAssembler.toResource(updatedTask),
HttpStatus.OK);
return result;
}
@GetMapping(path = "/workbasket/{workbasketId}")
@Transactional(readOnly = true, rollbackFor = Exception.class)
public ResponseEntity<List<TaskSummary>> getTasksummariesByWorkbasketId(@PathVariable String workbasketId) {
List<TaskSummary> taskSummaries = null;
taskSummaries = taskService.createTaskQuery().workbasketIdIn(workbasketId).list();
return ResponseEntity.status(HttpStatus.OK).body(taskSummaries);
private TaskQuery applyFilterParams(TaskQuery taskQuery, MultiValueMap<String, String> params)
throws NotAuthorizedException, InvalidArgumentException {
// apply filters
if (params.containsKey(NAME)) {
String[] names = extractCommaSeperatedFields(params.get(NAME));
taskQuery.nameIn(names);
}
if (params.containsKey(PRIORITY)) {
String[] prioritesInString = extractCommaSeperatedFields(params.get(PRIORITY));
int[] priorites = extractPriorities(prioritesInString);
taskQuery.priorityIn(priorites);
}
if (params.containsKey(STATE)) {
TaskState[] states = extractStates(params);
taskQuery.stateIn(states);
}
if (params.containsKey(CLASSIFICATION_KEY)) {
String[] classificationKeys = extractCommaSeperatedFields(params.get(CLASSIFICATION_KEY));
taskQuery.classificationKeyIn(classificationKeys);
}
if (params.containsKey(WORKBASKET_ID)) {
String[] workbaskets = extractCommaSeperatedFields(params.get(WORKBASKET_ID));
taskQuery.workbasketIdIn(workbaskets);
}
if (params.containsKey(OWNER)) {
String[] owners = extractCommaSeperatedFields(params.get(OWNER));
taskQuery.ownerIn(owners);
}
// objectReference filter
if (params.keySet().stream().filter(s -> s.startsWith(POR_PREFIX)).toArray().length > 0) {
if (params.containsKey(POR_COMPANY)) {
String[] companies = extractCommaSeperatedFields(params.get(POR_COMPANY));
taskQuery.primaryObjectReferenceCompanyIn(companies);
}
if (params.containsKey(POR_SYSTEM)) {
String[] systems = extractCommaSeperatedFields(params.get(POR_SYSTEM));
taskQuery.primaryObjectReferenceSystemIn(systems);
}
if (params.containsKey(POR_SYSTEM_INSTANCE)) {
String[] systemInstances = extractCommaSeperatedFields(params.get(POR_SYSTEM_INSTANCE));
taskQuery.primaryObjectReferenceSystemInstanceIn(systemInstances);
}
if (params.containsKey(POR_TYPE)) {
String[] types = extractCommaSeperatedFields(params.get(POR_TYPE));
taskQuery.primaryObjectReferenceTypeIn(types);
}
if (params.containsKey(POR_VALUE)) {
String[] values = extractCommaSeperatedFields(params.get(POR_VALUE));
taskQuery.primaryObjectReferenceValueIn(values);
}
}
return taskQuery;
}
private TaskQuery applySortingParams(TaskQuery taskQuery, MultiValueMap<String, String> params)
throws NotAuthorizedException, InvalidArgumentException {
// sorting
String sortBy = params.getFirst(SORT_BY);
if (sortBy != null) {
SortDirection sortDirection;
if (params.getFirst(SORT_DIRECTION) != null && "desc".equals(params.getFirst(SORT_DIRECTION))) {
sortDirection = SortDirection.DESCENDING;
} else {
sortDirection = SortDirection.ASCENDING;
}
switch (sortBy) {
case (CLASSIFICATION_KEY):
taskQuery = taskQuery.orderByClassificationKey(sortDirection);
break;
case (POR_TYPE):
taskQuery = taskQuery.orderByPrimaryObjectReferenceType(sortDirection);
break;
case (POR_VALUE):
taskQuery = taskQuery.orderByPrimaryObjectReferenceValue(sortDirection);
break;
case (STATE):
taskQuery = taskQuery.orderByState(sortDirection);
break;
case (NAME):
taskQuery = taskQuery.orderByName(sortDirection);
break;
case (DUE):
taskQuery = taskQuery.orderByDue(sortDirection);
break;
case (PLANNED):
taskQuery = taskQuery.orderByPlanned(sortDirection);
break;
case (PRIORITY):
taskQuery = taskQuery.orderByPriority(sortDirection);
break;
default:
throw new InvalidArgumentException("Unknown filter attribute: " + sortBy);
}
}
return taskQuery;
}
private int[] extractPriorities(String[] prioritesInString) {
int[] priorites = new int[prioritesInString.length];
for (int i = 0; i < prioritesInString.length; i++) {
priorites[i] = Integer.getInteger(prioritesInString[i]);
}
return priorites;
}
private String[] extractCommaSeperatedFields(List<String> list) {
List<String> values = new ArrayList<>();
list.forEach(item -> values.addAll(Arrays.asList(item.split(","))));
return values.toArray(new String[0]);
}
private TaskState[] extractStates(MultiValueMap<String, String> params) throws InvalidArgumentException {
List<TaskState> states = new ArrayList<>();
for (String item : params.get(STATE)) {
for (String state : item.split(",")) {
switch (state) {
case STATE_VALUE_READY:
states.add(TaskState.READY);
break;
case STATE_VALUE_COMPLETED:
states.add(TaskState.COMPLETED);
break;
case STATE_VALUE_CLAIMED:
states.add(TaskState.CLAIMED);
break;
default:
throw new InvalidArgumentException("Unknown status '" + state + "'");
}
}
}
return states.toArray(new TaskState[0]);
}
}

View File

@ -54,7 +54,7 @@ import pro.taskana.rest.resource.mapper.WorkbasketSummaryResourcesAssembler;
@RestController
@EnableHypermediaSupport(type = HypermediaType.HAL)
@RequestMapping(path = "/v1/workbaskets", produces = "application/hal+json")
public class WorkbasketController {
public class WorkbasketController extends AbstractPagingController {
private static final String LIKE = "%";
private static final String NAME = "name";
@ -94,7 +94,7 @@ public class WorkbasketController {
@RequestParam(value = "type", required = false) String type,
@RequestParam(value = "requiredPermission", required = false) String requiredPermission,
@RequestParam(value = "page", required = false) String page,
@RequestParam(value = "pagesize", required = false) String pagesize) throws InvalidArgumentException {
@RequestParam(value = "pagesize", required = false) String pageSize) throws InvalidArgumentException {
WorkbasketQuery query = workbasketService.createWorkbasketQuery();
addSortingToQuery(query, sortBy, order);
@ -103,13 +103,13 @@ public class WorkbasketController {
PageMetadata pageMetadata = null;
List<WorkbasketSummary> workbasketSummaries = null;
if (page != null && pagesize != null) {
if (page != null && pageSize != null) {
// paging
long totalElements = query.count();
pageMetadata = initPageMetadata(pagesize, page, totalElements);
pageMetadata = initPageMetadata(pageSize, page, totalElements);
workbasketSummaries = query.listPage((int) pageMetadata.getNumber(),
(int) pageMetadata.getSize());
} else if (page == null && pagesize == null) {
} else if (page == null && pageSize == null) {
// not paging
workbasketSummaries = query.list();
} else {
@ -388,18 +388,4 @@ public class WorkbasketController {
}
}
private PageMetadata initPageMetadata(String pagesizeParam, String pageParam, long totalElements)
throws InvalidArgumentException {
long pagesize;
long page;
try {
pagesize = Long.valueOf(pagesizeParam);
page = Long.valueOf(pageParam);
} catch (NumberFormatException e) {
throw new InvalidArgumentException("page and pagesize must be a integer value.");
}
PageMetadata pageMetadata = new PageMetadata(pagesize, page, totalElements, (totalElements / pagesize) + 1);
return pageMetadata;
}
}

View File

@ -0,0 +1,83 @@
package pro.taskana.rest.resource;
import org.springframework.hateoas.ResourceSupport;
/**
* Resource class for {@link pro.taskana.Classification}.
*/
public class ClassificationSummaryResource extends ResourceSupport {
public String classificationId;
public String key;
public String parentId;
public String category;
public String type;
public String domain;
public String name;
public int priority;
public String getClassificationId() {
return classificationId;
}
public void setClassificationId(String classificationId) {
this.classificationId = classificationId;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getParentId() {
return parentId;
}
public void setParentId(String parentId) {
this.parentId = parentId;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getDomain() {
return domain;
}
public void setDomain(String domain) {
this.domain = domain;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getPriority() {
return priority;
}
public void setPriority(int priority) {
this.priority = priority;
}
}

View File

@ -0,0 +1,371 @@
package pro.taskana.rest.resource;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.springframework.hateoas.ResourceSupport;
import pro.taskana.Attachment;
import pro.taskana.TaskState;
import pro.taskana.impl.ObjectReference;
/**
* Resource class for {@link pro.taskana.WorkbasketSummary}.
*/
public class TaskResource extends ResourceSupport {
private String taskId;
private String created; // ISO-8601
private String claimed; // ISO-8601
private String completed; // ISO-8601
private String modified; // ISO-8601
private String planned; // ISO-8601
private String due; // ISO-8601
private String name;
private String creator;
private String description;
private String note;
private int priority;
private TaskState state;
private ClassificationSummaryResource classificationSummaryResource;
private WorkbasketSummaryResource workbasketSummaryResource;
private String businessProcessId;
private String parentBusinessProcessId;
private String owner;
private ObjectReference primaryObjRef;
private boolean isRead;
private boolean isTransferred;
// All objects have to be serializable
private Map<String, String> customAttributes = Collections.emptyMap();
private List<Attachment> attachments = new ArrayList<>();
private String custom1;
private String custom2;
private String custom3;
private String custom4;
private String custom5;
private String custom6;
private String custom7;
private String custom8;
private String custom9;
private String custom10;
private String custom11;
private String custom12;
private String custom13;
private String custom14;
private String custom15;
private String custom16;
public String getTaskId() {
return taskId;
}
public void setTaskId(String taskId) {
this.taskId = taskId;
}
public String getCreated() {
return created;
}
public void setCreated(String created) {
this.created = created;
}
public String getClaimed() {
return claimed;
}
public void setClaimed(String claimed) {
this.claimed = claimed;
}
public String getCompleted() {
return completed;
}
public void setCompleted(String completed) {
this.completed = completed;
}
public String getModified() {
return modified;
}
public void setModified(String modified) {
this.modified = modified;
}
public String getPlanned() {
return planned;
}
public void setPlanned(String planned) {
this.planned = planned;
}
public String getDue() {
return due;
}
public void setDue(String due) {
this.due = due;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCreator() {
return creator;
}
public void setCreator(String creator) {
this.creator = creator;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
public int getPriority() {
return priority;
}
public void setPriority(int priority) {
this.priority = priority;
}
public TaskState getState() {
return state;
}
public void setState(TaskState state) {
this.state = state;
}
public ClassificationSummaryResource getClassificationSummaryResource() {
return classificationSummaryResource;
}
public void setClassificationSummaryResource(ClassificationSummaryResource classificationSummaryResource) {
this.classificationSummaryResource = classificationSummaryResource;
}
public WorkbasketSummaryResource getWorkbasketSummaryResource() {
return workbasketSummaryResource;
}
public void setWorkbasketSummaryResource(WorkbasketSummaryResource workbasketSummaryResource) {
this.workbasketSummaryResource = workbasketSummaryResource;
}
public String getBusinessProcessId() {
return businessProcessId;
}
public void setBusinessProcessId(String businessProcessId) {
this.businessProcessId = businessProcessId;
}
public String getParentBusinessProcessId() {
return parentBusinessProcessId;
}
public void setParentBusinessProcessId(String parentBusinessProcessId) {
this.parentBusinessProcessId = parentBusinessProcessId;
}
public String getOwner() {
return owner;
}
public void setOwner(String owner) {
this.owner = owner;
}
public ObjectReference getPrimaryObjRef() {
return primaryObjRef;
}
public void setPrimaryObjRef(ObjectReference primaryObjRef) {
this.primaryObjRef = primaryObjRef;
}
public boolean isRead() {
return isRead;
}
public void setRead(boolean isRead) {
this.isRead = isRead;
}
public boolean isTransferred() {
return isTransferred;
}
public void setTransferred(boolean isTransferred) {
this.isTransferred = isTransferred;
}
public Map<String, String> getCustomAttributes() {
return customAttributes;
}
public void setCustomAttributes(Map<String, String> customAttributes) {
this.customAttributes = customAttributes;
}
public List<Attachment> getAttachments() {
return attachments;
}
public void setAttachments(List<Attachment> attachments) {
this.attachments = attachments;
}
public String getCustom1() {
return custom1;
}
public void setCustom1(String custom1) {
this.custom1 = custom1;
}
public String getCustom2() {
return custom2;
}
public void setCustom2(String custom2) {
this.custom2 = custom2;
}
public String getCustom3() {
return custom3;
}
public void setCustom3(String custom3) {
this.custom3 = custom3;
}
public String getCustom4() {
return custom4;
}
public void setCustom4(String custom4) {
this.custom4 = custom4;
}
public String getCustom5() {
return custom5;
}
public void setCustom5(String custom5) {
this.custom5 = custom5;
}
public String getCustom6() {
return custom6;
}
public void setCustom6(String custom6) {
this.custom6 = custom6;
}
public String getCustom7() {
return custom7;
}
public void setCustom7(String custom7) {
this.custom7 = custom7;
}
public String getCustom8() {
return custom8;
}
public void setCustom8(String custom8) {
this.custom8 = custom8;
}
public String getCustom9() {
return custom9;
}
public void setCustom9(String custom9) {
this.custom9 = custom9;
}
public String getCustom10() {
return custom10;
}
public void setCustom10(String custom10) {
this.custom10 = custom10;
}
public String getCustom11() {
return custom11;
}
public void setCustom11(String custom11) {
this.custom11 = custom11;
}
public String getCustom12() {
return custom12;
}
public void setCustom12(String custom12) {
this.custom12 = custom12;
}
public String getCustom13() {
return custom13;
}
public void setCustom13(String custom13) {
this.custom13 = custom13;
}
public String getCustom14() {
return custom14;
}
public void setCustom14(String custom14) {
this.custom14 = custom14;
}
public String getCustom15() {
return custom15;
}
public void setCustom15(String custom15) {
this.custom15 = custom15;
}
public String getCustom16() {
return custom16;
}
public void setCustom16(String custom16) {
this.custom16 = custom16;
}
}

View File

@ -0,0 +1,373 @@
package pro.taskana.rest.resource;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.springframework.hateoas.ResourceSupport;
import org.springframework.hateoas.core.Relation;
import pro.taskana.Attachment;
import pro.taskana.TaskState;
import pro.taskana.impl.ObjectReference;
/**
* Resource class for {@link pro.taskana.WorkbasketSummary}.
*/
@Relation(collectionRelation = "tasks")
public class TaskSummaryResource extends ResourceSupport {
private String taskId;
private String created; // ISO-8601
private String claimed; // ISO-8601
private String completed; // ISO-8601
private String modified; // ISO-8601
private String planned; // ISO-8601
private String due; // ISO-8601
private String name;
private String creator;
private String description;
private String note;
private int priority;
private TaskState state;
private ClassificationSummaryResource classificationSummaryResource;
private WorkbasketSummaryResource workbasketSummaryResource;
private String businessProcessId;
private String parentBusinessProcessId;
private String owner;
private ObjectReference primaryObjRef;
private boolean isRead;
private boolean isTransferred;
// All objects have to be serializable
private Map<String, String> customAttributes = Collections.emptyMap();
private List<Attachment> attachments = new ArrayList<>();
private String custom1;
private String custom2;
private String custom3;
private String custom4;
private String custom5;
private String custom6;
private String custom7;
private String custom8;
private String custom9;
private String custom10;
private String custom11;
private String custom12;
private String custom13;
private String custom14;
private String custom15;
private String custom16;
public String getTaskId() {
return taskId;
}
public void setTaskId(String taskId) {
this.taskId = taskId;
}
public String getCreated() {
return created;
}
public void setCreated(String created) {
this.created = created;
}
public String getClaimed() {
return claimed;
}
public void setClaimed(String claimed) {
this.claimed = claimed;
}
public String getCompleted() {
return completed;
}
public void setCompleted(String completed) {
this.completed = completed;
}
public String getModified() {
return modified;
}
public void setModified(String modified) {
this.modified = modified;
}
public String getPlanned() {
return planned;
}
public void setPlanned(String planned) {
this.planned = planned;
}
public String getDue() {
return due;
}
public void setDue(String due) {
this.due = due;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCreator() {
return creator;
}
public void setCreator(String creator) {
this.creator = creator;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
public int getPriority() {
return priority;
}
public void setPriority(int priority) {
this.priority = priority;
}
public TaskState getState() {
return state;
}
public void setState(TaskState state) {
this.state = state;
}
public ClassificationSummaryResource getClassificationSummaryResource() {
return classificationSummaryResource;
}
public void setClassificationSummaryResource(ClassificationSummaryResource classificationSummaryResource) {
this.classificationSummaryResource = classificationSummaryResource;
}
public WorkbasketSummaryResource getWorkbasketSummaryResource() {
return workbasketSummaryResource;
}
public void setWorkbasketSummaryResource(WorkbasketSummaryResource workbasketSummaryResource) {
this.workbasketSummaryResource = workbasketSummaryResource;
}
public String getBusinessProcessId() {
return businessProcessId;
}
public void setBusinessProcessId(String businessProcessId) {
this.businessProcessId = businessProcessId;
}
public String getParentBusinessProcessId() {
return parentBusinessProcessId;
}
public void setParentBusinessProcessId(String parentBusinessProcessId) {
this.parentBusinessProcessId = parentBusinessProcessId;
}
public String getOwner() {
return owner;
}
public void setOwner(String owner) {
this.owner = owner;
}
public ObjectReference getPrimaryObjRef() {
return primaryObjRef;
}
public void setPrimaryObjRef(ObjectReference primaryObjRef) {
this.primaryObjRef = primaryObjRef;
}
public boolean isRead() {
return isRead;
}
public void setRead(boolean isRead) {
this.isRead = isRead;
}
public boolean isTransferred() {
return isTransferred;
}
public void setTransferred(boolean isTransferred) {
this.isTransferred = isTransferred;
}
public Map<String, String> getCustomAttributes() {
return customAttributes;
}
public void setCustomAttributes(Map<String, String> customAttributes) {
this.customAttributes = customAttributes;
}
public List<Attachment> getAttachments() {
return attachments;
}
public void setAttachments(List<Attachment> attachments) {
this.attachments = attachments;
}
public String getCustom1() {
return custom1;
}
public void setCustom1(String custom1) {
this.custom1 = custom1;
}
public String getCustom2() {
return custom2;
}
public void setCustom2(String custom2) {
this.custom2 = custom2;
}
public String getCustom3() {
return custom3;
}
public void setCustom3(String custom3) {
this.custom3 = custom3;
}
public String getCustom4() {
return custom4;
}
public void setCustom4(String custom4) {
this.custom4 = custom4;
}
public String getCustom5() {
return custom5;
}
public void setCustom5(String custom5) {
this.custom5 = custom5;
}
public String getCustom6() {
return custom6;
}
public void setCustom6(String custom6) {
this.custom6 = custom6;
}
public String getCustom7() {
return custom7;
}
public void setCustom7(String custom7) {
this.custom7 = custom7;
}
public String getCustom8() {
return custom8;
}
public void setCustom8(String custom8) {
this.custom8 = custom8;
}
public String getCustom9() {
return custom9;
}
public void setCustom9(String custom9) {
this.custom9 = custom9;
}
public String getCustom10() {
return custom10;
}
public void setCustom10(String custom10) {
this.custom10 = custom10;
}
public String getCustom11() {
return custom11;
}
public void setCustom11(String custom11) {
this.custom11 = custom11;
}
public String getCustom12() {
return custom12;
}
public void setCustom12(String custom12) {
this.custom12 = custom12;
}
public String getCustom13() {
return custom13;
}
public void setCustom13(String custom13) {
this.custom13 = custom13;
}
public String getCustom14() {
return custom14;
}
public void setCustom14(String custom14) {
this.custom14 = custom14;
}
public String getCustom15() {
return custom15;
}
public void setCustom15(String custom15) {
this.custom15 = custom15;
}
public String getCustom16() {
return custom16;
}
public void setCustom16(String custom16) {
this.custom16 = custom16;
}
}

View File

@ -0,0 +1,59 @@
package pro.taskana.rest.resource.mapper;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.hateoas.Link;
import org.springframework.hateoas.PagedResources;
import org.springframework.hateoas.PagedResources.PageMetadata;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.servlet.support.ServletUriComponentsBuilder;
import org.springframework.web.util.UriComponentsBuilder;
/**
* Base assembler for paged list resources.
*/
public abstract class AbstractRessourcesAssembler {
UriComponentsBuilder original;
public AbstractRessourcesAssembler() {
original = getBuilderForOriginalUri();
}
protected UriComponentsBuilder getBuilderForOriginalUri() {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
.getRequest();
UriComponentsBuilder baseUri = ServletUriComponentsBuilder.fromServletMapping(request)
.path(request.getRequestURI());
for (Map.Entry<String, String[]> entry : request.getParameterMap().entrySet()) {
for (String value : entry.getValue()) {
baseUri.queryParam(entry.getKey(), value);
}
}
UriComponentsBuilder original = baseUri;
return original;
}
protected PagedResources<?> addPageLinks(PagedResources<?> pagedResources, PageMetadata pageMetadata) {
UriComponentsBuilder original = getBuilderForOriginalUri();
pagedResources.add(new Link(original.replaceQueryParam("page", 1).toUriString()).withRel(Link.REL_FIRST));
pagedResources.add(new Link(original.replaceQueryParam("page", pageMetadata.getTotalPages()).toUriString())
.withRel(Link.REL_LAST));
if (pageMetadata.getNumber() > 1) {
pagedResources
.add(new Link(original.replaceQueryParam("page", pageMetadata.getNumber() - 1).toUriString())
.withRel(Link.REL_PREVIOUS));
}
if (pageMetadata.getNumber() < pageMetadata.getTotalPages()) {
pagedResources
.add(new Link(original.replaceQueryParam("page", pageMetadata.getNumber() + 1).toUriString())
.withRel(Link.REL_NEXT));
}
return pagedResources;
}
}

View File

@ -0,0 +1,30 @@
package pro.taskana.rest.resource.mapper;
import org.springframework.beans.BeanUtils;
import org.springframework.hateoas.mvc.ResourceAssemblerSupport;
import pro.taskana.ClassificationSummary;
import pro.taskana.rest.ClassificationController;
import pro.taskana.rest.resource.ClassificationSummaryResource;
/**
* @author HH
*/
public class ClassificationSummaryResourceAssembler
extends ResourceAssemblerSupport<ClassificationSummary, ClassificationSummaryResource> {
public ClassificationSummaryResourceAssembler() {
super(ClassificationController.class, ClassificationSummaryResource.class);
}
@Override
public ClassificationSummaryResource toResource(ClassificationSummary classificationSummary) {
ClassificationSummaryResource resource = createResourceWithId(classificationSummary.getId(),
classificationSummary);
BeanUtils.copyProperties(classificationSummary, resource);
// named different so needs to be set by hand
resource.setClassificationId(classificationSummary.getId());
return resource;
}
}

View File

@ -0,0 +1,49 @@
package pro.taskana.rest.resource.mapper;
import org.springframework.beans.BeanUtils;
import org.springframework.hateoas.mvc.ResourceAssemblerSupport;
import pro.taskana.Task;
import pro.taskana.rest.TaskController;
import pro.taskana.rest.resource.TaskResource;
/**
* @author HH
*/
public class TaskResourceAssembler
extends ResourceAssemblerSupport<Task, TaskResource> {
private WorkbasketSummaryResourceAssembler workbasketAssembler = new WorkbasketSummaryResourceAssembler();
private ClassificationSummaryResourceAssembler classificationAssembler = new ClassificationSummaryResourceAssembler();
public TaskResourceAssembler() {
super(TaskController.class, TaskResource.class);
}
@Override
public TaskResource toResource(Task task) {
TaskResource resource = createResourceWithId(task.getId(), task);
BeanUtils.copyProperties(task, resource);
resource.setTaskId(task.getId());
if (task.getCreated() != null) {
resource.setCreated(task.getCreated().toString());
}
if (task.getModified() != null) {
resource.setModified(task.getModified().toString());
}
if (task.getClaimed() != null) {
resource.setClaimed(task.getClaimed().toString());
}
if (task.getCompleted() != null) {
resource.setCompleted(task.getCompleted().toString());
}
if (task.getDue() != null) {
resource.setDue(task.getDue().toString());
}
resource.setClassificationSummaryResource(
classificationAssembler.toResource(task.getClassificationSummary()));
resource.setWorkbasketSummaryResource(workbasketAssembler.toResource(task.getWorkbasketSummary()));
return resource;
}
}

View File

@ -0,0 +1,48 @@
package pro.taskana.rest.resource.mapper;
import org.springframework.beans.BeanUtils;
import org.springframework.hateoas.mvc.ResourceAssemblerSupport;
import pro.taskana.TaskSummary;
import pro.taskana.rest.TaskController;
import pro.taskana.rest.resource.TaskSummaryResource;
/**
* @author HH
*/
public class TaskSummaryResourceAssembler
extends ResourceAssemblerSupport<TaskSummary, TaskSummaryResource> {
private WorkbasketSummaryResourceAssembler workbasketAssembler = new WorkbasketSummaryResourceAssembler();
private ClassificationSummaryResourceAssembler classificationAssembler = new ClassificationSummaryResourceAssembler();
public TaskSummaryResourceAssembler() {
super(TaskController.class, TaskSummaryResource.class);
}
@Override
public TaskSummaryResource toResource(TaskSummary taskSummary) {
TaskSummaryResource resource = createResourceWithId(taskSummary.getTaskId(), taskSummary);
BeanUtils.copyProperties(taskSummary, resource);
if (taskSummary.getCreated() != null) {
resource.setCreated(taskSummary.getCreated().toString());
}
if (taskSummary.getModified() != null) {
resource.setModified(taskSummary.getModified().toString());
}
if (taskSummary.getClaimed() != null) {
resource.setClaimed(taskSummary.getClaimed().toString());
}
if (taskSummary.getCompleted() != null) {
resource.setCompleted(taskSummary.getCompleted().toString());
}
if (taskSummary.getDue() != null) {
resource.setDue(taskSummary.getDue().toString());
}
resource.setClassificationSummaryResource(
classificationAssembler.toResource(taskSummary.getClassificationSummary()));
resource.setWorkbasketSummaryResource(workbasketAssembler.toResource(taskSummary.getWorkbasketSummary()));
return resource;
}
}

View File

@ -0,0 +1,42 @@
package pro.taskana.rest.resource.mapper;
import static org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo;
import java.util.List;
import org.springframework.hateoas.Link;
import org.springframework.hateoas.PagedResources;
import org.springframework.hateoas.PagedResources.PageMetadata;
import pro.taskana.TaskSummary;
import pro.taskana.rest.TaskController;
import pro.taskana.rest.resource.TaskSummaryResource;
/**
* @author HH
*/
public class TaskSummaryResourcesAssembler extends AbstractRessourcesAssembler {
public TaskSummaryResourcesAssembler() {
super();
}
public PagedResources<TaskSummaryResource> toResources(List<TaskSummary> taskSummaries,
PageMetadata pageMetadata) {
TaskSummaryResourceAssembler assembler = new TaskSummaryResourceAssembler();
List<TaskSummaryResource> resources = assembler.toResources(taskSummaries);
PagedResources<TaskSummaryResource> pagedResources = new PagedResources<TaskSummaryResource>(
resources,
pageMetadata);
pagedResources.add(new Link(original.toUriString()).withSelfRel());
if (pageMetadata != null) {
pagedResources.add(linkTo(TaskController.class).withRel("allTasks"));
addPageLinks(pagedResources, pageMetadata);
}
return pagedResources;
}
}