[jboss-dev-forums] [jBPM Development] - Re: Possible Bug: querying nodeInstanceLog by processId and nodeId does not work

Shobhit Tyagi do-not-reply at jboss.com
Fri Apr 19 19:24:06 EDT 2013


Shobhit Tyagi [https://community.jboss.org/people/roxy1987] created the discussion

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

To view the discussion, visit: https://community.jboss.org/message/809370#809370

--------------------------------------------------------------
If you want to find out the state of the process, you can get it from the ProcessInstanceLog object.

But may be by state, you mean the current node in the process which is active. 
In your code though, how do you get the "wflowProcessInstance" ???

Anyway. You could use the following code. 

Process process = kbase.getProcess();
List<NodeInstanceLog> nodeInstanceLogList;
for (Node node : ((WorkflowProcessImpl) process).getNodes())
{
    nodeInstanceLogList = JPAProcessInstanceDbLog.findNodeInstances(processInstId, NumberFormat.getNumberInstance().format(node.getId()));
    if(nodeInstanceLogList.size() == 1)
    {

          //add the node to the list, as there may be more than one node active.
    }
}
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/809370#809370]

Start a new discussion in jBPM Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2035]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20130419/6a325301/attachment.html 


More information about the jboss-dev-forums mailing list