Mdu Keswa [
https://community.jboss.org/people/mduk] created the discussion
"Re: How to retrieve unfinished tasks from process instance in jbpm 5"
To view the discussion, visit:
https://community.jboss.org/message/743451#743451
--------------------------------------------------------------
Pedro - we ended up doing the following. I feel like there definitely a better way as
Mauricio suggested:
1. Find active nodes
2. Find all nodes after nodes in #1
3. Find all human nodes in #2
Notes on 1.:
ProcessInstanceLog processInstanceLog = jpaDbLog.findProcessInstance(new
Long(instanceId))
Notes on 3.:
| | | | | | while (node != null) { |
| | | | | | | if (node instanceof HumanTaskNode) { |
| | | | | | | | list.add((HumanTaskNode)node); |
| | | | | | | } |
| | | | | | | connections = null; |
| | | | | | | connections = node.getOutgoingConnections("DROOLS_DEFAULT");
|
| | | | | | | if (connections != null && connections.size() > 0) { |
| | | | | | | | node =
node.getOutgoingConnections("DROOLS_DEFAULT").get(0).getTo(); |
| | | | | | | } else { |
| | | | | | | | break; |
| | | | | | | } |
| | | | | | } |
I hope this helps.
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/743451#743451]
Start a new discussion in jBPM Development at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]