HistoryService historyService = activitiRule.getHistoryService();
List<HistoricDetail> list = historyService.createHistoricDetailQuery().formProperties().list();
assertEquals(1, list.size());
// 获取第一个节点
TaskService taskService = activitiRule.getTaskService();
Task task = taskService.createTaskQuery().singleResult();
assertEquals("First Step", task.getName());
TaskFormData taskFormData = formService.getTaskFormData(task.getId());
assertNotNull(taskFormData);
assertNull(taskFormData.getFormKey());
List<FormProperty> taskFormProperties = taskFormData.getFormProperties();
assertNotNull(taskFormProperties);
for (FormProperty formProperty : taskFormProperties) {
System.out.println(ToStringBuilder.reflectionToString(formProperty));
}
formProperties = new HashMap<String, String>();
formProperties.put("setInFirstStep", "01/12/2012");
formService.submitTaskFormData(task.getId(), formProperties);
// 获取第二个节点
task = taskService.createTaskQuery().taskName("Second Step").singleResult();
assertNotNull(task);
taskFormData = formService.getTaskFormData(task.getId());
assertNotNull(taskFormData);
List<FormProperty> formProperties2 = taskFormData.getFormProperties();
assertNotNull(formProperties2);