本文整理了Java中org.camunda.bpm.engine.task.Task.getDescription()
方法的一些代码示例,展示了Task.getDescription()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.getDescription()
方法的具体详情如下:
包路径:org.camunda.bpm.engine.task.Task
类名称:Task
方法名:getDescription
[英]Free text description of the task.
[中]任务的自由文本描述。
代码示例来源:origin: camunda/camunda-bpm-platform
@Override
public String getProperty(Task obj) {
return obj.getDescription();
}
});
代码示例来源: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
@Deployment(resources = "org/camunda/bpm/engine/test/cmmn/cmm10/Cmmn10CompatibilityTest.testDescription.cmmn")
public void testDescription() {
// given
createCaseInstanceByKey("case");
// when
String humanTask = queryCaseExecutionByActivityId("PI_HumanTask_1").getId();
// then
Task task = taskService.createTaskQuery().singleResult();
assertEquals("This is a description!", task.getDescription());
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void tesBasicTaskPropertiesNotNull() {
Task task = taskService.createTaskQuery().taskId(taskIds.get(0)).singleResult();
assertNotNull(task.getDescription());
assertNotNull(task.getId());
assertNotNull(task.getName());
assertNotNull(task.getCreateTime());
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Test
@Deployment(resources = {"org/camunda/bpm/engine/test/bpmn/tasklistener/TaskListenerTest.bpmn20.xml"})
public void testTaskCreateListener() {
runtimeService.startProcessInstanceByKey("taskListenerProcess");
Task task = taskService.createTaskQuery().singleResult();
assertEquals("Schedule meeting", task.getName());
assertEquals("TaskCreateListener is listening!", task.getDescription());
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment
public void testTaskAssignee() {
// Start process instance
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("taskAssigneeExampleProcess");
// Get task list
List<Task> tasks = taskService
.createTaskQuery()
.taskAssignee("kermit")
.list();
assertEquals(1, tasks.size());
Task myTask = tasks.get(0);
assertEquals("Schedule meeting", myTask.getName());
assertEquals("Schedule an engineering meeting for next week with the new hire.", myTask.getDescription());
// Complete task. Process is now finished
taskService.complete(myTask.getId());
// assert if the process instance completed
assertProcessEnded(processInstance.getId());
}
代码示例来源:origin: org.camunda.bpm/camunda-engine
@Override
public String getProperty(Task obj) {
return obj.getDescription();
}
});
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources = {
"org/camunda/bpm/engine/test/api/form/util/VacationRequest_deprecated_forms.bpmn20.xml",
"org/camunda/bpm/engine/test/api/form/util/approve.form",
"org/camunda/bpm/engine/test/api/form/util/request.form",
"org/camunda/bpm/engine/test/api/form/util/adjustRequest.form" })
@Test
public void testTaskFormsWithVacationRequestProcess() {
// Get start form
String procDefId = repositoryService.createProcessDefinitionQuery().singleResult().getId();
Object startForm = formService.getRenderedStartForm(procDefId, "juel");
assertNotNull(startForm);
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().singleResult();
String processDefinitionId = processDefinition.getId();
assertEquals("org/camunda/bpm/engine/test/api/form/util/request.form", formService.getStartFormData(processDefinitionId).getFormKey());
// Define variables that would be filled in through the form
Map<String, String> formProperties = new HashMap<String, String>();
formProperties.put("employeeName", "kermit");
formProperties.put("numberOfDays", "4");
formProperties.put("vacationMotivation", "I'm tired");
formService.submitStartFormData(procDefId, formProperties);
// Management should now have a task assigned to them
Task task = taskService.createTaskQuery().taskCandidateGroup("management").singleResult();
assertEquals("Vacation request by kermit", task.getDescription());
Object taskForm = formService.getRenderedTaskForm(task.getId(), "juel");
assertNotNull(taskForm);
// Rejecting the task should put the process back to first task
taskService.complete(task.getId(), CollectionUtil.singletonMap("vacationApproved", "false"));
task = taskService.createTaskQuery().singleResult();
assertEquals("Adjust vacation request", task.getName());
}
代码示例来源:origin: camunda/camunda-bpm-platform
dto.description = task.getDescription();
dto.executionId = task.getExecutionId();
dto.owner = task.getOwner();
代码示例来源:origin: camunda/camunda-bpm-platform
dto.description = task.getDescription();
dto.executionId = task.getExecutionId();
dto.owner = task.getOwner();
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment
public void testTaskPropertiesNotNull() {
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("oneTaskProcess");
List<String> activeActivityIds = runtimeService.getActiveActivityIds(processInstance.getId());
Task task = taskService.createTaskQuery().singleResult();
assertNotNull(task.getId());
assertEquals("my task", task.getName());
assertEquals("Very important", task.getDescription());
assertTrue(task.getPriority() > 0);
assertEquals("kermit", task.getAssignee());
assertEquals(processInstance.getId(), task.getProcessInstanceId());
assertEquals(processInstance.getId(), task.getExecutionId());
assertNotNull(task.getProcessDefinitionId());
assertNotNull(task.getTaskDefinitionKey());
assertNotNull(task.getCreateTime());
// the next test verifies that if an execution creates a task, that no events are created during creation of the task.
if (processEngineConfiguration.getHistoryLevel().getId() >= ProcessEngineConfigurationImpl.HISTORYLEVEL_ACTIVITY) {
assertEquals(0, taskService.getTaskEvents(task.getId()).size());
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
dto.followUp = task.getFollowUpDate();
dto.delegationState = task.getDelegationState();
dto.description = task.getDescription();
dto.executionId = task.getExecutionId();
dto.owner = task.getOwner();
代码示例来源:origin: camunda/camunda-bpm-platform
dto.followUp = task.getFollowUpDate();
dto.delegationState = task.getDelegationState();
dto.description = task.getDescription();
dto.executionId = task.getExecutionId();
dto.owner = task.getOwner();
代码示例来源:origin: org.camunda.bpm.incubation/camunda-bpm-fluent-assertions
/**
* Assertion on the free text description of the {@link org.camunda.bpm.engine.task.Task}.
*
* @param description the free text description of the task
*
* @return a {@link TaskAssert} that can be further configured before starting the process instance
*
* @see org.camunda.bpm.engine.task.Task#getDescription()
*/
public TaskAssert hasDescription(String description) {
isNotNull();
Task task = findCurrentTaskById(actual.getId());
Assertions.assertThat(task)
.overridingErrorMessage("Expected task '%s' to have '%s' as name but has '%s'",
actual.getName(), description, task.getDescription());
return this;
}
代码示例来源:origin: camunda/camunda-bpm-platform
assertEquals("description", task.getDescription());
assertEquals("taskname", task.getName());
assertEquals("taskassignee", task.getAssignee());
assertEquals("updateddescription", task.getDescription());
assertEquals("updatedassignee", task.getAssignee());
assertEquals("updatedowner", task.getOwner());
代码示例来源:origin: org.camunda.bpm/camunda-engine
public void tesBasicTaskPropertiesNotNull() {
Task task = taskService.createTaskQuery().taskId(taskIds.get(0)).singleResult();
assertNotNull(task.getDescription());
assertNotNull(task.getId());
assertNotNull(task.getName());
assertNotNull(task.getCreateTime());
}
代码示例来源:origin: org.camunda.bpm/camunda-engine
@Deployment(resources = "org/camunda/bpm/engine/test/cmmn/cmm10/Cmmn10CompatibilityTest.testDescription.cmmn")
public void testDescription() {
// given
createCaseInstanceByKey("case");
// when
String humanTask = queryCaseExecutionByActivityId("PI_HumanTask_1").getId();
// then
Task task = taskService.createTaskQuery().singleResult();
assertEquals("This is a description!", task.getDescription());
}
代码示例来源:origin: org.camunda.bpm/camunda-engine
@Test
@Deployment(resources = {"org/camunda/bpm/engine/test/bpmn/tasklistener/TaskListenerTest.bpmn20.xml"})
public void testTaskCreateListener() {
runtimeService.startProcessInstanceByKey("taskListenerProcess");
Task task = taskService.createTaskQuery().singleResult();
assertEquals("Schedule meeting", task.getName());
assertEquals("TaskCreateListener is listening!", task.getDescription());
}
代码示例来源:origin: org.camunda.bpm/camunda-engine
@Deployment
public void testTaskAssignee() {
// Start process instance
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("taskAssigneeExampleProcess");
// Get task list
List<Task> tasks = taskService
.createTaskQuery()
.taskAssignee("kermit")
.list();
assertEquals(1, tasks.size());
Task myTask = tasks.get(0);
assertEquals("Schedule meeting", myTask.getName());
assertEquals("Schedule an engineering meeting for next week with the new hire.", myTask.getDescription());
// Complete task. Process is now finished
taskService.complete(myTask.getId());
// assert if the process instance completed
assertProcessEnded(processInstance.getId());
}
代码示例来源:origin: org.camunda.bpm/camunda-engine
@Deployment
public void testTaskPropertiesNotNull() {
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("oneTaskProcess");
List<String> activeActivityIds = runtimeService.getActiveActivityIds(processInstance.getId());
Task task = taskService.createTaskQuery().singleResult();
assertNotNull(task.getId());
assertEquals("my task", task.getName());
assertEquals("Very important", task.getDescription());
assertTrue(task.getPriority() > 0);
assertEquals("kermit", task.getAssignee());
assertEquals(processInstance.getId(), task.getProcessInstanceId());
assertEquals(processInstance.getId(), task.getExecutionId());
assertNotNull(task.getProcessDefinitionId());
assertNotNull(task.getTaskDefinitionKey());
assertNotNull(task.getCreateTime());
// the next test verifies that if an execution creates a task, that no events are created during creation of the task.
if (processEngineConfiguration.getHistoryLevel().getId() >= ProcessEngineConfigurationImpl.HISTORYLEVEL_ACTIVITY) {
assertEquals(0, taskService.getTaskEvents(task.getId()).size());
}
}
内容来源于网络,如有侵权,请联系作者删除!