org.camunda.bpm.engine.task.Task.getFollowUpDate()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(13.1k)|赞(0)|评价(0)|浏览(83)

本文整理了Java中org.camunda.bpm.engine.task.Task.getFollowUpDate()方法的一些代码示例,展示了Task.getFollowUpDate()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.getFollowUpDate()方法的具体详情如下:
包路径:org.camunda.bpm.engine.task.Task
类名称:Task
方法名:getFollowUpDate

Task.getFollowUpDate介绍

[英]Follow-up date of the task.
[中]跟进任务日期。

代码示例

代码示例来源:origin: camunda/camunda-bpm-platform

@Override
 public Date getProperty(Task obj) {
  return obj.getFollowUpDate();
 }
});

代码示例来源:origin: camunda/camunda-bpm-platform

@Deployment(resources = {"org/camunda/bpm/engine/test/cmmn/humantask/HumanTaskFollowUpDateTest.testHumanTaskFollowUpDate.cmmn"})
public void testHumanTaskFollowUpDateExtension() throws Exception {
 Date date = new SimpleDateFormat("dd-MM-yyyy hh:mm:ss").parse("01-01-2015 12:10:00");
 Map<String, Object> variables = new HashMap<String, Object>();
 variables.put("dateVariable", date);
 String caseInstanceId = caseService.createCaseInstanceByKey("case", variables).getId();
 Task task = taskService.createTaskQuery().caseInstanceId(caseInstanceId).singleResult();
 assertNotNull(task.getFollowUpDate());
 assertEquals(date, task.getFollowUpDate());
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Deployment(resources = {"org/camunda/bpm/engine/test/cmmn/humantask/HumanTaskFollowUpDateTest.testHumanTaskFollowUpDate.cmmn"})
public void testHumanTaskFollowUpDateStringExtension() throws Exception {
 Map<String, Object> variables = new HashMap<String, Object>();
 variables.put("dateVariable", "2015-01-01T12:10:00");
 String caseInstanceId = caseService.createCaseInstanceByKey("case", variables).getId();
 Task task = taskService.createTaskQuery().caseInstanceId(caseInstanceId).singleResult();
 assertNotNull(task.getFollowUpDate());
 Date date = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss").parse("01-01-2015 12:10:00");
 assertEquals(date, task.getFollowUpDate());
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Deployment(resources = {"org/camunda/bpm/engine/test/bpmn/usertask/TaskFollowUpDateExtensionsTest.testUserTaskFollowUpDate.bpmn20.xml"})
public void testUserTaskFollowUpDateExtension() throws Exception {
 Date date = new SimpleDateFormat("dd-MM-yyyy hh:mm:ss").parse("01-01-2015 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 followUpDate
 ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process", variables);
 Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult();
 assertNotNull(task.getFollowUpDate());
 assertEquals(date, task.getFollowUpDate());
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Deployment(resources = {"org/camunda/bpm/engine/test/bpmn/usertask/TaskFollowUpDateExtensionsTest.testUserTaskFollowUpDate.bpmn20.xml"})
public void testUserTaskFollowUpDateStringExtension() throws Exception {
 Map<String, Object> variables = new HashMap<String, Object>();
 variables.put("dateVariable", "2015-01-01T12:10:00");
 // Start process-instance, passing date that should be used as followUpDate
 ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process", variables);
 Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult();
 assertNotNull(task.getFollowUpDate());
 Date date = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss").parse("01-01-2015 12:10:00");
 assertEquals(date, task.getFollowUpDate());
}

代码示例来源: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/humantask/HumanTaskFollowUpDateTest.testHumanTaskFollowUpDate.cmmn"})
public void testHumanTaskRelativeFollowUpDate() {
 Map<String, Object> variables = new HashMap<String, Object>();
 variables.put("dateVariable", "P2DT2H30M");
 String caseInstanceId = caseService.createCaseInstanceByKey("case", variables).getId();
 Task task = taskService.createTaskQuery().caseInstanceId(caseInstanceId).singleResult();
 Date followUpDate = task.getFollowUpDate();
 assertNotNull(followUpDate);
 Period period = new Period(task.getCreateTime().getTime(), followUpDate.getTime());
 assertEquals(period.getDays(), 2);
 assertEquals(period.getHours(), 2);
 assertEquals(period.getMinutes(), 30);
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Deployment(resources = {"org/camunda/bpm/engine/test/bpmn/usertask/TaskFollowUpDateExtensionsTest.testUserTaskFollowUpDate.bpmn20.xml"})
public void testUserTaskRelativeFollowUpDate() {
 Map<String, Object> variables = new HashMap<String, Object>();
 variables.put("dateVariable", "P2DT2H30M");
 ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process", variables);
 Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult();
 Date followUpDate = task.getFollowUpDate();
 assertNotNull(followUpDate);
 Period period = new Period(task.getCreateTime().getTime(), followUpDate.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.getFollowUpDate();
 }
});

代码示例来源:origin: camunda/camunda-bpm-platform

public void testQueryByFollowUpDateExpression() {
 setTime(task.getFollowUpDate());
 assertCount(taskQuery().followUpDateExpression("${now()}"), 1);
 adjustTime(10);
 assertCount(taskQuery().followUpDateExpression("${dateTime().minusSeconds(10)}"), 1);
 assertCount(taskQuery().followUpDateExpression("${now()}"), 0);
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Deployment(resources={"org/camunda/bpm/engine/test/api/task/TaskQueryTest.testProcessDefinition.bpmn20.xml"})
public void testFollowUpDate() throws Exception {
 Calendar otherDate = Calendar.getInstance();
 ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("oneTaskProcess");
 // do not find any task instances with follow up date
 assertEquals(0, taskService.createTaskQuery().followUpDate(otherDate.getTime()).count());
 assertEquals(1, taskService.createTaskQuery().processInstanceId(processInstance.getId())
   // we might have tasks from other test cases - so we limit to the current PI
   .followUpBeforeOrNotExistent(otherDate.getTime()).count());
 Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult();
 // set follow-up date on task
 Date followUpDate = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss").parse("01/02/2003 01:12:13");
 task.setFollowUpDate(followUpDate);
 taskService.saveTask(task);
 assertEquals(followUpDate, taskService.createTaskQuery().taskId(task.getId()).singleResult().getFollowUpDate());
 assertEquals(1, taskService.createTaskQuery().followUpDate(followUpDate).count());
 otherDate.setTime(followUpDate);
 otherDate.add(Calendar.YEAR, 1);
 assertEquals(0, taskService.createTaskQuery().followUpDate(otherDate.getTime()).count());
 assertEquals(1, taskService.createTaskQuery().followUpBefore(otherDate.getTime()).count());
 assertEquals(1, taskService.createTaskQuery().processInstanceId(processInstance.getId()) //
   .followUpBeforeOrNotExistent(otherDate.getTime()).count());
 assertEquals(0, taskService.createTaskQuery().followUpAfter(otherDate.getTime()).count());
 otherDate.add(Calendar.YEAR, -2);
 assertEquals(1, taskService.createTaskQuery().followUpAfter(otherDate.getTime()).count());
 assertEquals(0, taskService.createTaskQuery().followUpBefore(otherDate.getTime()).count());
 assertEquals(0, taskService.createTaskQuery().processInstanceId(processInstance.getId()) //
   .followUpBeforeOrNotExistent(otherDate.getTime()).count());
 taskService.complete(task.getId());
}

代码示例来源:origin: camunda/camunda-bpm-platform

dto.created = task.getCreateTime();
dto.due = task.getDueDate();
dto.followUp = task.getFollowUpDate();

代码示例来源:origin: camunda/camunda-bpm-platform

dto.created = task.getCreateTime();
dto.due = task.getDueDate();
dto.followUp = task.getFollowUpDate();

代码示例来源:origin: camunda/camunda-bpm-platform

dto.created = task.getCreateTime();
dto.due = task.getDueDate();
dto.followUp = task.getFollowUpDate();
dto.delegationState = task.getDelegationState();
dto.description = task.getDescription();

代码示例来源:origin: camunda/camunda-bpm-platform

dto.created = task.getCreateTime();
dto.due = task.getDueDate();
dto.followUp = task.getFollowUpDate();
dto.delegationState = task.getDelegationState();
dto.description = task.getDescription();

代码示例来源:origin: org.camunda.bpm/camunda-engine

@Deployment(resources = {"org/camunda/bpm/engine/test/bpmn/usertask/TaskFollowUpDateExtensionsTest.testUserTaskFollowUpDate.bpmn20.xml"})
public void testUserTaskFollowUpDateStringExtension() throws Exception {
 Map<String, Object> variables = new HashMap<String, Object>();
 variables.put("dateVariable", "2015-01-01T12:10:00");
 // Start process-instance, passing date that should be used as followUpDate
 ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process", variables);
 Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult();
 assertNotNull(task.getFollowUpDate());
 Date date = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss").parse("01-01-2015 12:10:00");
 assertEquals(date, task.getFollowUpDate());
}

代码示例来源:origin: org.camunda.bpm/camunda-engine

@Deployment(resources = {"org/camunda/bpm/engine/test/cmmn/humantask/HumanTaskFollowUpDateTest.testHumanTaskFollowUpDate.cmmn"})
public void testHumanTaskFollowUpDateExtension() throws Exception {
 Date date = new SimpleDateFormat("dd-MM-yyyy hh:mm:ss").parse("01-01-2015 12:10:00");
 Map<String, Object> variables = new HashMap<String, Object>();
 variables.put("dateVariable", date);
 String caseInstanceId = caseService.createCaseInstanceByKey("case", variables).getId();
 Task task = taskService.createTaskQuery().caseInstanceId(caseInstanceId).singleResult();
 assertNotNull(task.getFollowUpDate());
 assertEquals(date, task.getFollowUpDate());
}

代码示例来源:origin: org.camunda.bpm/camunda-engine

@Deployment(resources = {"org/camunda/bpm/engine/test/bpmn/usertask/TaskFollowUpDateExtensionsTest.testUserTaskFollowUpDate.bpmn20.xml"})
public void testUserTaskFollowUpDateExtension() throws Exception {
 Date date = new SimpleDateFormat("dd-MM-yyyy hh:mm:ss").parse("01-01-2015 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 followUpDate
 ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process", variables);
 Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult();
 assertNotNull(task.getFollowUpDate());
 assertEquals(date, task.getFollowUpDate());
}

代码示例来源:origin: org.camunda.bpm/camunda-engine

@Deployment(resources = {"org/camunda/bpm/engine/test/cmmn/humantask/HumanTaskFollowUpDateTest.testHumanTaskFollowUpDate.cmmn"})
public void testHumanTaskFollowUpDateStringExtension() throws Exception {
 Map<String, Object> variables = new HashMap<String, Object>();
 variables.put("dateVariable", "2015-01-01T12:10:00");
 String caseInstanceId = caseService.createCaseInstanceByKey("case", variables).getId();
 Task task = taskService.createTaskQuery().caseInstanceId(caseInstanceId).singleResult();
 assertNotNull(task.getFollowUpDate());
 Date date = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss").parse("01-01-2015 12:10:00");
 assertEquals(date, task.getFollowUpDate());
}

代码示例来源:origin: org.camunda.bpm/camunda-engine

public void testQueryByFollowUpDateExpression() {
 setTime(task.getFollowUpDate());
 assertCount(taskQuery().followUpDateExpression("${now()}"), 1);
 adjustTime(10);
 assertCount(taskQuery().followUpDateExpression("${dateTime().minusSeconds(10)}"), 1);
 assertCount(taskQuery().followUpDateExpression("${now()}"), 0);
}

相关文章