i am trying to query nodeinstance log table to find current "state"of process. as required i have configured JpaProcessInstanceDbLog and all node transitions entries are properly logged in nodeinstance Table
i am using code:
for(NodeInstance node :wflowProcessInstance.getNodeInstances()){
List<NodeInstanceLog> nodeInstanceLogList = log.findNodeInstances(instance.getId(), String.valueOf(node.getId()));
if(nodeInstanceLogList.size()==1){
return node.getNodeName();
}
}
log.findNodeInstances(instance.getId(), String.valueOf(node.getId())); ---------------------------- does not return anything though there are entires in database tables and it generates correct sql query.
BUT if i try:
List<NodeInstanceLog> stored= log.findNodeInstances(instance.getId()); ----------------------------- returns all rows correctly.
can someone help ?.