Process does not end
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2014 03:15 PM
Hey together,
i'm playing a little bit with activiti and i have a strange behaviour, when i'm using usertasks.
My process never ends and i don't know why.
My Process:
What i'm doing wrong?
Thanks a lot.
i'm playing a little bit with activiti and i have a strange behaviour, when i'm using usertasks.
My process never ends and i don't know why.
My Process:
<?xml version="1.0" encoding="UTF-8"?><definitions> <message id="newRequest" name="newRequest"></message> <process id="myProcess" name="My process" isExecutable="true"> <startEvent id="messagestartevent1" name="workflow"> <messageEventDefinition messageRef="newRequest"></messageEventDefinition> </startEvent> <userTask id="Approval" name="Approval"> <extensionElements> <activiti:taskListener event="create" class="AssignSupervisor"></activiti:taskListener> </extensionElements> </userTask> <sequenceFlow id="flow1" sourceRef="messagestartevent1" targetRef="Approval"></sequenceFlow> <endEvent id="endevent1" name="End"> <extensionElements> <activiti:executionListener event="start" class="sendNotification"></activiti:executionListener> </extensionElements> </endEvent> <sequenceFlow id="flow2" sourceRef="Approval" targetRef="endevent1"></sequenceFlow> </process></definitions>
ProcessInstance costInstance = runtimeService.startProcessInstanceByMessage("newRequest"); TaskService ts = processEngine.getTaskService(); List<Task> tasks = ts.createTaskQuery().taskAssignee("supervisor1").list(); assertEquals(1, tasks.size()); //true ts.complete(tasks.get(0).getId()); System.out.println(costInstance.getActivityId()); //Approval assertEquals(true, costInstance.isEnded()); //false
What i'm doing wrong?
Thanks a lot.
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2014 01:56 AM
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2014 05:11 AM
Thank you.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2014 05:15 AM
Thanks @ollib for posting that link.
@mrb, keep in mind that the ProcessInstance object you get back is a snapshot from the time you queried the instance, this is right after you started it. All other operations (eg. completing a task) are not reflected on the processInstance object, unless queried again.
You can compare it with detatched entities in JPA…
@mrb, keep in mind that the ProcessInstance object you get back is a snapshot from the time you queried the instance, this is right after you started it. All other operations (eg. completing a task) are not reflected on the processInstance object, unless queried again.
You can compare it with detatched entities in JPA…