03-01-2013 05:07 AM
…
TaskService taskService = activitiRule.getTaskService();
Task task = taskService.createTaskQuery().singleResult();
FormService formService = activitiRule.getFormService();
…
List<HistoricDetail> historyVariables = activitiRule.getHistoryService()
.createHistoricDetailQuery()
.variableUpdates()
.orderByVariableName()
.asc()
.list();
assertNotNull(historyVariables);
assertEquals(2, historyVariables.size());
HistoricVariableUpdate abc= ((HistoricVariableUpdate) historyVariables.get(1));
…
03-01-2013 05:13 AM
03-01-2013 05:21 AM
public class CreateIdNumberTest {
@Rule
public ActivitiRule activitiRule = new ActivitiRule("activiti.cfg-mem-fullhistory.xml");
@Test
// deploys process with form properties
@Deployment(resources = { "part2Arrival/createIdNumber.bpmn20.xml" })
public void testCreateIdNumber() {
Map<String, Object> variables = new HashMap<String, Object>();
Stappi stI = new Stappi();
variables.put("stappi", stI);
RuntimeService runtimeService = activitiRule.getRuntimeService();
runtimeService.startProcessInstanceByKey("part2CreateIdNumber", variables);
Map<String, String> formProperties = new HashMap<String, String>();
formProperties.put("IdNumber", "123456789");
TaskService taskService = activitiRule.getTaskService();
Task task = taskService.createTaskQuery().singleResult();
FormService formService = activitiRule.getFormService();
formService.submitTaskFormData(task.getId(), formProperties);
// view history query for form properties
List<HistoricDetail> historyVariables = activitiRule.getHistoryService()
.createHistoricDetailQuery()
.variableUpdates()
.orderByVariableName()
.asc()
.list();
assertNotNull(historyVariables);
assertEquals(2, historyVariables.size());
HistoricVariableUpdate stAppup= ((HistoricVariableUpdate) historyVariables.get(1));
assertEquals("studentAppInfo", stAppup.getVariableName());
Stappi saii = (Stappi) stAppup.getValue();
assertEquals("123456789", saii.getIdNumber());
System.out.println("CreateIdNumberTest was successful");
}
}
03-01-2013 05:33 AM
But I don't know how I fixed this. But it was activiti specific.
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.