05-05-2011 01:22 PM
ProcessInstanceQuery pq = runtimeService.createProcessInstanceQuery().processInstanceId(pid);
ProcessInstance pi = pq.singleResult();
05-05-2011 06:29 PM
05-06-2011 06:48 AM
<definitions id="definitions"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn"
targetNamespace="Examples">
<process id="helloProcess">
<startEvent id="start" />
<sequenceFlow id="flow1" sourceRef="start" targetRef="collect1" />
<userTask id="collect1">
</userTask>
<sequenceFlow id="flow2" sourceRef="collect1" targetRef="end" />
<endEvent id="end" />
</process>
</definitions>
ProcessInstance pi = runtimeService.startProcessInstanceByKey("helloProcess");
String taskId = taskService.createTaskQuery().singleResult().getId()
taskService.complete(taskId);
pi.isEnded()
05-06-2011 07:01 AM
05-06-2011 07:23 AM
HistoricProcessInstance hpi = historyService.createHistoricProcessInstanceQuery().processInstanceId(pid).finished().singleResult()
above works fine with my code and i can see that my process has been ended.
ProcessInstanceQuery pi = runtimeService.createProcessInstanceQuery().processInstanceId(pid).singleResult();
once the process has been ended runtimeService will never find it and as a result pi will always be null. As a consequence isEnded method doesn't make sense because:05-06-2011 09:20 AM
But for the real use I have no idea…
05-09-2011 05:28 AM
07-05-2015 01:21 PM
07-05-2015 01:25 PM
07-07-2015 07:48 AM
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.