本文整理了Java中org.camunda.bpm.engine.task.Task.setCaseInstanceId()
方法的一些代码示例,展示了Task.setCaseInstanceId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.setCaseInstanceId()
方法的具体详情如下:
包路径:org.camunda.bpm.engine.task.Task
类名称:Task
方法名:setCaseInstanceId
[英]The case instance id for which this task is associated for.
[中]与此任务关联的案例实例id。
代码示例来源:origin: camunda/camunda-bpm-platform
verify(newTask).setFollowUpDate(any(Date.class));
verify(newTask).setParentTaskId((String) json.get("parentTaskId"));
verify(newTask).setCaseInstanceId((String) json.get("caseInstanceId"));
verify(newTask).setTenantId((String) json.get("tenantId"));
verify(taskServiceMock).saveTask(newTask);
代码示例来源:origin: camunda/camunda-bpm-platform
verify(mockTask).setFollowUpDate(null);
verify(mockTask).setParentTaskId((String) json.get("parentTaskId"));
verify(mockTask).setCaseInstanceId(null);
verify(mockTask).setTenantId(null);
verify(taskServiceMock).saveTask(mockTask);
代码示例来源:origin: camunda/camunda-bpm-platform
verify(newTask).setFollowUpDate(null);
verify(newTask).setParentTaskId((String) json.get("parentTaskId"));
verify(newTask).setCaseInstanceId(null);
verify(newTask).setTenantId(null);
verify(taskServiceMock).saveTask(newTask);
代码示例来源:origin: camunda/camunda-bpm-platform
verify(mockTask).setFollowUpDate(any(Date.class));
verify(mockTask).setParentTaskId((String) json.get("parentTaskId"));
verify(mockTask).setCaseInstanceId((String) json.get("caseInstanceId"));
verify(mockTask).setTenantId((String) json.get("tenantId"));
verify(taskServiceMock).saveTask(mockTask);
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources = PROCESS_PATH)
public void testUpdateTask() {
// given
runtimeService.startProcessInstanceByKey(PROCESS_KEY);
Task task = taskService.createTaskQuery().singleResult();
task.setCaseInstanceId("a-case-instance-id");
// when
taskService.saveTask(task);
// then
verifyNoUserOperationLogged();
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Test
public void testTaskCaseInstanceId() {
Task task = taskService.newTask();
task.setCaseInstanceId("aCaseInstanceId");
taskService.saveTask(task);
// Fetch the task again and update
task = taskService.createTaskQuery().taskId(task.getId()).singleResult();
assertEquals("aCaseInstanceId", task.getCaseInstanceId());
task.setCaseInstanceId("anotherCaseInstanceId");
taskService.saveTask(task);
task = taskService.createTaskQuery().taskId(task.getId()).singleResult();
assertEquals("anotherCaseInstanceId", task.getCaseInstanceId());
// Finally, delete task
taskService.deleteTask(task.getId(), true);
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void testHistoricTaskInstanceCaseInstanceId() {
Task task = taskService.newTask();
task.setCaseInstanceId("aCaseInstanceId");
taskService.saveTask(task);
HistoricTaskInstance hti = historyService
.createHistoricTaskInstanceQuery()
.taskId(task.getId())
.singleResult();
assertEquals("aCaseInstanceId", hti.getCaseInstanceId());
task.setCaseInstanceId("anotherCaseInstanceId");
taskService.saveTask(task);
hti = historyService
.createHistoricTaskInstanceQuery()
.taskId(task.getId())
.singleResult();
assertEquals("anotherCaseInstanceId", hti.getCaseInstanceId());
// Finally, delete task
taskService.deleteTask(task.getId(), true);
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void updateTask(Task task) {
task.setName(getName());
task.setDescription(getDescription());
task.setPriority(getPriority());
task.setAssignee(getAssignee());
task.setOwner(getOwner());
DelegationState state = null;
if (getDelegationState() != null) {
DelegationStateConverter converter = new DelegationStateConverter();
state = converter.convertQueryParameterToType(getDelegationState());
}
task.setDelegationState(state);
task.setDueDate(getDue());
task.setFollowUpDate(getFollowUp());
task.setParentTaskId(getParentTaskId());
task.setCaseInstanceId(getCaseInstanceId());
task.setTenantId(getTenantId());
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void testCaseInstanceId() {
// create new task
task = taskService.newTask();
taskService.saveTask(task);
UserOperationLogQuery query = queryOperationDetails(OPERATION_TYPE_UPDATE);
assertEquals(0, query.count());
// set case instance id and save task
task.setCaseInstanceId("aCaseInstanceId");
taskService.saveTask(task);
assertEquals(1, query.count());
UserOperationLogEntry entry = query.singleResult();
assertNotNull(entry);
assertNull(entry.getOrgValue());
assertEquals("aCaseInstanceId", entry.getNewValue());
assertEquals(CASE_INSTANCE_ID, entry.getProperty());
// change case instance id and save task
task.setCaseInstanceId("anotherCaseInstanceId");
taskService.saveTask(task);
assertEquals(2, query.count());
List<UserOperationLogEntry> entries = query.list();
assertEquals(2, entries.size());
for (UserOperationLogEntry currentEntry : entries) {
if (!currentEntry.getId().equals(entry.getId())) {
assertEquals("aCaseInstanceId", currentEntry.getOrgValue());
assertEquals("anotherCaseInstanceId", currentEntry.getNewValue());
assertEquals(CASE_INSTANCE_ID, currentEntry.getProperty());
}
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void updateTask(Task task) {
task.setName(getName());
task.setDescription(getDescription());
task.setPriority(getPriority());
task.setAssignee(getAssignee());
task.setOwner(getOwner());
DelegationState state = null;
if (getDelegationState() != null) {
DelegationStateConverter converter = new DelegationStateConverter();
state = converter.convertQueryParameterToType(getDelegationState());
}
task.setDelegationState(state);
task.setDueDate(getDue());
task.setFollowUpDate(getFollowUp());
task.setParentTaskId(getParentTaskId());
task.setCaseInstanceId(getCaseInstanceId());
task.setTenantId(getTenantId());
}
代码示例来源:origin: camunda/camunda-bpm-platform
Date dueDate = sdf.parse("01/02/2003 04:05:06");
task.setDueDate(dueDate);
task.setCaseInstanceId("taskcaseinstanceid");
taskService.saveTask(task);
dueDate = sdf.parse("01/02/2003 04:05:06");
task.setDueDate(dueDate);
task.setCaseInstanceId("updatetaskcaseinstanceid");
taskService.saveTask(task);
代码示例来源:origin: org.camunda.bpm/camunda-engine
@Deployment(resources = PROCESS_PATH)
public void testUpdateTask() {
// given
runtimeService.startProcessInstanceByKey(PROCESS_KEY);
Task task = taskService.createTaskQuery().singleResult();
task.setCaseInstanceId("a-case-instance-id");
// when
taskService.saveTask(task);
// then
verifyNoUserOperationLogged();
}
代码示例来源:origin: org.camunda.bpm/camunda-engine
@Test
public void testTaskCaseInstanceId() {
Task task = taskService.newTask();
task.setCaseInstanceId("aCaseInstanceId");
taskService.saveTask(task);
// Fetch the task again and update
task = taskService.createTaskQuery().taskId(task.getId()).singleResult();
assertEquals("aCaseInstanceId", task.getCaseInstanceId());
task.setCaseInstanceId("anotherCaseInstanceId");
taskService.saveTask(task);
task = taskService.createTaskQuery().taskId(task.getId()).singleResult();
assertEquals("anotherCaseInstanceId", task.getCaseInstanceId());
// Finally, delete task
taskService.deleteTask(task.getId(), true);
}
代码示例来源:origin: org.camunda.bpm/camunda-engine
public void testHistoricTaskInstanceCaseInstanceId() {
Task task = taskService.newTask();
task.setCaseInstanceId("aCaseInstanceId");
taskService.saveTask(task);
HistoricTaskInstance hti = historyService
.createHistoricTaskInstanceQuery()
.taskId(task.getId())
.singleResult();
assertEquals("aCaseInstanceId", hti.getCaseInstanceId());
task.setCaseInstanceId("anotherCaseInstanceId");
taskService.saveTask(task);
hti = historyService
.createHistoricTaskInstanceQuery()
.taskId(task.getId())
.singleResult();
assertEquals("anotherCaseInstanceId", hti.getCaseInstanceId());
// Finally, delete task
taskService.deleteTask(task.getId(), true);
}
代码示例来源:origin: org.camunda.bpm/camunda-engine-rest-jaxrs2
public void updateTask(Task task) {
task.setName(getName());
task.setDescription(getDescription());
task.setPriority(getPriority());
task.setAssignee(getAssignee());
task.setOwner(getOwner());
DelegationState state = null;
if (getDelegationState() != null) {
DelegationStateConverter converter = new DelegationStateConverter();
state = converter.convertQueryParameterToType(getDelegationState());
}
task.setDelegationState(state);
task.setDueDate(getDue());
task.setFollowUpDate(getFollowUp());
task.setParentTaskId(getParentTaskId());
task.setCaseInstanceId(getCaseInstanceId());
task.setTenantId(getTenantId());
}
代码示例来源:origin: org.camunda.bpm/camunda-engine
public void testCaseInstanceId() {
// create new task
task = taskService.newTask();
taskService.saveTask(task);
UserOperationLogQuery query = queryOperationDetails(OPERATION_TYPE_UPDATE);
assertEquals(0, query.count());
// set case instance id and save task
task.setCaseInstanceId("aCaseInstanceId");
taskService.saveTask(task);
assertEquals(1, query.count());
UserOperationLogEntry entry = query.singleResult();
assertNotNull(entry);
assertNull(entry.getOrgValue());
assertEquals("aCaseInstanceId", entry.getNewValue());
assertEquals(CASE_INSTANCE_ID, entry.getProperty());
// change case instance id and save task
task.setCaseInstanceId("anotherCaseInstanceId");
taskService.saveTask(task);
assertEquals(2, query.count());
List<UserOperationLogEntry> entries = query.list();
assertEquals(2, entries.size());
for (UserOperationLogEntry currentEntry : entries) {
if (!currentEntry.getId().equals(entry.getId())) {
assertEquals("aCaseInstanceId", currentEntry.getOrgValue());
assertEquals("anotherCaseInstanceId", currentEntry.getNewValue());
assertEquals(CASE_INSTANCE_ID, currentEntry.getProperty());
}
}
}
代码示例来源:origin: org.camunda.bpm/camunda-engine
Date dueDate = sdf.parse("01/02/2003 04:05:06");
task.setDueDate(dueDate);
task.setCaseInstanceId("taskcaseinstanceid");
taskService.saveTask(task);
dueDate = sdf.parse("01/02/2003 04:05:06");
task.setDueDate(dueDate);
task.setCaseInstanceId("updatetaskcaseinstanceid");
taskService.saveTask(task);
内容来源于网络,如有侵权,请联系作者删除!