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.