本文整理了Java中org.camunda.bpm.engine.task.Task.getDelegationState()
方法的一些代码示例,展示了Task.getDelegationState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.getDelegationState()
方法的具体详情如下:
包路径:org.camunda.bpm.engine.task.Task
类名称:Task
方法名:getDelegationState
[英]The current DelegationState for this task.
[中]此任务的当前委派状态。
代码示例来源:origin: camunda/camunda-bpm-platform
public Task build() {
Task mockTask = mock(Task.class);
when(mockTask.getId()).thenReturn(id);
when(mockTask.getName()).thenReturn(name);
when(mockTask.getAssignee()).thenReturn(assignee);
when(mockTask.getCreateTime()).thenReturn(createTime);
when(mockTask.getDueDate()).thenReturn(dueDate);
when(mockTask.getFollowUpDate()).thenReturn(followUpDate);
when(mockTask.getDelegationState()).thenReturn(delegationState);
when(mockTask.getDescription()).thenReturn(description);
when(mockTask.getExecutionId()).thenReturn(executionId);
when(mockTask.getOwner()).thenReturn(owner);
when(mockTask.getParentTaskId()).thenReturn(parentTaskId);
when(mockTask.getPriority()).thenReturn(priority);
when(mockTask.getProcessDefinitionId()).thenReturn(processDefinitionId);
when(mockTask.getProcessInstanceId()).thenReturn(processInstanceId);
when(mockTask.getTaskDefinitionKey()).thenReturn(taskDefinitionKey);
when(mockTask.getCaseDefinitionId()).thenReturn(caseDefinitionId);
when(mockTask.getCaseInstanceId()).thenReturn(caseInstanceId);
when(mockTask.getCaseExecutionId()).thenReturn(caseExecutionId);
when(mockTask.getFormKey()).thenReturn(formKey);
when(mockTask.getTenantId()).thenReturn(tenantId);
return mockTask;
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void testExtendingTaskQueryListPage() {
TaskQuery query = taskService.createTaskQuery();
saveQuery(query);
List<Task> tasks = filterService.listPage(filter.getId(), 1, 2);
assertEquals(2, tasks.size());
tasks = filterService.listPage(filter.getId(), query, 1, 2);
assertEquals(2, tasks.size());
TaskQuery extendingQuery = taskService.createTaskQuery();
extendingQuery.taskDelegationState(DelegationState.RESOLVED);
tasks = filterService.listPage(filter.getId(), extendingQuery, 1, 2);
assertEquals(1, tasks.size());
assertEquals(DelegationState.RESOLVED, tasks.get(0).getDelegationState());
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void testExtendingTaskQueryList() {
TaskQuery query = taskService.createTaskQuery();
saveQuery(query);
List<Task> tasks = filterService.list(filter.getId());
assertEquals(3, tasks.size());
tasks = filterService.list(filter.getId(), query);
assertEquals(3, tasks.size());
TaskQuery extendingQuery = taskService.createTaskQuery();
extendingQuery.taskDelegationState(DelegationState.RESOLVED);
tasks = filterService.list(filter.getId(), extendingQuery);
assertEquals(2, tasks.size());
for (Task task : tasks) {
assertEquals(DelegationState.RESOLVED, task.getDelegationState());
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
dto.followUp = task.getFollowUpDate();
if (task.getDelegationState() != null) {
dto.delegationState = task.getDelegationState().toString();
代码示例来源:origin: camunda/camunda-bpm-platform
dto.followUp = task.getFollowUpDate();
if (task.getDelegationState() != null) {
dto.delegationState = task.getDelegationState().toString();
代码示例来源:origin: camunda/camunda-bpm-platform
@Test
public void testResolveTaskWithParametersNullParameters() {
Task task = taskService.newTask();
task.setDelegationState(DelegationState.PENDING);
taskService.saveTask(task);
String taskId = task.getId();
taskService.resolveTask(taskId, null);
if (processEngineConfiguration.getHistoryLevel().getId()>= ProcessEngineConfigurationImpl.HISTORYLEVEL_AUDIT) {
historyService.deleteHistoricTaskInstance(taskId);
}
// Fetch the task again
task = taskService.createTaskQuery().taskId(taskId).singleResult();
assertEquals(DelegationState.RESOLVED, task.getDelegationState());
taskService.deleteTask(taskId, true);
}
代码示例来源:origin: camunda/camunda-bpm-platform
@SuppressWarnings("unchecked")
@Test
public void testResolveTaskWithParametersEmptyParameters() {
Task task = taskService.newTask();
task.setDelegationState(DelegationState.PENDING);
taskService.saveTask(task);
String taskId = task.getId();
taskService.resolveTask(taskId, Collections.EMPTY_MAP);
if (processEngineConfiguration.getHistoryLevel().getId()>= ProcessEngineConfigurationImpl.HISTORYLEVEL_AUDIT) {
historyService.deleteHistoricTaskInstance(taskId);
}
// Fetch the task again
task = taskService.createTaskQuery().taskId(taskId).singleResult();
assertEquals(DelegationState.RESOLVED, task.getDelegationState());
taskService.deleteTask(taskId, true);
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* @see http://jira.codehaus.org/browse/ACT-1059
*/
@Test
public void testSetDelegationState() {
Task task = taskService.newTask();
task.setOwner("wuzh");
task.delegate("other");
taskService.saveTask(task);
String taskId = task.getId();
task = taskService.createTaskQuery().taskId(taskId).singleResult();
assertEquals("wuzh", task.getOwner());
assertEquals("other", task.getAssignee());
assertEquals(DelegationState.PENDING, task.getDelegationState());
task.setDelegationState(DelegationState.RESOLVED);
taskService.saveTask(task);
task = taskService.createTaskQuery().taskId(taskId).singleResult();
assertEquals("wuzh", task.getOwner());
assertEquals("other", task.getAssignee());
assertEquals(DelegationState.RESOLVED, task.getDelegationState());
taskService.deleteTask(taskId, true);
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Test
public void testTaskDelegationThroughServiceCall() {
Task task = taskService.newTask();
task.setOwner("johndoe");
taskService.saveTask(task);
String taskId = task.getId();
// Fetch the task again and update
task = taskService.createTaskQuery().taskId(taskId).singleResult();
taskService.delegateTask(taskId, "joesmoe");
task = taskService.createTaskQuery().taskId(taskId).singleResult();
assertEquals("johndoe", task.getOwner());
assertEquals("joesmoe", task.getAssignee());
assertEquals(DelegationState.PENDING, task.getDelegationState());
taskService.resolveTask(taskId);
task = taskService.createTaskQuery().taskId(taskId).singleResult();
assertEquals("johndoe", task.getOwner());
assertEquals("johndoe", task.getAssignee());
assertEquals(DelegationState.RESOLVED, task.getDelegationState());
// Finally, delete task
taskService.deleteTask(taskId, true);
}
代码示例来源:origin: camunda/camunda-bpm-platform
assertEquals("johndoe", task.getOwner());
assertEquals("joesmoe", task.getAssignee());
assertEquals(DelegationState.PENDING, task.getDelegationState());
assertEquals("johndoe", task.getOwner());
assertEquals("johndoe", task.getAssignee());
assertEquals(DelegationState.RESOLVED, task.getDelegationState());
assertEquals("johndoe", task.getOwner());
assertNull(task.getAssignee());
assertNull(task.getDelegationState());
assertEquals("johndoe", task.getOwner());
assertEquals("jackblack", task.getAssignee());
assertEquals(DelegationState.RESOLVED, task.getDelegationState());
代码示例来源:origin: camunda/camunda-bpm-platform
dto.due = task.getDueDate();
dto.followUp = task.getFollowUpDate();
dto.delegationState = task.getDelegationState();
dto.description = task.getDescription();
dto.executionId = task.getExecutionId();
代码示例来源:origin: camunda/camunda-bpm-platform
dto.due = task.getDueDate();
dto.followUp = task.getFollowUpDate();
dto.delegationState = task.getDelegationState();
dto.description = task.getDescription();
dto.executionId = task.getExecutionId();
代码示例来源:origin: org.camunda.bpm/camunda-engine
public void testExtendingTaskQueryListPage() {
TaskQuery query = taskService.createTaskQuery();
saveQuery(query);
List<Task> tasks = filterService.listPage(filter.getId(), 1, 2);
assertEquals(2, tasks.size());
tasks = filterService.listPage(filter.getId(), query, 1, 2);
assertEquals(2, tasks.size());
TaskQuery extendingQuery = taskService.createTaskQuery();
extendingQuery.taskDelegationState(DelegationState.RESOLVED);
tasks = filterService.listPage(filter.getId(), extendingQuery, 1, 2);
assertEquals(1, tasks.size());
assertEquals(DelegationState.RESOLVED, tasks.get(0).getDelegationState());
}
代码示例来源:origin: org.camunda.bpm/camunda-engine
public void testExtendingTaskQueryList() {
TaskQuery query = taskService.createTaskQuery();
saveQuery(query);
List<Task> tasks = filterService.list(filter.getId());
assertEquals(3, tasks.size());
tasks = filterService.list(filter.getId(), query);
assertEquals(3, tasks.size());
TaskQuery extendingQuery = taskService.createTaskQuery();
extendingQuery.taskDelegationState(DelegationState.RESOLVED);
tasks = filterService.list(filter.getId(), extendingQuery);
assertEquals(2, tasks.size());
for (Task task : tasks) {
assertEquals(DelegationState.RESOLVED, task.getDelegationState());
}
}
代码示例来源:origin: org.camunda.bpm/camunda-engine-rest-jaxrs2
dto.followUp = task.getFollowUpDate();
if (task.getDelegationState() != null) {
dto.delegationState = task.getDelegationState().toString();
代码示例来源:origin: org.camunda.bpm/camunda-engine
@Test
public void testResolveTaskWithParametersNullParameters() {
Task task = taskService.newTask();
task.setDelegationState(DelegationState.PENDING);
taskService.saveTask(task);
String taskId = task.getId();
taskService.resolveTask(taskId, null);
if (processEngineConfiguration.getHistoryLevel().getId()>= ProcessEngineConfigurationImpl.HISTORYLEVEL_AUDIT) {
historyService.deleteHistoricTaskInstance(taskId);
}
// Fetch the task again
task = taskService.createTaskQuery().taskId(taskId).singleResult();
assertEquals(DelegationState.RESOLVED, task.getDelegationState());
taskService.deleteTask(taskId, true);
}
代码示例来源:origin: org.camunda.bpm/camunda-engine
@SuppressWarnings("unchecked")
@Test
public void testResolveTaskWithParametersEmptyParameters() {
Task task = taskService.newTask();
task.setDelegationState(DelegationState.PENDING);
taskService.saveTask(task);
String taskId = task.getId();
taskService.resolveTask(taskId, Collections.EMPTY_MAP);
if (processEngineConfiguration.getHistoryLevel().getId()>= ProcessEngineConfigurationImpl.HISTORYLEVEL_AUDIT) {
historyService.deleteHistoricTaskInstance(taskId);
}
// Fetch the task again
task = taskService.createTaskQuery().taskId(taskId).singleResult();
assertEquals(DelegationState.RESOLVED, task.getDelegationState());
taskService.deleteTask(taskId, true);
}
代码示例来源:origin: org.camunda.bpm/camunda-engine
/**
* @see http://jira.codehaus.org/browse/ACT-1059
*/
@Test
public void testSetDelegationState() {
Task task = taskService.newTask();
task.setOwner("wuzh");
task.delegate("other");
taskService.saveTask(task);
String taskId = task.getId();
task = taskService.createTaskQuery().taskId(taskId).singleResult();
assertEquals("wuzh", task.getOwner());
assertEquals("other", task.getAssignee());
assertEquals(DelegationState.PENDING, task.getDelegationState());
task.setDelegationState(DelegationState.RESOLVED);
taskService.saveTask(task);
task = taskService.createTaskQuery().taskId(taskId).singleResult();
assertEquals("wuzh", task.getOwner());
assertEquals("other", task.getAssignee());
assertEquals(DelegationState.RESOLVED, task.getDelegationState());
taskService.deleteTask(taskId, true);
}
代码示例来源:origin: org.camunda.bpm/camunda-engine
@Test
public void testTaskDelegationThroughServiceCall() {
Task task = taskService.newTask();
task.setOwner("johndoe");
taskService.saveTask(task);
String taskId = task.getId();
// Fetch the task again and update
task = taskService.createTaskQuery().taskId(taskId).singleResult();
taskService.delegateTask(taskId, "joesmoe");
task = taskService.createTaskQuery().taskId(taskId).singleResult();
assertEquals("johndoe", task.getOwner());
assertEquals("joesmoe", task.getAssignee());
assertEquals(DelegationState.PENDING, task.getDelegationState());
taskService.resolveTask(taskId);
task = taskService.createTaskQuery().taskId(taskId).singleResult();
assertEquals("johndoe", task.getOwner());
assertEquals("johndoe", task.getAssignee());
assertEquals(DelegationState.RESOLVED, task.getDelegationState());
// Finally, delete task
taskService.deleteTask(taskId, true);
}
代码示例来源:origin: org.camunda.bpm/camunda-engine
assertEquals("johndoe", task.getOwner());
assertEquals("joesmoe", task.getAssignee());
assertEquals(DelegationState.PENDING, task.getDelegationState());
assertEquals("johndoe", task.getOwner());
assertEquals("johndoe", task.getAssignee());
assertEquals(DelegationState.RESOLVED, task.getDelegationState());
assertEquals("johndoe", task.getOwner());
assertNull(task.getAssignee());
assertNull(task.getDelegationState());
assertEquals("johndoe", task.getOwner());
assertEquals("jackblack", task.getAssignee());
assertEquals(DelegationState.RESOLVED, task.getDelegationState());
内容来源于网络,如有侵权,请联系作者删除!