JBoss Community

Possible Bug: querying nodeInstanceLog by processId and nodeId does not work

created by mayank sahai in jBPM Development - View the full discussion

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 ?.

Reply to this message by going to Community

Start a new discussion in jBPM Development at Community