TSK-163: Attachment functions add/remove/update implemented. Acc+Unit

Test added
This commit is contained in:
Marcel Lengl 2018-01-24 16:22:40 +01:00 committed by BerndBreier
parent 012cef45f9
commit 663ce463b2
22 changed files with 897 additions and 90 deletions

View File

@ -382,7 +382,8 @@ public interface Task {
void setCustom10(String custom10);
/**
* Add an attachment.
* Add an attachment.<br>
* NULL will be ignored and an attachment with the same ID will be replaced by the newer one.<br>
*
* @param attachment
* the {@link Attachment attachment} to be added to the task
@ -390,7 +391,9 @@ public interface Task {
void addAttachment(Attachment attachment);
/**
* Return the attachments for this task.
* Return the attachments for this task. <br>
* Do not use List.add()/addAll() for adding Elements, because it can cause redundant data. Use addAttachment().
* Clear() and remove() can be used, because it´s a controllable change.
*
* @return the {@link List list} of {@link Attachment attachments} for this task
*/
@ -418,4 +421,14 @@ public interface Task {
*/
TaskSummary asSummary();
/**
* Removes an attachment of the current task locally, when the ID is represented and does return the removed
* attachment or null if there was no match.<br>
* The changed Task need to be updated calling the {@link TaskService#updateTask(Task)}.
*
* @param attachmentID
* ID of the attachment which should be removed.
* @return attachment which will be removed after updating OR null if there was no matching attachment
*/
Attachment removeAttachment(String attachmentID);
}

View File

@ -2,6 +2,7 @@ package pro.taskana;
import java.util.List;
import pro.taskana.exceptions.AttachmentPersistenceException;
import pro.taskana.exceptions.ClassificationNotFoundException;
import pro.taskana.exceptions.ConcurrencyException;
import pro.taskana.exceptions.InvalidArgumentException;
@ -229,8 +230,10 @@ public interface TaskService {
* if the updated task refers to a work basket that cannot be found
* @throws NotAuthorizedException
* if the current user is not authorized to update the task
* @throws AttachmentPersistenceException
* if an Attachment with ID will be added multiple times without using the task-methods.
*/
Task updateTask(Task task) throws InvalidArgumentException, TaskNotFoundException, ConcurrencyException,
WorkbasketNotFoundException, ClassificationNotFoundException, InvalidWorkbasketException,
NotAuthorizedException;
NotAuthorizedException, AttachmentPersistenceException;
}

View File

@ -0,0 +1,15 @@
package pro.taskana.exceptions;
/**
* Thrown, when an attachment should be inserted to the DB, but it does already exist.<br>
* This may happen when a not persisted attachment with ID will be added twice on a task. This can´t be happen it the
* correct Task-Methods will be used instead the List ones.
*/
public class AttachmentPersistenceException extends TaskanaException {
private static final long serialVersionUID = 123L;
public AttachmentPersistenceException(String attachmentId) {
super("AttachmentId=" + attachmentId);
}
}

View File

@ -138,6 +138,108 @@ public class AttachmentImpl implements Attachment {
return summary;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((channel == null) ? 0 : channel.hashCode());
result = prime * result + ((classificationKey == null) ? 0 : classificationKey.hashCode());
result = prime * result + ((classificationSummary == null) ? 0 : classificationSummary.hashCode());
result = prime * result + ((created == null) ? 0 : created.hashCode());
result = prime * result + ((customAttributes == null) ? 0 : customAttributes.hashCode());
result = prime * result + ((id == null) ? 0 : id.hashCode());
result = prime * result + ((modified == null) ? 0 : modified.hashCode());
result = prime * result + ((objectReference == null) ? 0 : objectReference.hashCode());
result = prime * result + ((received == null) ? 0 : received.hashCode());
result = prime * result + ((taskId == null) ? 0 : taskId.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
AttachmentImpl other = (AttachmentImpl) obj;
if (channel == null) {
if (other.channel != null) {
return false;
}
} else if (!channel.equals(other.channel)) {
return false;
}
if (classificationKey == null) {
if (other.classificationKey != null) {
return false;
}
} else if (!classificationKey.equals(other.classificationKey)) {
return false;
}
if (classificationSummary == null) {
if (other.classificationSummary != null) {
return false;
}
} else if (!classificationSummary.equals(other.classificationSummary)) {
return false;
}
if (created == null) {
if (other.created != null) {
return false;
}
} else if (!created.equals(other.created)) {
return false;
}
if (customAttributes == null) {
if (other.customAttributes != null) {
return false;
}
} else if (!customAttributes.equals(other.customAttributes)) {
return false;
}
if (id == null) {
if (other.id != null) {
return false;
}
} else if (!id.equals(other.id)) {
return false;
}
if (modified == null) {
if (other.modified != null) {
return false;
}
} else if (!modified.equals(other.modified)) {
return false;
}
if (objectReference == null) {
if (other.objectReference != null) {
return false;
}
} else if (!objectReference.equals(other.objectReference)) {
return false;
}
if (received == null) {
if (other.received != null) {
return false;
}
} else if (!received.equals(other.received)) {
return false;
}
if (taskId == null) {
if (other.taskId != null) {
return false;
}
} else if (!taskId.equals(other.taskId)) {
return false;
}
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
@ -146,7 +248,7 @@ public class AttachmentImpl implements Attachment {
builder.append(", taskId=");
builder.append(taskId);
builder.append(", created=");
builder.append(created.toString());
builder.append(created);
builder.append(", modified=");
builder.append(modified);
builder.append(", classificationKey=");

View File

@ -276,7 +276,7 @@ public class ClassificationImpl implements Classification {
builder.append(", isValidInDomain=");
builder.append(isValidInDomain);
builder.append(", created=");
builder.append(created.toString());
builder.append(created);
builder.append(", name=");
builder.append(name);
builder.append(", description=");

View File

@ -3,6 +3,7 @@ package pro.taskana.impl;
import java.time.Instant;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@ -45,7 +46,7 @@ public class TaskImpl implements Task {
private boolean isTransferred;
// All objects have to be serializable
private Map<String, Object> customAttributes = Collections.emptyMap();
private List<Attachment> attachments;
private List<Attachment> attachments = new ArrayList<>();
private String custom1;
private String custom2;
private String custom3;
@ -377,11 +378,22 @@ public class TaskImpl implements Task {
}
@Override
public void addAttachment(Attachment attachment) {
public void addAttachment(Attachment attachmentToAdd) {
if (attachments == null) {
attachments = new ArrayList<Attachment>();
}
attachments.add(attachment);
if (attachmentToAdd != null) {
if (attachmentToAdd.getId() != null) {
Iterator<Attachment> i = attachments.iterator();
while (i.hasNext()) {
Attachment attachment = i.next();
if (attachmentToAdd.getId().equals(attachment.getId())) {
i.remove();
}
}
}
attachments.add(attachmentToAdd);
}
}
@Override
@ -432,7 +444,11 @@ public class TaskImpl implements Task {
}
public void setAttachments(List<Attachment> attachments) {
this.attachments = attachments;
if (attachments != null) {
this.attachments = attachments;
} else if (this.attachments == null) {
this.attachments = new ArrayList<>();
}
}
public String getClassificationKey() {
@ -443,23 +459,39 @@ public class TaskImpl implements Task {
this.classificationSummary = classificationSummary;
}
@Override
public Attachment removeAttachment(String attachmentId) {
Attachment result = null;
Iterator<Attachment> i = attachments.iterator();
while (i.hasNext()) {
Attachment attachment = i.next();
if (attachment.getId().equals(attachmentId)) {
if (attachments.remove(attachment)) {
result = attachment;
break;
}
}
}
return result;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("TaskImpl [id=");
builder.append(id);
builder.append(", created=");
builder.append(created.toString());
builder.append(created);
builder.append(", claimed=");
builder.append(claimed.toString());
builder.append(claimed);
builder.append(", completed=");
builder.append(completed.toString());
builder.append(completed);
builder.append(", modified=");
builder.append(modified.toString());
builder.append(modified);
builder.append(", planned=");
builder.append(planned.toString());
builder.append(planned);
builder.append(", due=");
builder.append(due.toString());
builder.append(due);
builder.append(", name=");
builder.append(name);
builder.append(", description=");

View File

@ -4,10 +4,12 @@ import java.time.Duration;
import java.time.Instant;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import org.apache.ibatis.exceptions.PersistenceException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -22,6 +24,7 @@ import pro.taskana.TaskanaEngine;
import pro.taskana.Workbasket;
import pro.taskana.WorkbasketService;
import pro.taskana.WorkbasketSummary;
import pro.taskana.exceptions.AttachmentPersistenceException;
import pro.taskana.exceptions.ClassificationNotFoundException;
import pro.taskana.exceptions.ConcurrencyException;
import pro.taskana.exceptions.InvalidArgumentException;
@ -323,7 +326,8 @@ public class TaskServiceImpl implements TaskService {
@Override
public Task updateTask(Task task)
throws InvalidArgumentException, TaskNotFoundException, ConcurrencyException, WorkbasketNotFoundException,
ClassificationNotFoundException, InvalidWorkbasketException, NotAuthorizedException {
ClassificationNotFoundException, InvalidWorkbasketException, NotAuthorizedException,
AttachmentPersistenceException {
String userId = CurrentUserContext.getUserid();
LOGGER.debug("entry to updateTask(task = {}, userId = {})", task, userId);
TaskImpl newTaskImpl = (TaskImpl) task;
@ -332,6 +336,8 @@ public class TaskServiceImpl implements TaskService {
taskanaEngineImpl.openConnection();
oldTaskImpl = (TaskImpl) getTask(newTaskImpl.getId());
standardUpdateActions(oldTaskImpl, newTaskImpl);
handleAttachmentsOnTaskUpdate(oldTaskImpl, newTaskImpl);
newTaskImpl.setModified(Instant.now());
taskMapper.update(newTaskImpl);
LOGGER.debug("Method updateTask() updated task '{}' for user '{}'.", task.getId(), userId);
@ -387,12 +393,12 @@ public class TaskServiceImpl implements TaskService {
List<Attachment> attachments = task.getAttachments();
if (attachments != null) {
for (Attachment attachment : attachments) {
AttachmentImpl attImpl = (AttachmentImpl) attachment;
attImpl.setId(IdGenerator.generateWithPrefix(ID_PREFIX_ATTACHMENT));
attImpl.setTaskId(task.getId());
attImpl.setCreated(now);
attImpl.setModified(now);
attachmentMapper.insert(attImpl);
AttachmentImpl attachmentImpl = (AttachmentImpl) attachment;
attachmentImpl.setId(IdGenerator.generateWithPrefix(ID_PREFIX_ATTACHMENT));
attachmentImpl.setTaskId(task.getId());
attachmentImpl.setCreated(now);
attachmentImpl.setModified(now);
attachmentMapper.insert(attachmentImpl);
}
}
@ -679,12 +685,18 @@ public class TaskServiceImpl implements TaskService {
if (attachments == null || attachments.isEmpty()) {
return;
}
for (Attachment attachment : attachments) {
ObjectReference objRef = attachment.getObjectReference();
validateObjectReference(objRef, "ObjectReference", "Attachment");
if (attachment.getClassificationSummary() == null) {
throw new InvalidArgumentException("Classification of attachment " + attachment + " must not be null");
Iterator<Attachment> i = attachments.iterator();
while (i.hasNext()) {
Attachment attachment = i.next();
if (attachment == null) {
i.remove();
} else {
ObjectReference objRef = attachment.getObjectReference();
validateObjectReference(objRef, "ObjectReference", "Attachment");
if (attachment.getClassificationSummary() == null) {
throw new InvalidArgumentException(
"Classification of attachment " + attachment + " must not be null");
}
}
}
}
@ -751,8 +763,90 @@ public class TaskServiceImpl implements TaskService {
newTaskImpl.setModified(Instant.now());
}
AttachmentMapper getAttachmentMapper() {
return attachmentMapper;
private void handleAttachmentsOnTaskUpdate(TaskImpl oldTaskImpl, TaskImpl newTaskImpl)
throws AttachmentPersistenceException {
// Iterator for removing invalid current values directly. OldAttachments can be ignored.
Iterator<Attachment> i = newTaskImpl.getAttachments().iterator();
while (i.hasNext()) {
Attachment attachment = i.next();
if (attachment != null) {
boolean wasAlreadyRepresented = false;
if (attachment.getId() != null) {
for (Attachment oldAttachment : oldTaskImpl.getAttachments()) {
if (oldAttachment != null) {
// UPDATE when id is represented but objects are not equal
if (attachment.getId().equals(oldAttachment.getId())) {
wasAlreadyRepresented = true;
if (!attachment.equals(oldAttachment)) {
AttachmentImpl temp = (AttachmentImpl) attachment;
temp.setModified(Instant.now());
attachmentMapper.update(temp);
LOGGER.debug("TaskService.updateTask() for TaskId={} UPDATED an Attachment={}.",
newTaskImpl.getId(),
attachment);
break;
}
}
}
}
}
// ADD, when ID not set or not found in elements
if (!wasAlreadyRepresented) {
AttachmentImpl attachmentImpl = (AttachmentImpl) attachment;
initAttachment(attachmentImpl, newTaskImpl);
try {
attachmentMapper.insert(attachmentImpl);
LOGGER.debug("TaskService.updateTask() for TaskId={} INSERTED an Attachment={}.",
newTaskImpl.getId(),
attachmentImpl);
} catch (PersistenceException e) {
LOGGER.error(
"TaskService.updateTask() for TaskId={} can NOT INSERT the current Attachment, because it was added fored multiple times and wasn´t persisted before. ID={}",
newTaskImpl.getId(), attachmentImpl.getId());
throw new AttachmentPersistenceException(attachmentImpl.getId());
}
}
} else {
i.remove();
}
}
// DELETE, when an Attachment was only represented before
for (Attachment oldAttachment : oldTaskImpl.getAttachments()) {
if (oldAttachment != null) {
boolean isRepresented = false;
for (Attachment newAttachment : newTaskImpl.getAttachments()) {
if (newAttachment != null) {
if (oldAttachment.getId().equals(newAttachment.getId())) {
isRepresented = true;
break;
}
}
}
if (!isRepresented) {
attachmentMapper.deleteAttachment(oldAttachment.getId());
LOGGER.debug("TaskService.updateTask() for TaskId={} DELETED an Attachment={}.",
newTaskImpl.getId(),
oldAttachment);
}
}
}
}
private void initAttachment(AttachmentImpl attachment, Task newTask) {
if (attachment.getId() == null) {
attachment.setId(IdGenerator.generateWithPrefix(ID_PREFIX_ATTACHMENT));
}
if (attachment.getCreated() == null) {
attachment.setCreated(Instant.now());
}
if (attachment.getModified() == null) {
attachment.setModified(attachment.getCreated());
}
if (attachment.getTaskId() == null) {
attachment.setTaskId(newTask.getId());
}
}
}

View File

@ -3,11 +3,13 @@ package pro.taskana.model.mappings;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.type.JdbcType;
import pro.taskana.impl.AttachmentImpl;
@ -19,7 +21,6 @@ import pro.taskana.impl.persistence.MapTypeHandler;
*/
public interface AttachmentMapper {
@Insert("INSERT INTO ATTACHMENT (ID, TASK_ID, CREATED, MODIFIED, CLASSIFICATION_KEY, REF_COMPANY, REF_SYSTEM, REF_INSTANCE, REF_TYPE, REF_VALUE, CHANNEL, RECEIVED, CUSTOM_ATTRIBUTES) "
+ "VALUES (#{att.id}, #{att.taskId}, #{att.created}, #{att.modified}, #{att.classificationSummary.key}, #{att.objectReference.company}, #{att.objectReference.system}, #{att.objectReference.systemInstance}, "
+ " #{att.objectReference.type}, #{att.objectReference.value}, #{att.channel}, #{att.received}, #{att.customAttributes,jdbcType=BLOB,javaType=java.util.Map,typeHandler=pro.taskana.impl.persistence.MapTypeHandler} )")
@ -46,6 +47,27 @@ public interface AttachmentMapper {
})
List<AttachmentImpl> findAttachmentsByTaskId(@Param("taskId") String taskId);
@Select("SELECT ID, TASK_ID, CREATED, MODIFIED, CLASSIFICATION_KEY, REF_COMPANY, REF_SYSTEM, REF_INSTANCE, REF_TYPE, REF_VALUE, CHANNEL, RECEIVED, CUSTOM_ATTRIBUTES "
+ "FROM ATTACHMENT "
+ "WHERE ID = #{attachmentId}")
@Results(value = {
@Result(property = "id", column = "ID"),
@Result(property = "taskId", column = "TASK_ID"),
@Result(property = "created", column = "CREATED"),
@Result(property = "modified", column = "MODIFIED"),
@Result(property = "classificationSummaryImpl.key", column = "CLASSIFICATION_KEY"),
@Result(property = "objectReference.company", column = "REF_COMPANY"),
@Result(property = "objectReference.system", column = "REF_SYSTEM"),
@Result(property = "objectReference.systemInstance", column = "REF_INSTANCE"),
@Result(property = "objectReference.type", column = "REF_TYPE"),
@Result(property = "objectReference.value", column = "REF_VALUE"),
@Result(property = "channel", column = "CHANNEL"),
@Result(property = "received", column = "RECEIVED"),
@Result(property = "customAttributes", column = "CUSTOM_ATTRIBUTES", jdbcType = JdbcType.BLOB,
javaType = Map.class, typeHandler = MapTypeHandler.class)
})
AttachmentImpl getAttachment(@Param("attachmentId") String attachmentId);
@Select("<script>SELECT ID, TASK_ID, CREATED, MODIFIED, CLASSIFICATION_KEY, RECEIVED "
+ "FROM ATTACHMENT "
+ "<where>"
@ -62,4 +84,13 @@ public interface AttachmentMapper {
})
List<AttachmentSummaryImpl> findAttachmentSummariesByTaskIds(String[] taskIds);
@Delete("DELETE FROM ATTACHMENT WHERE ID=#{attachmentId}")
void deleteAttachment(@Param("attachmentId") String attachmentId);
@Update("UPDATE ATTACHMENT SET TASK_ID = #{taskId}, CREATED = #{created}, MODIFIED = #{modified},"
+ " CLASSIFICATION_KEY = #{classificationSummary.key}, REF_COMPANY = #{objectReference.company}, REF_SYSTEM = #{objectReference.system},"
+ " REF_INSTANCE = #{objectReference.systemInstance}, REF_TYPE = #{objectReference.type}, REF_VALUE = #{objectReference.value},"
+ " CHANNEL = #{channel}, RECEIVED = #{received}, CUSTOM_ATTRIBUTES = #{customAttributes,jdbcType=BLOB,javaType=java.util.Map,typeHandler=pro.taskana.impl.persistence.MapTypeHandler}"
+ " WHERE ID = #{id}")
void update(AttachmentImpl attachment);
}

View File

@ -21,7 +21,7 @@ public interface ClassificationMapper {
+ "FROM CLASSIFICATION "
+ "WHERE KEY = #{key}"
+ "AND DOMAIN = #{domain}")
@Results({ @Result(property = "id", column = "ID"),
@Results({@Result(property = "id", column = "ID"),
@Result(property = "key", column = "KEY"),
@Result(property = "parentClassificationKey", column = "PARENT_CLASSIFICATION_KEY"),
@Result(property = "category", column = "CATEGORY"),
@ -41,7 +41,7 @@ public interface ClassificationMapper {
@Result(property = "custom5", column = "CUSTOM_5"),
@Result(property = "custom6", column = "CUSTOM_6"),
@Result(property = "custom7", column = "CUSTOM_7"),
@Result(property = "custom8", column = "CUSTOM_8") })
@Result(property = "custom8", column = "CUSTOM_8")})
ClassificationImpl findByKeyAndDomain(@Param("key") String key, @Param("domain") String domain);
@Insert("INSERT INTO CLASSIFICATION (ID, KEY, PARENT_CLASSIFICATION_KEY, CATEGORY, TYPE, DOMAIN, VALID_IN_DOMAIN, CREATED, NAME, DESCRIPTION, PRIORITY, SERVICE_LEVEL, APPLICATION_ENTRY_POINT, CUSTOM_1, CUSTOM_2, CUSTOM_3, CUSTOM_4, CUSTOM_5, CUSTOM_6, CUSTOM_7, CUSTOM_8) VALUES (#{classification.id}, #{classification.key}, #{classification.parentClassificationKey}, #{classification.category}, #{classification.type}, #{classification.domain}, #{classification.isValidInDomain}, #{classification.created}, #{classification.name}, #{classification.description}, #{classification.priority}, #{classification.serviceLevel}, #{classification.applicationEntryPoint}, #{classification.custom1}, #{classification.custom2}, #{classification.custom3}, #{classification.custom4}, #{classification.custom5}, #{classification.custom6}, #{classification.custom7}, #{classification.custom8})")
@ -58,12 +58,12 @@ public interface ClassificationMapper {
+ "AND DOMAIN = #{domain}"
+ "ORDER BY KEY DESC"
+ "</script>")
@Results({ @Result(property = "id", column = "ID"),
@Results({@Result(property = "id", column = "ID"),
@Result(property = "key", column = "KEY"),
@Result(property = "category", column = "CATEGORY"),
@Result(property = "type", column = "TYPE"),
@Result(property = "domain", column = "DOMAIN"),
@Result(property = "name", column = "NAME") })
@Result(property = "name", column = "NAME")})
List<ClassificationSummaryImpl> getAllClassificationsWithKey(@Param("key") String key,
@Param("domain") String domain);
@ -72,7 +72,7 @@ public interface ClassificationMapper {
+ "FROM CLASSIFICATION AS C LEFT JOIN WORKBASKET AS W ON C.DOMAIN = W.DOMAIN "
+ "WHERE c.KEY = #{classificationKey}"
+ "AND W.KEY = #{workbasketKey}")
@Results({ @Result(property = "id", column = "ID"),
@Results({@Result(property = "id", column = "ID"),
@Result(property = "key", column = "KEY"),
@Result(property = "parentClassificationKey", column = "PARENT_CLASSIFICATION_KEY"),
@Result(property = "category", column = "CATEGORY"),
@ -92,7 +92,7 @@ public interface ClassificationMapper {
@Result(property = "custom5", column = "CUSTOM_5"),
@Result(property = "custom6", column = "CUSTOM_6"),
@Result(property = "custom7", column = "CUSTOM_7"),
@Result(property = "custom8", column = "CUSTOM_8") })
@Result(property = "custom8", column = "CUSTOM_8")})
ClassificationImpl findByTask(@Param("classificationKey") String classificationKey,
@Param("workbasketKey") String workbasketKey);
}

View File

@ -81,18 +81,16 @@ public class CreateTaskAccTest extends AbstractAccTest {
TaskService taskService = taskanaEngine.getTaskService();
Task newTask = taskService.newTask();
newTask.setClassificationKey("L12010");
newTask.addAttachment(createAttachment("DOKTYP_DEFAULT",
newTask.addAttachment(createAttachment("DOCTYPE_DEFAULT",
createObjectReference("COMPANY_A", "SYSTEM_B", "INSTANCE_B", "ArchiveId",
"12345678901234567890123456789012345678901234567890"),
"E-MAIL", "2018-01-15", createSimpleCustomProperties(3)));
newTask.setPrimaryObjRef(createObjectReference("COMPANY_A", "SYSTEM_A", "INSTANCE_A", "VNR", "1234567"));
newTask.setWorkbasketKey("USER_1_1");
Task createdTask = taskService.createTask(newTask);
assertNotNull(createdTask.getId());
Task readTask = taskService.getTask(createdTask.getId());
assertNotNull(readTask);
assertNotNull(readTask.getAttachments());
assertEquals(1, readTask.getAttachments().size());
@ -116,11 +114,11 @@ public class CreateTaskAccTest extends AbstractAccTest {
newTask.setClassificationKey("L12010");
newTask.setPrimaryObjRef(createObjectReference("COMPANY_A", "SYSTEM_A", "INSTANCE_A", "VNR", "1234567"));
newTask.setWorkbasketKey("USER_1_1");
newTask.addAttachment(createAttachment("DOKTYP_DEFAULT",
newTask.addAttachment(createAttachment("DOCTYPE_DEFAULT",
createObjectReference("COMPANY_A", "SYSTEM_B", "INSTANCE_B", "ArchiveId",
"12345678901234567890123456789012345678901234567890"),
"E-MAIL", "2018-01-15", createSimpleCustomProperties(3)));
newTask.addAttachment(createAttachment("DOKTYP_DEFAULT",
newTask.addAttachment(createAttachment("DOCTYPE_DEFAULT",
createObjectReference("COMPANY_A", "SYSTEM_B", "INSTANCE_B", "ArchiveId",
"12345678901234567890123456789012345678901234567890"),
"E-MAIL", "2018-01-15", createSimpleCustomProperties(3)));
@ -151,7 +149,7 @@ public class CreateTaskAccTest extends AbstractAccTest {
TaskService taskService = taskanaEngine.getTaskService();
Task createdTask = null;
Task newTask = makeNewTask(taskService);
newTask.addAttachment(createAttachment("DOKTYP_DEFAULT",
newTask.addAttachment(createAttachment("DOCTYPE_DEFAULT",
null,
"E-MAIL", "2018-01-15", createSimpleCustomProperties(3)));
try {
@ -161,7 +159,7 @@ public class CreateTaskAccTest extends AbstractAccTest {
}
newTask = makeNewTask(taskService);
newTask.addAttachment(createAttachment("DOKTYP_DEFAULT",
newTask.addAttachment(createAttachment("DOCTYPE_DEFAULT",
createObjectReference("COMPANY_A", "SYSTEM_B", "INSTANCE_B", "ArchiveId", null),
"E-MAIL", "2018-01-15", createSimpleCustomProperties(3)));
try {
@ -171,7 +169,7 @@ public class CreateTaskAccTest extends AbstractAccTest {
}
newTask = makeNewTask(taskService);
newTask.addAttachment(createAttachment("DOKTYP_DEFAULT",
newTask.addAttachment(createAttachment("DOCTYPE_DEFAULT",
createObjectReference("COMPANY_A", "SYSTEM_B", "INSTANCE_B", null,
"12345678901234567890123456789012345678901234567890"),
"E-MAIL", "2018-01-15", createSimpleCustomProperties(3)));
@ -181,7 +179,7 @@ public class CreateTaskAccTest extends AbstractAccTest {
// nothing to do
}
newTask = makeNewTask(taskService);
newTask.addAttachment(createAttachment("DOKTYP_DEFAULT",
newTask.addAttachment(createAttachment("DOCTYPE_DEFAULT",
createObjectReference("COMPANY_A", "SYSTEM_B", null, "ArchiveId",
"12345678901234567890123456789012345678901234567890"),
"E-MAIL", "2018-01-15", createSimpleCustomProperties(3)));
@ -191,7 +189,7 @@ public class CreateTaskAccTest extends AbstractAccTest {
// nothing to do
}
newTask = makeNewTask(taskService);
newTask.addAttachment(createAttachment("DOKTYP_DEFAULT",
newTask.addAttachment(createAttachment("DOCTYPE_DEFAULT",
createObjectReference("COMPANY_A", null, "INSTANCE_B", "ArchiveId",
"12345678901234567890123456789012345678901234567890"),
"E-MAIL", "2018-01-15", createSimpleCustomProperties(3)));
@ -201,7 +199,7 @@ public class CreateTaskAccTest extends AbstractAccTest {
// nothing to do
}
newTask = makeNewTask(taskService);
newTask.addAttachment(createAttachment("DOKTYP_DEFAULT",
newTask.addAttachment(createAttachment("DOCTYPE_DEFAULT",
createObjectReference(null, "SYSTEM_B", "INSTANCE_B", "ArchiveId",
"12345678901234567890123456789012345678901234567890"),
"E-MAIL", "2018-01-15", createSimpleCustomProperties(3)));

View File

@ -20,6 +20,7 @@ import acceptance.AbstractAccTest;
import pro.taskana.ClassificationSummary;
import pro.taskana.Task;
import pro.taskana.TaskService;
import pro.taskana.exceptions.AttachmentPersistenceException;
import pro.taskana.exceptions.ClassificationNotFoundException;
import pro.taskana.exceptions.ConcurrencyException;
import pro.taskana.exceptions.InvalidArgumentException;
@ -48,7 +49,7 @@ public class UpdateTaskAccTest extends AbstractAccTest {
public void testUpdatePrimaryObjectReferenceOfTask()
throws SQLException, NotAuthorizedException, InvalidArgumentException, ClassificationNotFoundException,
WorkbasketNotFoundException, TaskAlreadyExistException, InvalidWorkbasketException, TaskNotFoundException,
ConcurrencyException {
ConcurrencyException, AttachmentPersistenceException {
TaskService taskService = taskanaEngine.getTaskService();
Task task = taskService.getTask("TKI:000000000000000000000000000000000000");
@ -72,7 +73,7 @@ public class UpdateTaskAccTest extends AbstractAccTest {
public void testThrowsExceptionIfMandatoryPrimaryObjectReferenceIsNotSetOrIncomplete()
throws SQLException, NotAuthorizedException, InvalidArgumentException, ClassificationNotFoundException,
WorkbasketNotFoundException, TaskAlreadyExistException, InvalidWorkbasketException, TaskNotFoundException,
ConcurrencyException {
ConcurrencyException, AttachmentPersistenceException {
TaskService taskService = taskanaEngine.getTaskService();
Task task = taskService.getTask("TKI:000000000000000000000000000000000000");
@ -130,7 +131,7 @@ public class UpdateTaskAccTest extends AbstractAccTest {
public void testThrowsExceptionIfTaskHasAlreadyBeenUpdated()
throws SQLException, NotAuthorizedException, InvalidArgumentException, ClassificationNotFoundException,
WorkbasketNotFoundException, TaskAlreadyExistException, InvalidWorkbasketException, TaskNotFoundException,
ConcurrencyException {
ConcurrencyException, AttachmentPersistenceException {
TaskService taskService = taskanaEngine.getTaskService();
Task task = taskService.getTask("TKI:000000000000000000000000000000000000");
@ -156,7 +157,8 @@ public class UpdateTaskAccTest extends AbstractAccTest {
@Test
public void testUpdateClassificationOfTask()
throws TaskNotFoundException, WorkbasketNotFoundException, ClassificationNotFoundException,
InvalidArgumentException, ConcurrencyException, InvalidWorkbasketException, NotAuthorizedException {
InvalidArgumentException, ConcurrencyException, InvalidWorkbasketException, NotAuthorizedException,
AttachmentPersistenceException {
TaskService taskService = taskanaEngine.getTaskService();
Task task = taskService.getTask("TKI:000000000000000000000000000000000000");
@ -180,7 +182,8 @@ public class UpdateTaskAccTest extends AbstractAccTest {
@Test
public void testCustomPropertiesOfTask()
throws TaskNotFoundException, WorkbasketNotFoundException, ClassificationNotFoundException,
InvalidArgumentException, ConcurrencyException, InvalidWorkbasketException, NotAuthorizedException {
InvalidArgumentException, ConcurrencyException, InvalidWorkbasketException, NotAuthorizedException,
AttachmentPersistenceException {
TaskService taskService = taskanaEngine.getTaskService();
Task task = taskService.getTask("TKI:000000000000000000000000000000000000");
task.setCustom1("T2100");
@ -197,7 +200,7 @@ public class UpdateTaskAccTest extends AbstractAccTest {
public void testUpdateOfWorkbasketKeyWhatIsNotAllowed()
throws SQLException, NotAuthorizedException, InvalidArgumentException, ClassificationNotFoundException,
WorkbasketNotFoundException, TaskAlreadyExistException, InvalidWorkbasketException, TaskNotFoundException,
ConcurrencyException {
ConcurrencyException, AttachmentPersistenceException {
TaskService taskService = taskanaEngine.getTaskService();
Task task = taskService.getTask("TKI:000000000000000000000000000000000000");

View File

@ -0,0 +1,239 @@
package acceptance.task;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.hamcrest.core.IsNot.not;
import static org.junit.Assert.assertThat;
import java.sql.SQLException;
import java.util.ArrayList;
import org.h2.store.fs.FileUtils;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import acceptance.AbstractAccTest;
import pro.taskana.Attachment;
import pro.taskana.Task;
import pro.taskana.TaskService;
import pro.taskana.exceptions.AttachmentPersistenceException;
import pro.taskana.exceptions.ClassificationNotFoundException;
import pro.taskana.exceptions.ConcurrencyException;
import pro.taskana.exceptions.InvalidArgumentException;
import pro.taskana.exceptions.InvalidWorkbasketException;
import pro.taskana.exceptions.NotAuthorizedException;
import pro.taskana.exceptions.TaskNotFoundException;
import pro.taskana.exceptions.WorkbasketNotFoundException;
import pro.taskana.impl.AttachmentImpl;
import pro.taskana.impl.TaskImpl;
import pro.taskana.security.JAASRunner;
/**
* Acceptance test for the usecase of adding/removing an attachment of a task and update the result correctly.
*/
@RunWith(JAASRunner.class)
public class UpdateTaskAttachmentsAccTest extends AbstractAccTest {
private Task task;
private Attachment attachment;
TaskService taskService;
public UpdateTaskAttachmentsAccTest() {
super();
}
@Before
public void setUpMethod()
throws TaskNotFoundException, ClassificationNotFoundException, NotAuthorizedException, SQLException,
WorkbasketNotFoundException, InvalidArgumentException, ConcurrencyException, InvalidWorkbasketException,
AttachmentPersistenceException {
taskService = taskanaEngine.getTaskService();
task = taskService.getTask("TKI:000000000000000000000000000000000000");
attachment = createAttachment("DOCTYPE_DEFAULT",
createObjectReference("COMPANY_A", "SYSTEM_B", "INSTANCE_B", "ArchiveId",
"12345678901234567890123456789012345678901234567890"),
"E-MAIL", "2018-01-15", createSimpleCustomProperties(3));
task.getAttachments().clear();
taskService.updateTask(task);
assertThat(task, not(equalTo(null)));
}
@Test
public void testAddNewAttachment()
throws TaskNotFoundException, ClassificationNotFoundException, NotAuthorizedException,
WorkbasketNotFoundException, InvalidArgumentException, ConcurrencyException, InvalidWorkbasketException,
AttachmentPersistenceException {
int attachmentCount = task.getAttachments().size();
task.addAttachment(attachment);
task = taskService.updateTask(task);
task = taskService.getTask(task.getId());
assertThat(task.getAttachments().size(), equalTo(attachmentCount + 1));
assertThat(task.getAttachments().get(0).getClassificationSummary().getKey(), equalTo("DOCTYPE_DEFAULT"));
}
@Test(expected = AttachmentPersistenceException.class)
public void testAddNewAttachmentTwiceWithoutTaskanaMethodWillThrowAttachmentPersistenceException()
throws TaskNotFoundException, WorkbasketNotFoundException, ClassificationNotFoundException,
InvalidArgumentException, ConcurrencyException, InvalidWorkbasketException, NotAuthorizedException,
AttachmentPersistenceException {
int attachmentCount = 0;
task.getAttachments().clear();
task = taskService.updateTask(task);
task = taskService.getTask(task.getId());
assertThat(task.getAttachments().size(), equalTo(attachmentCount));
AttachmentImpl attachment = (AttachmentImpl) this.attachment;
attachment.setId("TAI:000017");
task.getAttachments().add(attachment);
task.getAttachments().add(attachment);
task.getAttachments().add(attachment);
task = taskService.updateTask(task);
}
@Test
public void testAddExistingAttachmentAgainWillUpdateWhenNotEqual()
throws TaskNotFoundException, ClassificationNotFoundException, NotAuthorizedException,
WorkbasketNotFoundException, InvalidArgumentException, ConcurrencyException, InvalidWorkbasketException,
AttachmentPersistenceException {
// Add attachment before
task = taskService.getTask(task.getId());
int attachmentCount = task.getAttachments().size();
task.addAttachment(attachment);
task = taskService.updateTask(task);
task = taskService.getTask(task.getId());
assertThat(task.getAttachments().size(), equalTo(attachmentCount + 1));
// Change sth. and add same (id) again - override/update
String newChannel = "UPDATED EXTERNAL SINCE LAST ADD";
attachmentCount = task.getAttachments().size();
Attachment updatedAttachment = task.getAttachments().get(0);
updatedAttachment.setChannel(newChannel);
task.addAttachment(updatedAttachment);
task = taskService.updateTask(task);
task = taskService.getTask(task.getId());
assertThat(task.getAttachments().size(), equalTo(attachmentCount));
assertThat(task.getAttachments().get(0).getChannel(), equalTo(newChannel));
}
@Test
public void testAddExistingAttachmentAgainWillDoNothingWhenEqual()
throws TaskNotFoundException, ClassificationNotFoundException, NotAuthorizedException,
WorkbasketNotFoundException, InvalidArgumentException, ConcurrencyException, InvalidWorkbasketException,
AttachmentPersistenceException {
// Add Attachment before
int attachmentCount = task.getAttachments().size();
((AttachmentImpl) attachment).setId("TAI:0001");
task.addAttachment(attachment);
task.addAttachment(attachment); // overwrite, same id
task.addAttachment(attachment); // overwrite, same id
task = taskService.updateTask(task);
task = taskService.getTask(task.getId());
assertThat(task.getAttachments().size(), equalTo(attachmentCount + 1));
// Add same again - ignored
attachmentCount = task.getAttachments().size();
Attachment redundantAttachment = task.getAttachments().get(0);
task.addAttachment(redundantAttachment);
task = taskService.updateTask(task);
assertThat(task.getAttachments().size(), equalTo(attachmentCount));
}
@Test
public void testAddAttachmentAsNullValueWillBeIgnored()
throws TaskNotFoundException, WorkbasketNotFoundException, ClassificationNotFoundException,
InvalidArgumentException, ConcurrencyException, InvalidWorkbasketException, NotAuthorizedException,
AttachmentPersistenceException {
// Try to add a single NULL-Element
int attachmentCount = task.getAttachments().size();
task.addAttachment(null);
task = taskService.updateTask(task);
task = taskService.getTask(task.getId());
assertThat(task.getAttachments().size(), equalTo(attachmentCount));
// Try to set the Attachments to NULL and update it
((TaskImpl) task).setAttachments(null);
task = taskService.updateTask(task);
assertThat(task.getAttachments().size(), equalTo(attachmentCount)); // locally, not persisted
task = taskService.getTask(task.getId());
assertThat(task.getAttachments().size(), equalTo(attachmentCount)); // persisted values not changed
// Test no NullPointer on NULL-Value and removing it on current data.
// New loading can do this, but returned value should got this "function", too.
attachmentCount = task.getAttachments().size();
task.getAttachments().add(null);
task.getAttachments().add(null);
task.getAttachments().add(null);
task = taskService.updateTask(task);
assertThat(task.getAttachments().size(), equalTo(attachmentCount)); // locally, not persisted
task = taskService.getTask(task.getId());
assertThat(task.getAttachments().size(), equalTo(attachmentCount)); // persisted values not changed
}
@Test
public void testRemoveAttachment()
throws TaskNotFoundException, WorkbasketNotFoundException, ClassificationNotFoundException,
InvalidArgumentException, ConcurrencyException, InvalidWorkbasketException, NotAuthorizedException,
AttachmentPersistenceException {
task.addAttachment(attachment);
task = taskService.updateTask(task);
int attachmentCount = task.getAttachments().size();
Attachment attachmentToRemove = task.getAttachments().get(0);
task.removeAttachment(attachmentToRemove.getId());
task = taskService.updateTask(task);
assertThat(task.getAttachments().size(), equalTo(attachmentCount - 1)); // locally, removed and not persisted
task = taskService.getTask(task.getId());
assertThat(task.getAttachments().size(), equalTo(attachmentCount - 1)); // persisted, values removed
}
@Test
public void testRemoveAttachmentWithNullAndNotAddedId()
throws TaskNotFoundException, WorkbasketNotFoundException, ClassificationNotFoundException,
InvalidArgumentException, ConcurrencyException, InvalidWorkbasketException, NotAuthorizedException,
AttachmentPersistenceException {
task.addAttachment(attachment);
task = taskService.updateTask(task);
int attachmentCount = task.getAttachments().size();
task.removeAttachment(null);
task = taskService.updateTask(task);
assertThat(task.getAttachments().size(), equalTo(attachmentCount)); // locally, nothing changed
task = taskService.getTask(task.getId());
assertThat(task.getAttachments().size(), equalTo(attachmentCount)); // persisted, still same
task.removeAttachment("INVALID ID HERE");
task = taskService.updateTask(task);
assertThat(task.getAttachments().size(), equalTo(attachmentCount)); // locally, nothing changed
task = taskService.getTask(task.getId());
assertThat(task.getAttachments().size(), equalTo(attachmentCount)); // persisted, still same
}
@Test
public void testUpdateAttachment()
throws TaskNotFoundException, WorkbasketNotFoundException, ClassificationNotFoundException,
InvalidArgumentException, ConcurrencyException, InvalidWorkbasketException, NotAuthorizedException,
AttachmentPersistenceException {
((TaskImpl) task).setAttachments(new ArrayList<>());
task = taskService.updateTask(task);
Attachment attachment = this.attachment;
task.addAttachment(attachment);
task = taskService.updateTask(task);
int attachmentCount = task.getAttachments().size();
String newChannel = attachment.getChannel() + "-X";
task.getAttachments().get(0).setChannel(newChannel);
task = taskService.updateTask(task);
task = taskService.getTask(task.getId());
assertThat(task.getAttachments().size(), equalTo(attachmentCount));
assertThat(task.getAttachments().get(0).getChannel(), equalTo(newChannel));
}
@AfterClass
public static void cleanUpClass() {
FileUtils.deleteRecursive("~/data", true);
}
}

View File

@ -113,6 +113,7 @@ public class ClassificationServiceImplTest {
classification = cutSpy.createClassification(classification);
Thread.sleep(10L);
verify(taskanaEngineImplMock, times(2)).openConnection();
verify(classificationMapperMock, times(1)).findByKeyAndDomain(key, domain);
verify(classificationMapperMock, times(1)).findByKeyAndDomain(key, "");

View File

@ -1,5 +1,6 @@
package pro.taskana.impl;
import pro.taskana.Attachment;
import pro.taskana.model.ObjectReference;
/**
@ -28,4 +29,15 @@ public final class JunitHelper {
return objRef;
}
public static Attachment createDefaultAttachment() {
return createAttachment("TAI:000", "CHANNEL", createDefaultObjRef());
}
public static Attachment createAttachment(String id, String channel, ObjectReference objectReference) {
AttachmentImpl attachment = new AttachmentImpl();
attachment.setChannel(channel);
attachment.setId(id);
attachment.setObjectReference(objectReference);
return attachment;
}
}

View File

@ -0,0 +1,101 @@
package pro.taskana.impl;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.junit.Assert.assertThat;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.junit.MockitoJUnitRunner;
import pro.taskana.Attachment;
/**
* Unit Test for methods needed fot attachment at TaskImpl.<br>
* This test should test every interaction with Attachments, which means adding, removing, nulling them.
*/
@RunWith(MockitoJUnitRunner.class)
public class TaskAttachmentTest {
@InjectMocks
private TaskImpl cut;
@Test
public void testAddAttachmentWithValidValue() {
Attachment attachment1 = createAttachment("ID1", "taskId1");
Attachment attachment2 = createAttachment("ID2", "taskId1");
Attachment attachment3 = createAttachment("ID3", "taskId1");
cut.addAttachment(attachment1);
cut.addAttachment(attachment2);
cut.addAttachment(attachment3);
assertThat(cut.getAttachments().size(), equalTo(3));
}
@Test
public void testAddNullValue() {
Attachment attachment1 = createAttachment("ID1", "taskId1");
Attachment attachment2 = null;
cut.addAttachment(attachment1);
cut.addAttachment(attachment2);
assertThat(cut.getAttachments().size(), equalTo(1));
}
@Test
public void testAddSameTwice() {
// Same values, not same REF. Important.
Attachment attachment1 = createAttachment("ID1", "taskId1");
Attachment attachment2 = createAttachment("ID1", "taskId1");
cut.addAttachment(attachment1);
cut.addAttachment(attachment2);
assertThat(cut.getAttachments().size(), equalTo(1));
// Check with not same vlaues (same ID)
String newChannel = "I will overwrite the other!";
attachment1.setChannel(newChannel);
cut.addAttachment(attachment1);
assertThat(cut.getAttachments().size(), equalTo(1));
assertThat(cut.getAttachments().get(0).getChannel(), equalTo(newChannel));
}
@Test
public void testRemoveAttachment() {
// Testing normal way
Attachment attachment1 = createAttachment("ID1", "taskId1");
Attachment attachment2 = createAttachment("ID2", "taskId1");
cut.addAttachment(attachment1);
cut.addAttachment(attachment2);
Attachment actual = cut.removeAttachment(attachment2.getId());
assertThat(cut.getAttachments().size(), equalTo(1));
assertThat(actual, equalTo(attachment2));
}
@Test
public void testRemoveLoopStopsAtResult() {
Attachment attachment1 = createAttachment("ID2", "taskId1");
// adding same uncommon way to test that the loop will stop.
cut.getAttachments().add(attachment1);
cut.getAttachments().add(attachment1);
cut.getAttachments().add(attachment1);
assertThat(cut.getAttachments().size(), equalTo(3));
Attachment actual = cut.removeAttachment(attachment1.getId());
assertThat(cut.getAttachments().size(), equalTo(2));
assertThat(actual, equalTo(attachment1));
}
private Attachment createAttachment(String id, String taskId) {
AttachmentImpl attachment = new AttachmentImpl();
attachment.setId(id);
attachment.setTaskId(taskId);
return attachment;
}
}

View File

@ -19,6 +19,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.session.SqlSession;
import org.junit.Before;
import org.junit.Ignore;
@ -33,6 +34,7 @@ import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import pro.taskana.Attachment;
import pro.taskana.Classification;
import pro.taskana.ClassificationSummary;
import pro.taskana.Task;
@ -40,13 +42,16 @@ import pro.taskana.TaskSummary;
import pro.taskana.Workbasket;
import pro.taskana.WorkbasketService;
import pro.taskana.configuration.TaskanaEngineConfiguration;
import pro.taskana.exceptions.AttachmentPersistenceException;
import pro.taskana.exceptions.ClassificationAlreadyExistException;
import pro.taskana.exceptions.ClassificationNotFoundException;
import pro.taskana.exceptions.ConcurrencyException;
import pro.taskana.exceptions.InvalidArgumentException;
import pro.taskana.exceptions.InvalidOwnerException;
import pro.taskana.exceptions.InvalidStateException;
import pro.taskana.exceptions.InvalidWorkbasketException;
import pro.taskana.exceptions.NotAuthorizedException;
import pro.taskana.exceptions.SystemException;
import pro.taskana.exceptions.TaskAlreadyExistException;
import pro.taskana.exceptions.TaskNotFoundException;
import pro.taskana.exceptions.WorkbasketNotFoundException;
@ -1010,6 +1015,160 @@ public class TaskServiceImplTest {
assertThat(actualResultList.size(), equalTo(expectedResultList.size()));
}
@Test
public void testUpdateTaskAddingValidAttachment() throws TaskNotFoundException, SystemException,
WorkbasketNotFoundException, ClassificationNotFoundException, InvalidArgumentException, ConcurrencyException,
InvalidWorkbasketException, NotAuthorizedException, AttachmentPersistenceException {
Classification classification = createDummyClassification();
Workbasket wb = createWorkbasket("WB-ID", "WB-Key");
Attachment attachment = JunitHelper.createDefaultAttachment();
ObjectReference objectReference = JunitHelper.createDefaultObjRef();
TaskImpl taskBeforeAttachment = createUnitTestTask("ID", "taskName", wb.getKey(), classification);
TaskImpl task = createUnitTestTask("ID", "taskName", wb.getKey(), classification);
task.setPrimaryObjRef(objectReference);
task.addAttachment(attachment);
taskBeforeAttachment.setModified(null);
taskBeforeAttachment.setCreated(Instant.now());
task.setModified(null);
task.setCreated(taskBeforeAttachment.getCreated());
TaskServiceImpl cutSpy = Mockito.spy(cut);
doReturn(taskBeforeAttachment).when(cutSpy).getTask(task.getId());
Task actualTask = cutSpy.updateTask(task);
verify(taskanaEngineImpl, times(1)).openConnection();
verify(cutSpy, times(1)).getTask(task.getId());
verify(attachmentMapperMock, times(1)).insert(((AttachmentImpl) attachment));
verify(taskanaEngineImpl, times(1)).returnConnection();
assertThat(actualTask.getAttachments().size(), equalTo(1));
}
@Test
public void testUpdateTaskAddingValidAttachmentTwice() throws TaskNotFoundException, SystemException,
WorkbasketNotFoundException, ClassificationNotFoundException, InvalidArgumentException, ConcurrencyException,
InvalidWorkbasketException, NotAuthorizedException, AttachmentPersistenceException {
Classification classification = createDummyClassification();
Workbasket wb = createWorkbasket("WB-ID", "WB-Key");
Attachment attachment = JunitHelper.createDefaultAttachment();
ObjectReference objectReference = JunitHelper.createDefaultObjRef();
TaskImpl taskBeforeAttachment = createUnitTestTask("ID", "taskName", wb.getKey(), classification);
TaskImpl task = createUnitTestTask("ID", "taskName", wb.getKey(), classification);
taskBeforeAttachment.setModified(null);
taskBeforeAttachment.setCreated(Instant.now());
task.setModified(null);
task.setCreated(taskBeforeAttachment.getCreated());
task.setPrimaryObjRef(objectReference);
task.addAttachment(attachment);
task.addAttachment(attachment);
TaskServiceImpl cutSpy = Mockito.spy(cut);
doReturn(taskBeforeAttachment).when(cutSpy).getTask(task.getId());
Task actualTask = cutSpy.updateTask(task);
verify(taskanaEngineImpl, times(1)).openConnection();
verify(cutSpy, times(1)).getTask(task.getId());
verify(attachmentMapperMock, times(1)).insert(((AttachmentImpl) attachment));
verify(taskanaEngineImpl, times(1)).returnConnection();
assertThat(actualTask.getAttachments().size(), equalTo(1));
}
@Test(expected = AttachmentPersistenceException.class)
public void testUpdateTaskAddingAttachmentWithSameIdForcedUsingingListMethod()
throws TaskNotFoundException, SystemException,
WorkbasketNotFoundException, ClassificationNotFoundException, InvalidArgumentException, ConcurrencyException,
InvalidWorkbasketException, NotAuthorizedException, AttachmentPersistenceException {
Classification classification = createDummyClassification();
Workbasket wb = createWorkbasket("WB-ID", "WB-Key");
Attachment attachment = JunitHelper.createDefaultAttachment();
ObjectReference objectReference = JunitHelper.createDefaultObjRef();
TaskImpl taskBeforeAttachment = createUnitTestTask("ID", "taskName", wb.getKey(), classification);
TaskImpl task = createUnitTestTask("ID", "taskName", wb.getKey(), classification);
taskBeforeAttachment.setModified(null);
taskBeforeAttachment.setCreated(Instant.now());
task.setModified(null);
task.setCreated(taskBeforeAttachment.getCreated());
task.setPrimaryObjRef(objectReference);
task.setAttachments(new ArrayList<>());
task.getAttachments().add(attachment);
task.getAttachments().add(attachment);
TaskServiceImpl cutSpy = Mockito.spy(cut);
doReturn(taskBeforeAttachment).when(cutSpy).getTask(task.getId());
doThrow(PersistenceException.class).when(attachmentMapperMock).insert(any());
try {
cutSpy.updateTask(task);
} catch (AttachmentPersistenceException e) {
verify(taskanaEngineImpl, times(1)).openConnection();
verify(cutSpy, times(1)).getTask(task.getId());
verify(attachmentMapperMock, times(1)).insert(((AttachmentImpl) attachment));
verify(taskanaEngineImpl, times(1)).returnConnection();
throw e;
}
}
@Test
public void testUpdateTaskUpdateAttachment() throws TaskNotFoundException, SystemException,
WorkbasketNotFoundException, ClassificationNotFoundException, InvalidArgumentException, ConcurrencyException,
InvalidWorkbasketException, NotAuthorizedException, AttachmentPersistenceException {
String channelUpdate = "OTHER CHANNEL";
Classification classification = createDummyClassification();
Workbasket wb = createWorkbasket("WB-ID", "WB-Key");
Attachment attachment = JunitHelper.createDefaultAttachment();
Attachment attachmentToUpdate = JunitHelper.createDefaultAttachment();
attachmentToUpdate.setChannel(channelUpdate);
ObjectReference objectReference = JunitHelper.createDefaultObjRef();
TaskImpl taskBefore = createUnitTestTask("ID", "taskName", wb.getKey(), classification);
taskBefore.addAttachment(attachment);
TaskImpl task = createUnitTestTask("ID", "taskName", wb.getKey(), classification);
taskBefore.setModified(null);
taskBefore.setCreated(Instant.now());
task.setModified(null);
task.setCreated(taskBefore.getCreated());
task.addAttachment(taskBefore.getAttachments().get(0));
task.setPrimaryObjRef(objectReference);
task.addAttachment(attachmentToUpdate); // should override old one and differ at comparison
TaskServiceImpl cutSpy = Mockito.spy(cut);
doReturn(taskBefore).when(cutSpy).getTask(task.getId());
Task actualTask = cutSpy.updateTask(task);
verify(taskanaEngineImpl, times(1)).openConnection();
verify(cutSpy, times(1)).getTask(task.getId());
verify(attachmentMapperMock, times(1)).update(((AttachmentImpl) attachmentToUpdate));
verify(taskanaEngineImpl, times(1)).returnConnection();
assertThat(actualTask.getAttachments().size(), equalTo(1));
assertThat(actualTask.getAttachments().get(0).getChannel(), equalTo(channelUpdate));
}
@Test
public void testUpdateTaskRemovingAttachment() throws TaskNotFoundException, SystemException,
WorkbasketNotFoundException, ClassificationNotFoundException, InvalidArgumentException, ConcurrencyException,
InvalidWorkbasketException, NotAuthorizedException, AttachmentPersistenceException {
Classification classification = createDummyClassification();
Workbasket wb = createWorkbasket("WB-ID", "WB-Key");
Attachment attachment = JunitHelper.createDefaultAttachment();
ObjectReference objectReference = JunitHelper.createDefaultObjRef();
TaskImpl taskBefore = createUnitTestTask("ID", "taskName", wb.getKey(), classification);
taskBefore.setPrimaryObjRef(objectReference);
taskBefore.addAttachment(attachment);
TaskImpl task = createUnitTestTask("ID", "taskName", wb.getKey(), classification);
task.setPrimaryObjRef(objectReference);
taskBefore.setModified(null);
taskBefore.setCreated(Instant.now());
task.setModified(null);
task.setCreated(taskBefore.getCreated());
TaskServiceImpl cutSpy = Mockito.spy(cut);
doReturn(taskBefore).when(cutSpy).getTask(task.getId());
Task actualTask = cutSpy.updateTask(task);
verify(taskanaEngineImpl, times(1)).openConnection();
verify(cutSpy, times(1)).getTask(task.getId());
verify(attachmentMapperMock, times(1)).deleteAttachment(attachment.getId());
verify(taskanaEngineImpl, times(1)).returnConnection();
assertThat(actualTask.getAttachments().size(), equalTo(0));
}
private TaskImpl createUnitTestTask(String id, String name, String workbasketKey, Classification classification) {
TaskImpl task = new TaskImpl();
task.setId(id);

View File

@ -180,6 +180,8 @@ public class TaskServiceImplIntExplicitTest {
TaskanaEngine te = taskanaEngineConfiguration.buildTaskanaEngine();
Connection connection = ds.getConnection();
te.setConnection(connection);
DBCleaner cleaner = new DBCleaner();
cleaner.clearDb(ds, false);
TaskServiceImpl taskServiceImpl = (TaskServiceImpl) te.getTaskService();
WorkbasketServiceImpl workBasketServiceImpl = (WorkbasketServiceImpl) te.getWorkbasketService();
ClassificationServiceImpl classificationServiceImpl = (ClassificationServiceImpl) te.getClassificationService();
@ -190,7 +192,7 @@ public class TaskServiceImplIntExplicitTest {
workbasket.setName("workbasket99");
workbasket.setType(WorkbasketType.GROUP);
workbasket.setDomain("novatec");
workBasketServiceImpl.createWorkbasket(workbasket);
workbasket = workBasketServiceImpl.createWorkbasket(workbasket);
Classification classification = classificationService.newClassification("novatec", "TEST", "t1");
classification = classificationServiceImpl.createClassification(classification);
@ -199,6 +201,7 @@ public class TaskServiceImplIntExplicitTest {
task.setWorkbasketKey(workbasket.getKey());
task.setClassificationKey(classification.getKey());
task.setPrimaryObjRef(JunitHelper.createDefaultObjRef());
task.addAttachment(null);
task = taskServiceImpl.createTask(task);
Assert.assertNotNull(task);

View File

@ -1,5 +1,7 @@
package pro.taskana.impl.integration;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import java.io.FileNotFoundException;
@ -175,7 +177,6 @@ public class WorkbasketServiceImplIntAutocommitTest {
Workbasket foundWorkbasket = workBasketService.getWorkbasket(workbasket.getId());
Assert.assertEquals(id, foundWorkbasket.getId());
Assert.assertEquals(2, foundWorkbasket.getDistributionTargets().size());
}
@WithAccessId(userName = "Elena")
@ -262,7 +263,7 @@ public class WorkbasketServiceImplIntAutocommitTest {
@Test
public void testWorkbasketQuery()
throws NotAuthorizedException, InvalidArgumentException, InvalidWorkbasketException,
WorkbasketNotFoundException {
WorkbasketNotFoundException, InterruptedException {
generateSampleDataForQuery();
@ -312,11 +313,12 @@ public class WorkbasketServiceImplIntAutocommitTest {
assertTrue("Basket1".equals(name) || "Basket2".equals(name) || "Basket3".equals(name));
}
Thread.sleep(30L);
WorkbasketQuery query5 = workBasketService.createWorkbasketQuery()
.modifiedAfter(now.minus(Duration.ofDays(31L)))
.modifiedBefore(now.minus(Duration.ofDays(9)));
List<WorkbasketSummary> result5 = query5.list();
assertTrue(result5.size() == 4);
assertThat(result5.size(), equalTo(4));
for (WorkbasketSummary workbasket : result5) {
String name = workbasket.getName();
assertTrue(
@ -338,7 +340,6 @@ public class WorkbasketServiceImplIntAutocommitTest {
String name = workbasket.getName();
assertTrue("Basket1".equals(name) || "Basket2".equals(name));
}
}
private void generateSampleDataForQuery()

View File

@ -10,7 +10,7 @@ INSERT INTO CLASSIFICATION VALUES('CLI:000000000000000000000000000000000008', 'L
INSERT INTO CLASSIFICATION VALUES('CLI:000000000000000000000000000000000009', 'L140101', '', 'EXTERN', 'TASK', '', TRUE, CURRENT_TIMESTAMP, 'Zustimmungserklärung', 'Zustimmungserklärung', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO CLASSIFICATION VALUES('CLI:000000000000000000000000000000000010', 'T2100', '', 'MANUAL', 'TASK', '', TRUE, CURRENT_TIMESTAMP, 'T-Vertragstermin VERA', 'T-Vertragstermin VERA', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO CLASSIFICATION VALUES('CLI:000000000000000000000000000000000011', 'T6310', '', 'AUTOMATIC', 'TASK', '', TRUE, CURRENT_TIMESTAMP, 'T-GUK Honorarrechnung erstellen', 'Generali Unterstützungskasse Honorar wird fällig', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO CLASSIFICATION VALUES('CLI:000000000000000000000000000000000013', 'DOKTYP_DEFAULT', '', 'EXTERN', 'DOCUMENT', '', TRUE, CURRENT_TIMESTAMP, 'EP allgemein', 'EP allgemein', 99, 'P2000D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO CLASSIFICATION VALUES('CLI:000000000000000000000000000000000013', 'DOCTYPE_DEFAULT', '', 'EXTERN', 'DOCUMENT', '', TRUE, CURRENT_TIMESTAMP, 'EP allgemein', 'EP allgemein', 99, 'P2000D', '', 'VNR', '', '', '', '', '', '', '');
-- DOMAIN_A CLASSIFICATIONS
INSERT INTO CLASSIFICATION VALUES('CLI:100000000000000000000000000000000001', 'L10000', '', 'EXTERN', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, 'OLD-Leistungsfall', 'OLD-Leistungsfall', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
@ -24,7 +24,7 @@ INSERT INTO CLASSIFICATION VALUES('CLI:100000000000000000000000000000000008', 'L
INSERT INTO CLASSIFICATION VALUES('CLI:100000000000000000000000000000000009', 'L140101', '', 'EXTERN', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, 'Zustimmungserklärung', 'Zustimmungserklärung', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO CLASSIFICATION VALUES('CLI:100000000000000000000000000000000010', 'T2100', '', 'MANUAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, 'T-Vertragstermin VERA', 'T-Vertragstermin VERA', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO CLASSIFICATION VALUES('CLI:100000000000000000000000000000000011', 'T6310', '', 'AUTOMATIC', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, 'T-GUK Honorarrechnung erstellen', 'Generali Unterstützungskasse Honorar wird fällig', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO CLASSIFICATION VALUES('CLI:100000000000000000000000000000000013', 'DOKTYP_DEFAULT', '', 'EXTERN', 'DOCUMENT', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, 'EP allgemein', 'EP allgemein', 99, 'P2000D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO CLASSIFICATION VALUES('CLI:100000000000000000000000000000000013', 'DOCTYPE_DEFAULT', '', 'EXTERN', 'DOCUMENT', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, 'EP allgemein', 'EP allgemein', 99, 'P2000D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO CLASSIFICATION VALUES('CLI:100000000000000000000000000000000014', 'L10000', '', 'EXTERN', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, 'BUZ-Leistungsfall', 'BUZ-Leistungsfall', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO CLASSIFICATION VALUES('CLI:100000000000000000000000000000000016', 'T2000', '', 'MANUAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, 'T-Vertragstermin', 'T-Vertragstermin', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');

View File

@ -1,26 +1,26 @@
-- TASK TABLE (ID , CREATED , CLAIMED , COMPLETED , modified , planned , due , name , description , note , priority, state , classification_key, 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
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000000', '2018-01-29T15:55:00', '2018-01-30T15:55:00', null , '2018-01-30T15:55:00', '2018-01-29T15:55:00', '2018-01-30T15:55:00', 'Task99' , 'Lorem ipsum was n Quatsch dolor sit amet.', 'Some custom Note' , 1 , 'CLAIMED' , 'T6310' , '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 );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000001', '2018-01-29T15:55:01', '2018-01-30T15:55:00', null , '2018-01-30T15:55:01', '2018-01-29T15:55:00', '2018-01-30T15:55:00', 'Task01' , 'Lorem ipsum was n Quatsch dolor sit amet.', 'Some custom Note' , 2 , 'CLAIMED' , 'L110102' , '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 );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000002', '2018-01-29T15:55:02', '2018-01-30T15:55:00', null , '2018-01-30T15:55:02', '2018-01-29T15:55:00', '2018-01-30T15:55:00', 'Task02' , 'Lorem ipsum was n Quatsch t. Aber stimmt.', 'Some custom Note' , 2 , 'CLAIMED' , 'A12' , 'GPK_B_KSC' , 'DOMAIN_B', 'BPI21' , 'PBPI21' , 'user_1_1' , 'MyCompany1', 'MySystem1', 'MyInstance1' , 'MyType1', 'MyValue1' , true , false , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000003', '2018-01-29T15:55:03', null , null , '2018-01-29T15:55:03', '2018-01-29T15:55:00', '2018-01-30T15:55:00', 'Widerruf' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000003' , 'DOC_0000000000000000003' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000004', '2018-01-29T15:55:04', null , null , '2018-01-29T15:55:04', '2018-01-29T15:55:00', '2018-01-30T15:55:00', 'Widerruf' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000004' , 'DOC_0000000000000000004' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000005', '2018-01-29T15:55:05', null , null , '2018-01-29T15:55:05', '2018-01-29T15:55:00', '2018-01-30T15:55:00', 'Widerruf' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000006', '2018-01-29T15:55:06', null , null , '2018-01-29T15:55:06', '2018-01-29T15:55:00', '2018-01-30T15:55:00', 'Widerruf' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000007', '2018-01-29T15:55:07', null , null , '2018-01-29T15:55:07', '2018-01-29T15:55:00', '2018-01-30T15:55:00', 'Widerruf' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000007' , 'DOC_0000000000000000007' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000008', '2018-01-29T15:55:08', null , null , '2018-01-29T15:55:08', '2018-01-29T15:55:00', '2018-01-30T15:55:00', 'Widerruf' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000009', '2018-01-29T15:55:09', null , null , '2018-01-29T15:55:09', '2018-01-29T15:55:00', '2018-01-30T15:55:00', 'Widerruf' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000010', '2018-01-29T15:55:10', null , null , '2018-01-29T15:55:10', '2018-01-29T15:55:00', '2018-01-30T15:55:00', 'Widerruf' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000010' , 'DOC_0000000000000000010' , null , '00' , 'PASystem' , '00' , 'VNR' , '22334455' , false , false , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000011', '2018-01-29T15:55:11', null , null , '2018-01-29T15:55:11', '2018-01-29T15:55:00', '2018-01-30T15:55:00', 'Widerruf' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000012', '2018-01-29T15:55:12', null , null , '2018-01-29T15:55:12', '2018-01-29T15:55:00', '2018-01-30T15:55:00', 'Widerruf' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000013', '2018-01-29T15:55:13', null , null , '2018-01-29T15:55:13', '2018-01-29T15:55:00', '2018-01-30T15:55:00', 'Widerruf' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000013' , 'DOC_0000000000000000013' , null , '00' , 'PASystem' , '00' , 'VNR' , '22334455' , false , false , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000014', '2018-01-29T15:55:14', null , null , '2018-01-29T15:55:14', '2018-01-29T15:55:00', '2018-01-30T15:55:00', 'Widerruf' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000015', '2018-01-29T15:55:15', null , null , '2018-01-29T15:55:15', '2018-01-29T15:55:00', '2018-01-30T15:55:00', 'Widerruf' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000016', '2018-01-29T15:55:16', null , null , '2018-01-29T15:55:16', '2018-01-29T15:55:00', '2018-01-30T15:55:00', 'Widerruf' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000017', '2018-01-29T15:55:17', null , null , '2018-01-29T15:55:17', '2018-01-29T15:55:00', '2018-01-30T15:55:00', 'Widerruf' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000017' , 'DOC_0000000000000000017' , null , '00' , 'PASystem' , '00' , 'VNR' , '45678901' , false , false , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000018', '2018-01-29T15:55:18', null , null , '2018-01-29T15:55:18', '2018-01-29T15:55:00', '2018-01-30T15:55:00', 'Widerruf' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000019', '2018-01-29T15:55:19', null , null , '2018-01-29T15:55:19', '2018-01-29T15:55:00', '2018-01-30T15:55:00', 'Widerruf' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000020', '2018-01-29T15:55:20', null , null , '2018-01-29T15:55:20', '2018-01-29T15:55:00', '2018-01-30T15:55:00', 'Widerruf' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000020' , 'DOC_0000000000000000020' , null , '00' , 'PASystem' , '00' , 'SDNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000021', '2018-01-29T15:55:21', null , null , '2018-01-29T15:55:21', '2018-01-29T15:55:00', '2018-01-30T15:55:00', 'Widerruf' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000022', '2018-01-29T15:55:22', null , null , '2018-01-29T15:55:22', '2018-01-29T15:55:00', '2018-01-30T15:55:00', 'Widerruf' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000023', '2018-01-29T15:55:23', null , null , '2018-01-29T15:55:23', '2018-01-29T15:55:00', '2018-01-30T15:55:00', 'Widerruf' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000023' , 'DOC_0000000000000000023' , null , '00' , 'PASystem' , '00' , 'SDNR' , '11223344' , false , false , null , null , null , null , null , null , null , null , null , null , null );
INSERT INTO TASK VALUES('TKI:000000000000000000000000000000000024', '2018-01-29T15:55:24', null , null , '2018-01-29T15:55:24', '2018-01-29T15:55:00', '2018-01-30T15:55:00', 'Widerruf' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 , null , null );
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' , 'Lorem ipsum was n Quatsch dolor sit amet.', 'Some custom Note' , 1 , 'CLAIMED' , 'T6310' , '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 );
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' , 'Lorem ipsum was n Quatsch dolor sit amet.', 'Some custom Note' , 2 , 'CLAIMED' , 'L110102' , '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 );
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' , 'Lorem ipsum was n Quatsch t. Aber stimmt.', 'Some custom Note' , 2 , 'CLAIMED' , 'A12' , 'GPK_B_KSC' , 'DOMAIN_B', 'BPI21' , 'PBPI21' , 'user_1_1' , 'MyCompany1', 'MySystem1', 'MyInstance1' , 'MyType1', 'MyValue1' , true , false , 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' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000003' , 'DOC_0000000000000000003' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , 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' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000004' , 'DOC_0000000000000000004' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , 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' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
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' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
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' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000007' , 'DOC_0000000000000000007' , null , '00' , 'PASystem' , '00' , 'VNR' , '11223344' , false , false , 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' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
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' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
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' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000010' , 'DOC_0000000000000000010' , null , '00' , 'PASystem' , '00' , 'VNR' , '22334455' , false , false , 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' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
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' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
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' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000013' , 'DOC_0000000000000000013' , null , '00' , 'PASystem' , '00' , 'VNR' , '22334455' , false , false , 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' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
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' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
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' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
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' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000017' , 'DOC_0000000000000000017' , null , '00' , 'PASystem' , '00' , 'VNR' , '45678901' , false , false , null , 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' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
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' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
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' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000020' , 'DOC_0000000000000000020' , null , '00' , 'PASystem' , '00' , 'SDNR' , '11223344' , false , false , null , null , 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' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
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' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 );
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' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , 'GPK_KSC' , 'DOMAIN_A', 'PI_0000000000023' , 'DOC_0000000000000000023' , null , '00' , 'PASystem' , '00' , 'SDNR' , '11223344' , false , false , null , null , null , 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' , 'Widerruf' , null , 2 , 'READY' , 'L1050' , '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 , null , null );

View File

@ -10,7 +10,7 @@ INSERT INTO CLASSIFICATION VALUES('CLI:000000000000000000000000000000000008', 'L
INSERT INTO CLASSIFICATION VALUES('CLI:000000000000000000000000000000000009', 'L140101', '', 'EXTERN', 'TASK', '', TRUE, CURRENT_TIMESTAMP, 'Zustimmungserklärung', 'Zustimmungserklärung', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO CLASSIFICATION VALUES('CLI:000000000000000000000000000000000010', 'T2100', '', 'MANUAL', 'TASK', '', TRUE, CURRENT_TIMESTAMP, 'T-Vertragstermin VERA', 'T-Vertragstermin VERA', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO CLASSIFICATION VALUES('CLI:000000000000000000000000000000000011', 'T6310', '', 'AUTOMATIC', 'TASK', '', TRUE, CURRENT_TIMESTAMP, 'T-GUK Honorarrechnung erstellen', 'Generali Unterstützungskasse Honorar wird fällig', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO CLASSIFICATION VALUES('CLI:000000000000000000000000000000000013', 'DOKTYP_DEFAULT', '', 'EXTERN', 'DOCUMENT', '', TRUE, CURRENT_TIMESTAMP, 'EP allgemein', 'EP allgemein', 99, 'P2000D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO CLASSIFICATION VALUES('CLI:000000000000000000000000000000000013', 'DOCTYPE_DEFAULT', '', 'EXTERN', 'DOCUMENT', '', TRUE, CURRENT_TIMESTAMP, 'EP allgemein', 'EP allgemein', 99, 'P2000D', '', 'VNR', '', '', '', '', '', '', '');
-- DOMAIN_A CLASSIFICATIONS
INSERT INTO CLASSIFICATION VALUES('CLI:100000000000000000000000000000000001', 'L10000', '', 'EXTERN', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, 'OLD-Leistungsfall', 'OLD-Leistungsfall', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
@ -24,7 +24,7 @@ INSERT INTO CLASSIFICATION VALUES('CLI:100000000000000000000000000000000008', 'L
INSERT INTO CLASSIFICATION VALUES('CLI:100000000000000000000000000000000009', 'L140101', '', 'EXTERN', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, 'Zustimmungserklärung', 'Zustimmungserklärung', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO CLASSIFICATION VALUES('CLI:100000000000000000000000000000000010', 'T2100', '', 'MANUAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, 'T-Vertragstermin VERA', 'T-Vertragstermin VERA', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO CLASSIFICATION VALUES('CLI:100000000000000000000000000000000011', 'T6310', '', 'AUTOMATIC', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, 'T-GUK Honorarrechnung erstellen', 'Generali Unterstützungskasse Honorar wird fällig', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO CLASSIFICATION VALUES('CLI:100000000000000000000000000000000013', 'DOKTYP_DEFAULT', '', 'EXTERN', 'DOCUMENT', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, 'EP allgemein', 'EP allgemein', 99, 'P2000D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO CLASSIFICATION VALUES('CLI:100000000000000000000000000000000013', 'DOCTYPE_DEFAULT', '', 'EXTERN', 'DOCUMENT', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, 'EP allgemein', 'EP allgemein', 99, 'P2000D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO CLASSIFICATION VALUES('CLI:100000000000000000000000000000000014', 'L10000', '', 'EXTERN', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, 'BUZ-Leistungsfall', 'BUZ-Leistungsfall', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO CLASSIFICATION VALUES('CLI:100000000000000000000000000000000016', 'T2000', '', 'MANUAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, 'T-Vertragstermin', 'T-Vertragstermin', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');

View File

@ -5,8 +5,8 @@ INSERT INTO TASK VALUES('4', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, null, CURRENT
INSERT INTO TASK VALUES('5', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, null, CURRENT_TIMESTAMP, 'Task5', 'Lorem ipsum dolor sit amet.', '', 1, 'COMPLETED', 'L1050', 'key1', 'DOMAIN_A', 'BPI5', 'PBPI5', 'Stefan', 'Company2', 'System2', 'Instance2', 'Type2', 'Value2', false, false, null, null, null, null, null, null, null, null, null, null, null);
INSERT INTO TASK VALUES('6', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, null, CURRENT_TIMESTAMP, 'Task6', 'Lorem ipsum dolor sit amet.', 'Some custom Note', 1, 'COMPLETED', 'L1050', 'key1', 'DOMAIN_A', 'BPI6', 'PBPI6', 'Frank', 'Company3', 'System3', 'Instance3', 'Type3', 'Value3', false, false, null, null, null, null, null, null, null, null, null, null, null);
INSERT INTO TASK VALUES('7', CURRENT_TIMESTAMP, null, null, CURRENT_TIMESTAMP, null, CURRENT_TIMESTAMP, 'Task7', 'Lorem ipsum dolor sit amet.', '', 1, 'READY', 'DOKTYP_DEFAULT', 'key2', 'DOMAIN_A', 'BPI7', 'PBPI7', 'Stefan', 'Company1', 'System1', 'Instance1', 'Type1', 'Value1' , false, false, null, null, null, null, null, null, null, null, null, null, null);
INSERT INTO TASK VALUES('8', CURRENT_TIMESTAMP, null, null, CURRENT_TIMESTAMP, null, CURRENT_TIMESTAMP, 'Task8', 'Lorem ipsum dolor sit amet. ', 'Some custom Note', 1, 'READY', 'DOKTYP_DEFAULT', 'key2', 'DOMAIN_A', 'BPI8', 'PBPI8', 'Frank', 'Company2', 'System2', 'Instance2', 'Type2', 'Value2', false, false, null, null, null, null, null, null, null, null, null, null, null);
INSERT INTO TASK VALUES('7', CURRENT_TIMESTAMP, null, null, CURRENT_TIMESTAMP, null, CURRENT_TIMESTAMP, 'Task7', 'Lorem ipsum dolor sit amet.', '', 1, 'READY', 'DOCTYPE_DEFAULT', 'key2', 'DOMAIN_A', 'BPI7', 'PBPI7', 'Stefan', 'Company1', 'System1', 'Instance1', 'Type1', 'Value1' , false, false, null, null, null, null, null, null, null, null, null, null, null);
INSERT INTO TASK VALUES('8', CURRENT_TIMESTAMP, null, null, CURRENT_TIMESTAMP, null, CURRENT_TIMESTAMP, 'Task8', 'Lorem ipsum dolor sit amet. ', 'Some custom Note', 1, 'READY', 'DOCTYPE_DEFAULT', 'key2', 'DOMAIN_A', 'BPI8', 'PBPI8', 'Frank', 'Company2', 'System2', 'Instance2', 'Type2', 'Value2', false, false, null, null, null, null, null, null, null, null, null, null, null);
INSERT INTO TASK VALUES('9', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, null, CURRENT_TIMESTAMP, null, CURRENT_TIMESTAMP, 'Task9', 'Lorem ipsum dolor sit amet.', '', 1, 'CLAIMED', 'T2100', 'key2', 'DOMAIN_A', 'BPI9', 'PBPI9', 'Stefan', 'Company3', 'System3', 'Instance3', 'Type3', 'Value3', true, false, null, null, null, null, null, null, null, null, null, null, null);
INSERT INTO TASK VALUES('10', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, null, CURRENT_TIMESTAMP, null, CURRENT_TIMESTAMP, 'Task10', 'Lorem ipsum dolor sit amet.', 'Some custom Note', 1, 'CLAIMED', 'T2100', 'key2', 'DOMAIN_A', 'BPI10', 'PBPI10', 'Frank', 'Company1', 'System1', 'Instance1', 'Type1', 'Value1', false, false, null, null, null, null, null, null, null, null, null, null, null);
INSERT INTO TASK VALUES('11', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, null, CURRENT_TIMESTAMP, 'Task11', 'Lorem ipsum dolor sit amet. ', 'Some custom Note', 1, 'COMPLETED', 'T2100', 'key2', 'DOMAIN_A', 'BPI11', 'PBPI11', 'Stefan', 'Company2', 'System2', 'Instance2', 'Type2', 'Value2', false, false, null, null, null, null, null, null, null, null, null, null, null);