本文整理汇总了Java中org.camunda.bpm.engine.task.Task.setCaseInstanceId方法的典型用法代码示例。如果您正苦于以下问题:Java Task.setCaseInstanceId方法的具体用法?Java Task.setCaseInstanceId怎么用?Java Task.setCaseInstanceId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.camunda.bpm.engine.task.Task
的用法示例。
在下文中一共展示了Task.setCaseInstanceId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testTaskCaseInstanceId
import org.camunda.bpm.engine.task.Task; //导入方法依赖的package包/类
@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);
}
示例2: testHistoricTaskInstanceCaseInstanceId
import org.camunda.bpm.engine.task.Task; //导入方法依赖的package包/类
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);
}
示例3: updateTask
import org.camunda.bpm.engine.task.Task; //导入方法依赖的package包/类
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());
}
示例4: testUpdateTask
import org.camunda.bpm.engine.task.Task; //导入方法依赖的package包/类
@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();
}