TSK-430: made process ids updatable in the interface.
This commit is contained in:
parent
87f44bd026
commit
baed067509
|
@ -164,6 +164,13 @@ public interface Task {
|
|||
*/
|
||||
String getBusinessProcessId();
|
||||
|
||||
/**
|
||||
* Sets the external business process id.
|
||||
*
|
||||
* @param businessProcessId
|
||||
*/
|
||||
void setBusinessProcessId(String businessProcessId);
|
||||
|
||||
/**
|
||||
* Returns the parentBusinessProcessId of a task.
|
||||
*
|
||||
|
@ -171,6 +178,13 @@ public interface Task {
|
|||
*/
|
||||
String getParentBusinessProcessId();
|
||||
|
||||
/**
|
||||
* Sets the parent business process id to group associated processes.
|
||||
*
|
||||
* @param parentBusinessProcessId
|
||||
*/
|
||||
void setParentBusinessProcessId(String parentBusinessProcessId);
|
||||
|
||||
/**
|
||||
* Return the id of the task-owner.
|
||||
*
|
||||
|
|
|
@ -251,6 +251,7 @@ public class TaskImpl implements Task {
|
|||
return businessProcessId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBusinessProcessId(String businessProcessId) {
|
||||
this.businessProcessId = businessProcessId;
|
||||
}
|
||||
|
@ -260,6 +261,7 @@ public class TaskImpl implements Task {
|
|||
return parentBusinessProcessId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setParentBusinessProcessId(String parentBusinessProcessId) {
|
||||
this.parentBusinessProcessId = parentBusinessProcessId;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
|
@ -63,17 +62,21 @@ public class UpdateTaskAccTest extends AbstractAccTest {
|
|||
Task task = taskService.getTask("TKI:000000000000000000000000000000000000");
|
||||
Instant modifiedOriginal = task.getModified();
|
||||
task.setPrimaryObjRef(createObjectReference("COMPANY_A", "SYSTEM_A", "INSTANCE_A", "VNR", "7654321"));
|
||||
task.setBusinessProcessId("MY_PROCESS_ID");
|
||||
task.setParentBusinessProcessId("MY_PARENT_PROCESS_ID");
|
||||
Task updatedTask = taskService.updateTask(task);
|
||||
updatedTask = taskService.getTask(updatedTask.getId());
|
||||
|
||||
Assert.assertNotNull(updatedTask);
|
||||
Assert.assertEquals("7654321", updatedTask.getPrimaryObjRef().getValue());
|
||||
Assert.assertNotNull(updatedTask.getCreated());
|
||||
Assert.assertNotNull(updatedTask.getModified());
|
||||
Assert.assertFalse(modifiedOriginal.isAfter(updatedTask.getModified()));
|
||||
Assert.assertNotEquals(updatedTask.getCreated(), updatedTask.getModified());
|
||||
Assert.assertEquals(task.getCreated(), updatedTask.getCreated());
|
||||
Assert.assertEquals(task.isRead(), updatedTask.isRead());
|
||||
assertNotNull(updatedTask);
|
||||
assertEquals("7654321", updatedTask.getPrimaryObjRef().getValue());
|
||||
assertNotNull(updatedTask.getCreated());
|
||||
assertNotNull(updatedTask.getModified());
|
||||
assertFalse(modifiedOriginal.isAfter(updatedTask.getModified()));
|
||||
assertNotEquals(updatedTask.getCreated(), updatedTask.getModified());
|
||||
assertEquals(task.getCreated(), updatedTask.getCreated());
|
||||
assertEquals(task.isRead(), updatedTask.isRead());
|
||||
assertEquals("MY_PROCESS_ID", updatedTask.getBusinessProcessId());
|
||||
assertEquals("MY_PARENT_PROCESS_ID", updatedTask.getParentBusinessProcessId());
|
||||
}
|
||||
|
||||
@WithAccessId(
|
||||
|
|
Loading…
Reference in New Issue