diff --git a/lib/taskana-core/src/main/java/pro/taskana/WorkbasketQuery.java b/lib/taskana-core/src/main/java/pro/taskana/WorkbasketQuery.java index 3c7b8e1f9..7f900d55a 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/WorkbasketQuery.java +++ b/lib/taskana-core/src/main/java/pro/taskana/WorkbasketQuery.java @@ -485,10 +485,10 @@ public interface WorkbasketQuery extends BaseQuery { /** * Add to your query if the Workbasket shall be marked for deletion. * - * @param deletionFlag - * a simple flag showing if deletion flag is activated + * @param markedForDeletion + * a simple flag showing if the workbasket is marked for deletion * @return the query */ - WorkbasketQuery deletionFlagEquals(Boolean deletionFlag); + WorkbasketQuery markedForDeletion(boolean markedForDeletion); } diff --git a/lib/taskana-core/src/main/java/pro/taskana/impl/WorkbasketQueryImpl.java b/lib/taskana-core/src/main/java/pro/taskana/impl/WorkbasketQueryImpl.java index 6da208180..029fd58f8 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/impl/WorkbasketQueryImpl.java +++ b/lib/taskana-core/src/main/java/pro/taskana/impl/WorkbasketQueryImpl.java @@ -67,7 +67,7 @@ public class WorkbasketQueryImpl implements WorkbasketQuery { private String[] orgLevel3Like; private String[] orgLevel4In; private String[] orgLevel4Like; - private boolean isDeletionFlagActivated; + private boolean markedForDeletion; private TaskanaEngineImpl taskanaEngine; private List orderBy; @@ -275,8 +275,8 @@ public class WorkbasketQueryImpl implements WorkbasketQuery { } @Override - public WorkbasketQuery deletionFlagEquals(Boolean deletionFlag) { - this.isDeletionFlagActivated = deletionFlag; + public WorkbasketQuery markedForDeletion(boolean markedForDeletion) { + this.markedForDeletion = markedForDeletion; return this; } @@ -404,7 +404,6 @@ public class WorkbasketQueryImpl implements WorkbasketQuery { this.columnName = columnName; handleCallerRolesAndAccessIds(); this.orderBy.clear(); - //this.addOrderCriteria(columnName, sortDirection); result = taskanaEngine.getSqlSession().selectList(LINK_TO_VALUEMAPPER, this); return result; } finally { @@ -595,8 +594,8 @@ public class WorkbasketQueryImpl implements WorkbasketQuery { return orgLevel4Like; } - public boolean isDeletionFlagActivated() { - return isDeletionFlagActivated; + public boolean isMarkedForDeletion() { + return markedForDeletion; } public String[] getOwnerLike() { @@ -700,8 +699,8 @@ public class WorkbasketQueryImpl implements WorkbasketQuery { builder.append(Arrays.toString(orgLevel4In)); builder.append(", orgLevel4Like="); builder.append(Arrays.toString(orgLevel4Like)); - builder.append(", deletionFlag="); - builder.append(isDeletionFlagActivated); + builder.append(", markedForDeletion="); + builder.append(markedForDeletion); builder.append(", orderBy="); builder.append(orderBy); builder.append(", joinWithAccessList="); diff --git a/lib/taskana-core/src/main/java/pro/taskana/impl/WorkbasketServiceImpl.java b/lib/taskana-core/src/main/java/pro/taskana/impl/WorkbasketServiceImpl.java index f931906fb..0c043d12d 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/impl/WorkbasketServiceImpl.java +++ b/lib/taskana-core/src/main/java/pro/taskana/impl/WorkbasketServiceImpl.java @@ -727,6 +727,7 @@ public class WorkbasketServiceImpl implements WorkbasketService { throws NotAuthorizedException, WorkbasketNotFoundException, WorkbasketInUseException, InvalidArgumentException { LOGGER.debug("entry to deleteWorkbasket(workbasketId = {})", workbasketId); taskanaEngine.checkRoleMembership(TaskanaRole.BUSINESS_ADMIN, TaskanaRole.ADMIN); + try { taskanaEngine.openConnection(); if (workbasketId == null || workbasketId.isEmpty()) { @@ -736,25 +737,26 @@ public class WorkbasketServiceImpl implements WorkbasketService { // check if the workbasket does exist and is empty (Task) this.getWorkbasket(workbasketId); - long numTasksInWorkbasket = taskanaEngine.getTaskService() + long numTasksNotCompletedInWorkbasket = taskanaEngine.getTaskService() .createTaskQuery() .workbasketIdIn(workbasketId) .stateNotIn( TaskState.COMPLETED) .count(); - if (numTasksInWorkbasket > 0) { + if (numTasksNotCompletedInWorkbasket > 0) { throw new WorkbasketInUseException( "Workbasket " + workbasketId + " contains non-completed tasks and can“t be marked for deletion."); } - numTasksInWorkbasket = taskanaEngine.getTaskService() + long numTasksInWorkbasket = taskanaEngine.getTaskService() .createTaskQuery() .workbasketIdIn(workbasketId) .count(); if (numTasksInWorkbasket == 0) { workbasketMapper.delete(workbasketId); + deleteReferencesToWorkbasket(workbasketId); return true; } else { markWorkbasketForDeletion(workbasketId); @@ -780,22 +782,14 @@ public class WorkbasketServiceImpl implements WorkbasketService { WorkbasketImpl workbasket = workbasketMapper.findById(workbasketId); workbasket.setMarkedForDeletion(true); workbasketMapper.update(workbasket); - deleteWorkbasketTablesReferences(workbasketId); } finally { taskanaEngine.returnConnection(); LOGGER.debug("exit from markWorkbasketForDeletion(workbasketId = {}).", workbasketId); } } - private void deleteWorkbasketTablesReferences(String workbasketId) { - // delete workbasket and sub-tables - distributionTargetMapper.deleteAllDistributionTargetsBySourceId(workbasketId); - distributionTargetMapper.deleteAllDistributionTargetsByTargetId(workbasketId); - workbasketAccessMapper.deleteAllAccessItemsForWorkbasketId(workbasketId); - } - public BulkOperationResults deleteWorkbaskets(List workbasketsIds) - throws NotAuthorizedException, InvalidArgumentException, WorkbasketInUseException, WorkbasketNotFoundException { + throws NotAuthorizedException, InvalidArgumentException { LOGGER.debug("entry to deleteWorkbaskets(workbasketId = {})", LoggerUtils.listToString(workbasketsIds)); taskanaEngine.checkRoleMembership(TaskanaRole.BUSINESS_ADMIN, TaskanaRole.ADMIN); @@ -805,16 +799,23 @@ public class WorkbasketServiceImpl implements WorkbasketService { if (workbasketsIds == null || workbasketsIds.isEmpty()) { throw new InvalidArgumentException("List of WorkbasketIds must not be null."); } + BulkOperationResults bulkLog = new BulkOperationResults<>(); - List existingWorkbasketIds = workbasketMapper.findExistingWorkbaskets(workbasketsIds); - BulkOperationResults bulkLog = cleanNonExistingWorkbasketExists( - existingWorkbasketIds, - workbasketsIds); - - if (!existingWorkbasketIds.isEmpty()) { - Iterator iterator = existingWorkbasketIds.iterator(); + if (!workbasketsIds.isEmpty()) { + Iterator iterator = workbasketsIds.iterator(); + String workbasketIdForDeleting = null; while (iterator.hasNext()) { - deleteWorkbasket(iterator.next()); + try { + workbasketIdForDeleting = iterator.next(); + deleteWorkbasket(workbasketIdForDeleting); + } catch (WorkbasketInUseException ex) { + bulkLog.addError(workbasketIdForDeleting, new WorkbasketInUseException( + "Workbasket with id " + workbasketIdForDeleting + " is in use and will not be deleted.")); + } catch (TaskanaException ex) { + bulkLog.addError(workbasketIdForDeleting, new TaskanaException( + "Workbasket with id " + workbasketIdForDeleting + + " Throw an exception and couldn't be deleted.")); + } } } return bulkLog; @@ -830,30 +831,11 @@ public class WorkbasketServiceImpl implements WorkbasketService { return new WorkbasketAccessItemQueryImpl(this.taskanaEngine); } - private BulkOperationResults cleanNonExistingWorkbasketExists( - List existingWorkbasketIds, - List workbasketIds) { - BulkOperationResults bulkLog = new BulkOperationResults<>(); - Iterator workbasketIdIterator = existingWorkbasketIds.iterator(); - while (workbasketIdIterator.hasNext()) { - String currentWorkbasketId = workbasketIdIterator.next(); - if (currentWorkbasketId == null || currentWorkbasketId.equals("")) { - bulkLog.addError("", - new InvalidArgumentException("IDs with EMPTY or NULL value are not allowed.")); - workbasketIdIterator.remove(); - } else { - String foundSummary = workbasketIds.stream() - .filter(workbasketId -> currentWorkbasketId.equals(workbasketId)) - .findFirst() - .orElse(null); - if (foundSummary == null) { - bulkLog.addError(currentWorkbasketId, new WorkbasketNotFoundException(currentWorkbasketId, - "Workbasket with id " + currentWorkbasketId + " was not found.")); - workbasketIdIterator.remove(); - } - } - } - return bulkLog; + private void deleteReferencesToWorkbasket(String workbasketId) { + // deletes sub-tables workbasket references + distributionTargetMapper.deleteAllDistributionTargetsBySourceId(workbasketId); + distributionTargetMapper.deleteAllDistributionTargetsByTargetId(workbasketId); + workbasketAccessMapper.deleteAllAccessItemsForWorkbasketId(workbasketId); } } diff --git a/lib/taskana-core/src/main/java/pro/taskana/jobs/WorkbasketCleanupJob.java b/lib/taskana-core/src/main/java/pro/taskana/jobs/WorkbasketCleanupJob.java index 8b2e663d7..e8b8edb99 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/jobs/WorkbasketCleanupJob.java +++ b/lib/taskana-core/src/main/java/pro/taskana/jobs/WorkbasketCleanupJob.java @@ -2,8 +2,6 @@ package pro.taskana.jobs; import java.time.Duration; import java.time.Instant; -import java.util.ArrayList; -import java.util.Iterator; import java.util.List; import org.slf4j.Logger; @@ -11,14 +9,12 @@ import org.slf4j.LoggerFactory; import pro.taskana.BaseQuery; import pro.taskana.BulkOperationResults; -import pro.taskana.TaskService; import pro.taskana.TaskanaEngine; import pro.taskana.exceptions.InvalidArgumentException; import pro.taskana.exceptions.NotAuthorizedException; import pro.taskana.exceptions.TaskanaException; import pro.taskana.exceptions.WorkbasketInUseException; import pro.taskana.exceptions.WorkbasketNotFoundException; -import pro.taskana.impl.util.LoggerUtils; import pro.taskana.transaction.TaskanaTransactionProvider; /** @@ -64,38 +60,15 @@ public class WorkbasketCleanupJob extends AbstractTaskanaJob { } } - private List getWorkbasketsMarkedForDeletion() throws InvalidArgumentException { + private List getWorkbasketsMarkedForDeletion() { List workbasketList = taskanaEngineImpl.getWorkbasketService() .createWorkbasketQuery() - .deletionFlagEquals(true) + .markedForDeletion(true) .listValues("ID", BaseQuery.SortDirection.ASCENDING); - workbasketList = excludeWorkbasketWithPendingTasks(workbasketList); return workbasketList; } - private List excludeWorkbasketWithPendingTasks(List workbasketList) - throws InvalidArgumentException { - TaskService taskService = taskanaEngineImpl.getTaskService(); - ArrayList workbasketDeletionList = new ArrayList<>(); - ArrayList workbasketWithNonCompletedTasksList = new ArrayList<>(); - - if (!workbasketList.isEmpty()) { - Iterator iterator = workbasketList.iterator(); - while (iterator.hasNext()) { - String workbasketId = iterator.next(); - if (taskService.allTasksCompletedByWorkbasketId(workbasketId)) { - workbasketDeletionList.add(workbasketId); - } else { - workbasketWithNonCompletedTasksList.add(workbasketId); - } - } - } - LOGGER.info("workbasket marked for deletion with non completed tasks {}.", - LoggerUtils.listToString(workbasketWithNonCompletedTasksList)); - return workbasketDeletionList; - } - private int deleteWorkbasketsTransactionally(List workbasketsToBeDeleted) { int deletedWorkbasketsCount = 0; if (txProvider != null) { diff --git a/lib/taskana-core/src/main/java/pro/taskana/mappings/QueryMapper.java b/lib/taskana-core/src/main/java/pro/taskana/mappings/QueryMapper.java index 73c98733a..ddb5a2ed3 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/mappings/QueryMapper.java +++ b/lib/taskana-core/src/main/java/pro/taskana/mappings/QueryMapper.java @@ -1167,7 +1167,7 @@ public interface QueryMapper { + "AND (UPPER(w.ORG_LEVEL_3) LIKE #{item}) " + "AND w.ORG_LEVEL_4 IN(#{item}) " + "AND (UPPER(w.ORG_LEVEL_4) LIKE #{item}) " - + "AND w.DELETION_FLAG = #{isDeletionFlagActivated} " + + "AND w.MARKED_FOR_DELETION = #{markedForDeletion} " + " " + " " + "AND (a.MAX_READ = 1 " diff --git a/lib/taskana-core/src/main/java/pro/taskana/mappings/TaskMapper.java b/lib/taskana-core/src/main/java/pro/taskana/mappings/TaskMapper.java index 2623f3cbb..231b7f2c3 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/mappings/TaskMapper.java +++ b/lib/taskana-core/src/main/java/pro/taskana/mappings/TaskMapper.java @@ -231,10 +231,4 @@ public interface TaskMapper { @Result(property = "taskId", column = "ID")}) List filterTaskIdsForNotCompleted(@Param("taskIds") List taskIds); - @Select("") - Long countTasksInWorkbasket(@Param("workbasketId") String workbasketId); - } diff --git a/lib/taskana-core/src/main/java/pro/taskana/mappings/WorkbasketMapper.java b/lib/taskana-core/src/main/java/pro/taskana/mappings/WorkbasketMapper.java index 2e3d84e70..10009e536 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/mappings/WorkbasketMapper.java +++ b/lib/taskana-core/src/main/java/pro/taskana/mappings/WorkbasketMapper.java @@ -152,12 +152,6 @@ public interface WorkbasketMapper { @Result(property = "orgLevel4", column = "ORG_LEVEL_4")}) List findAll(); - @Select("") - List findExistingWorkbaskets(@Param("workbasketIds") List workbasketIds); - @Insert("") @Options(keyProperty = "id", keyColumn = "ID") diff --git a/lib/taskana-core/src/test/java/acceptance/jobs/WorkbasketCleanupJobAccTest.java b/lib/taskana-core/src/test/java/acceptance/jobs/WorkbasketCleanupJobAccTest.java index 7826ddcbd..2eb63d6fd 100644 --- a/lib/taskana-core/src/test/java/acceptance/jobs/WorkbasketCleanupJobAccTest.java +++ b/lib/taskana-core/src/test/java/acceptance/jobs/WorkbasketCleanupJobAccTest.java @@ -1,6 +1,9 @@ package acceptance.jobs; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; + +import java.util.List; import org.junit.After; import org.junit.Before; @@ -10,14 +13,15 @@ import org.junit.runner.RunWith; import acceptance.AbstractAccTest; import pro.taskana.BaseQuery; import pro.taskana.TaskService; +import pro.taskana.TaskState; import pro.taskana.WorkbasketService; import pro.taskana.WorkbasketSummary; +import pro.taskana.exceptions.TaskanaException; +import pro.taskana.jobs.TaskCleanupJob; import pro.taskana.jobs.WorkbasketCleanupJob; import pro.taskana.security.JAASRunner; import pro.taskana.security.WithAccessId; -import java.util.List; - /** * Acceptance test for all "jobs workbasket runner" scenarios. */ @@ -40,19 +44,29 @@ public class WorkbasketCleanupJobAccTest extends AbstractAccTest { @WithAccessId(userName = "admin") @Test - public void shouldCleanWorkbasketMarkedForDeletion() throws Exception { + public void shouldCleanWorkbasketMarkedForDeletionWithoutTasks() throws TaskanaException { long totalWorkbasketCount = workbasketService.createWorkbasketQuery().count(); assertEquals(25, totalWorkbasketCount); List workbaskets = workbasketService.createWorkbasketQuery() - .keyIn("GPK_KSC", "sort001") + .keyIn("TEAMLEAD_1") .orderByKey( BaseQuery.SortDirection.ASCENDING) .list(); - assertEquals(taskService.allTasksCompletedByWorkbasketId(workbaskets.get(1).getId()), true); - workbasketService.markWorkbasketForDeletion(workbaskets.get(1).getId()); - WorkbasketCleanupJob job = new WorkbasketCleanupJob(taskanaEngine, null, null); - job.run(); + assertEquals(getNumberTaskNotCompleted(workbaskets.get(0).getId()), 0); + assertEquals(getNumberTaskCompleted(workbaskets.get(0).getId()), 1); + + // Workbasket with completed task will be marked for deletion. + workbasketService.deleteWorkbasket(workbaskets.get(0).getId()); + + // Run taskCleanupJob for deleting completing tasks before running workbasketCleanupJob + TaskCleanupJob taskCleanupJob = new TaskCleanupJob(taskanaEngine, null, null); + taskCleanupJob.run(); + + assertEquals(getNumberTaskCompleted(workbaskets.get(0).getId()), 0); + + WorkbasketCleanupJob workbasketCleanupJob = new WorkbasketCleanupJob(taskanaEngine, null, null); + workbasketCleanupJob.run(); totalWorkbasketCount = workbasketService.createWorkbasketQuery().count(); assertEquals(24, totalWorkbasketCount); @@ -60,23 +74,42 @@ public class WorkbasketCleanupJobAccTest extends AbstractAccTest { @WithAccessId(userName = "admin") @Test - public void shouldCleanWorkbasketMarkedForDeletionWithCompletedTasks() throws Exception { + public void shouldNotCleanWorkbasketMarkedForDeletionIfWorkbasketHasTasks() throws Exception { long totalWorkbasketCount = workbasketService.createWorkbasketQuery().count(); assertEquals(25, totalWorkbasketCount); List workbaskets = workbasketService.createWorkbasketQuery() - .keyIn("GPK_KSC", "sort001") + .keyIn("TEAMLEAD_1") .orderByKey( BaseQuery.SortDirection.ASCENDING) .list(); - assertEquals(taskService.allTasksCompletedByWorkbasketId(workbaskets.get(0).getId()), false); - assertEquals(taskService.allTasksCompletedByWorkbasketId(workbaskets.get(1).getId()), true); - workbasketService.markWorkbasketForDeletion(workbaskets.get(0).getId()); - workbasketService.markWorkbasketForDeletion(workbaskets.get(1).getId()); + + assertNotEquals(getNumberTaskCompleted(workbaskets.get(0).getId()), 0); + + // Workbasket with completed task will be marked for deletion. + workbasketService.deleteWorkbasket(workbaskets.get(0).getId()); WorkbasketCleanupJob job = new WorkbasketCleanupJob(taskanaEngine, null, null); job.run(); totalWorkbasketCount = workbasketService.createWorkbasketQuery().count(); - assertEquals(24, totalWorkbasketCount); + assertEquals(25, totalWorkbasketCount); + } + + private long getNumberTaskNotCompleted(String workbasketId) { + return taskService + .createTaskQuery() + .workbasketIdIn(workbasketId) + .stateNotIn( + TaskState.COMPLETED) + .count(); + } + + private long getNumberTaskCompleted(String workbasketId) { + return taskService + .createTaskQuery() + .workbasketIdIn(workbasketId) + .stateIn( + TaskState.COMPLETED) + .count(); } } diff --git a/lib/taskana-core/src/test/java/pro/taskana/impl/WorkbasketServiceImplTest.java b/lib/taskana-core/src/test/java/pro/taskana/impl/WorkbasketServiceImplTest.java index 8a7ffdae2..0b53ecc8a 100644 --- a/lib/taskana-core/src/test/java/pro/taskana/impl/WorkbasketServiceImplTest.java +++ b/lib/taskana-core/src/test/java/pro/taskana/impl/WorkbasketServiceImplTest.java @@ -549,7 +549,6 @@ public class WorkbasketServiceImplTest { verify(cutSpy, times(1)).getWorkbasket(wb.getId()); verify(taskanaEngineImplMock, times(0)).getSqlSession(); verify(sqlSessionMock, times(0)).getMapper(TaskMapper.class); - verify(taskMapperMock, times(0)).countTasksInWorkbasket(any()); verify(workbasketMapperMock, times(1)).findById(wb.getId()); verify(taskanaEngineImplMock, times(2)).returnConnection(); diff --git a/lib/taskana-core/src/test/resources/sql/task.sql b/lib/taskana-core/src/test/resources/sql/task.sql index 1c710e9f3..96b293a95 100644 --- a/lib/taskana-core/src/test/resources/sql/task.sql +++ b/lib/taskana-core/src/test/resources/sql/task.sql @@ -73,5 +73,5 @@ INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000063', '2018-01-29 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 , 'abc' , 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 , 'abc' , null , null ); -- Task for TransferAccTest -INSERT INTO TASK VALUES('TKI:100000000000000000000000000000000006', '2018-01-29 15:55:06', '2018-01-30 15:55:06', '2018-01-30 16:55:06', '2018-01-30 16:55:06', '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:100000000000000000000000000000000004' , 'TEAMLEAD_1' , '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 , 'abc' , null , null ); +INSERT INTO TASK VALUES('TKI:100000000000000000000000000000000006', '2018-01-29 15:55:06', '2018-01-30 15:55:06', '2018-01-30 16:55:06', '2018-01-30 16:55:06', '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:100000000000000000000000000000000004' , 'TEAMLEAD_1' , 'DOMAIN_A', 'PI_0000000000041' , 'DOC_0000000000000000041' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , 'abc' , null , null ); INSERT INTO TASK VALUES('TKI:200000000000000000000000000000000006', '2018-03-29 15:55:06', '2018-03-30 15:55:06', null , '2018-03-30 15:55:06', '2018-03-29 15:55:00', '2018-03-30 15:55:00', 'Widerruf' , 'creator_user_id' , 'Widerruf' , null , 2 , 'COMPLETED' , 'EXTERN' , 'L1050' , 'CLI:100000000000000000000000000000000003', 'WBI:100000000000000000000000000000000005' , 'TEAMLEAD_2' , 'DOMAIN_A', 'PI_0000000000006' , 'DOC_0000000000000000006' , null , '00' , 'PASystem' , '00' , 'SDNR' , '98765432' , false , false , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , 'abc' , null , null );