本文整理了Java中org.camunda.bpm.engine.task.Task.getDueDate()
方法的一些代码示例,展示了Task.getDueDate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.getDueDate()
方法的具体详情如下:
包路径:org.camunda.bpm.engine.task.Task
类名称:Task
方法名:getDueDate
[英]Due date of the task.
[中]任务的截止日期。
代码示例来源:origin: camunda/camunda-bpm-platform
@Override
public Date getProperty(Task obj) {
return obj.getDueDate();
}
});
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment
public void testDueDateStringExtension() throws Exception {
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("dateVariable", "1986-07-06T12:10:00");
// Start process-instance, passing date that should be used as dueDate
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("dueDateExtension", variables);
Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult();
assertNotNull(task.getDueDate());
Date date = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss").parse("06-07-1986 12:10:00");
assertEquals(date, task.getDueDate());
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment
public void testDueDateExtension() throws Exception {
Date date = new SimpleDateFormat("dd-MM-yyyy hh:mm:ss").parse("06-07-1986 12:10:00");
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("dateVariable", date);
// Start process-instance, passing date that should be used as dueDate
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("dueDateExtension", variables);
Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult();
assertNotNull(task.getDueDate());
assertEquals(date, task.getDueDate());
}
代码示例来源: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
public void testRelativeDueDate() {
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("dateVariable", "P2DT2H30M");
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("dueDateExtension", variables);
Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult();
Date dueDate = task.getDueDate();
assertNotNull(dueDate);
Period period = new Period(task.getCreateTime().getTime(), dueDate.getTime());
assertEquals(period.getDays(), 2);
assertEquals(period.getHours(), 2);
assertEquals(period.getMinutes(), 30);
}
}
代码示例来源:origin: org.camunda.bpm/camunda-engine
@Override
public Date getProperty(Task obj) {
return obj.getDueDate();
}
});
代码示例来源:origin: camunda/camunda-bpm-platform
public void testQueryByDueDateExpression() {
setTime(task.getDueDate());
assertCount(taskQuery().dueDateExpression("${now()}"), 1);
adjustTime(10);
assertCount(taskQuery().dueDateExpression("${dateTime().minusSeconds(10)}"), 1);
assertCount(taskQuery().dueDateExpression("${now()}"), 0);
}
代码示例来源:origin: camunda/camunda-bpm-platform
dto.assignee = task.getAssignee();
dto.created = task.getCreateTime();
dto.due = task.getDueDate();
dto.followUp = task.getFollowUpDate();
代码示例来源:origin: camunda/camunda-bpm-platform
dto.assignee = task.getAssignee();
dto.created = task.getCreateTime();
dto.due = task.getDueDate();
dto.followUp = task.getFollowUpDate();
代码示例来源:origin: org.camunda.bpm.incubation/camunda-bpm-assert
/**
* Verifies the due date of a {@link Task}.
*
* @param dueDate the date the task should be due at
* @return this {@link TaskAssert}
*/
public TaskAssert hasDueDate(final Date dueDate) {
Task current = getExistingCurrent();
Assertions.assertThat(dueDate).isNotNull();
Assertions.assertThat(current.getDueDate())
.overridingErrorMessage("Expecting %s to be due at '%s', but found it to be due at '%s'!",
toString(current),
dueDate,
current.getDueDate()
)
.isEqualTo(dueDate);
return this;
}
代码示例来源:origin: io.holunda.testing/camunda-bpm-assert
/**
* Verifies the due date of a {@link Task}.
*
* @param dueDate the date the task should be due at
* @return this {@link TaskAssert}
*/
public TaskAssert hasDueDate(final Date dueDate) {
Task current = getExistingCurrent();
Assertions.assertThat(dueDate).isNotNull();
Assertions.assertThat(current.getDueDate())
.overridingErrorMessage("Expecting %s to be due at '%s', but found it to be due at '%s'!",
toString(current),
dueDate,
current.getDueDate()
)
.isEqualTo(dueDate);
return this;
}
代码示例来源:origin: camunda/camunda-bpm-assert
/**
* Verifies the due date of a {@link Task}.
*
* @param dueDate the date the task should be due at
* @return this {@link TaskAssert}
*/
public TaskAssert hasDueDate(final Date dueDate) {
Task current = getExistingCurrent();
Assertions.assertThat(dueDate).isNotNull();
Assertions.assertThat(current.getDueDate())
.overridingErrorMessage("Expecting %s to be due at '%s', but found it to be due at '%s'!",
toString(current),
dueDate,
current.getDueDate()
)
.isEqualTo(dueDate);
return this;
}
代码示例来源:origin: camunda/camunda-bpm-platform
dto.assignee = task.getAssignee();
dto.created = task.getCreateTime();
dto.due = task.getDueDate();
dto.followUp = task.getFollowUpDate();
dto.delegationState = task.getDelegationState();
代码示例来源:origin: camunda/camunda-bpm-platform
dto.assignee = task.getAssignee();
dto.created = task.getCreateTime();
dto.due = task.getDueDate();
dto.followUp = task.getFollowUpDate();
dto.delegationState = task.getDelegationState();
代码示例来源:origin: org.camunda.bpm/camunda-engine
@Deployment
public void testDueDateStringExtension() throws Exception {
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("dateVariable", "1986-07-06T12:10:00");
// Start process-instance, passing date that should be used as dueDate
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("dueDateExtension", variables);
Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult();
assertNotNull(task.getDueDate());
Date date = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss").parse("06-07-1986 12:10:00");
assertEquals(date, task.getDueDate());
}
代码示例来源:origin: org.camunda.bpm/camunda-engine
@Deployment
public void testDueDateExtension() throws Exception {
Date date = new SimpleDateFormat("dd-MM-yyyy hh:mm:ss").parse("06-07-1986 12:10:00");
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("dateVariable", date);
// Start process-instance, passing date that should be used as dueDate
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("dueDateExtension", variables);
Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult();
assertNotNull(task.getDueDate());
assertEquals(date, task.getDueDate());
}
代码示例来源:origin: org.camunda.bpm.incubation/camunda-bpm-fluent-assertions
/**
* Assertion on the due date of the {@link org.camunda.bpm.engine.task.Task}.
*
* @param dueDate the due date
*
* @return a {@link TaskAssert} that can be further configured before starting the process instance
*
* @see org.camunda.bpm.engine.task.Task#getDueDate()
*/
public TaskAssert hasDueDate(Date dueDate) {
isNotNull();
Task task = findCurrentTaskById(actual.getId());
Assertions.assertThat(task)
.overridingErrorMessage("Expected task '%s' to have '%s' as due date but has '%s'",
actual.getName(), dueDate, task.getDueDate());
return this;
}
代码示例来源:origin: camunda/camunda-bpm-platform
assertEquals("taskassignee", task.getAssignee());
assertEquals("taskowner", task.getOwner());
assertEquals(dueDate, task.getDueDate());
assertEquals(0, task.getPriority());
assertEquals("taskcaseinstanceid", task.getCaseInstanceId());
assertEquals("updatedassignee", task.getAssignee());
assertEquals("updatedowner", task.getOwner());
assertEquals(dueDate, task.getDueDate());
assertEquals(1, task.getPriority());
assertEquals("updatetaskcaseinstanceid", task.getCaseInstanceId());
代码示例来源:origin: org.camunda.bpm/camunda-engine
@Deployment
public void testRelativeDueDate() {
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("dateVariable", "P2DT2H30M");
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("dueDateExtension", variables);
Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult();
Date dueDate = task.getDueDate();
assertNotNull(dueDate);
Period period = new Period(task.getCreateTime().getTime(), dueDate.getTime());
assertEquals(period.getDays(), 2);
assertEquals(period.getHours(), 2);
assertEquals(period.getMinutes(), 30);
}
}
代码示例来源:origin: org.camunda.bpm/camunda-engine
public void testQueryByDueDateExpression() {
setTime(task.getDueDate());
assertCount(taskQuery().dueDateExpression("${now()}"), 1);
adjustTime(10);
assertCount(taskQuery().dueDateExpression("${dateTime().minusSeconds(10)}"), 1);
assertCount(taskQuery().dueDateExpression("${now()}"), 0);
}
内容来源于网络,如有侵权,请联系作者删除!