[jboss-user] [jBPM] - Re: Implementing "Where Is the Process Now" feature
roxy1987
do-not-reply at jboss.com
Thu Feb 14 10:19:50 EST 2013
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion
"Re: Implementing "Where Is the Process Now" feature"
To view the discussion, visit: https://community.jboss.org/message/797718#797718
--------------------------------------------------------------
To get the status of a process graphically, you need to find out the coordinates of the activity which is currently pending. The coordinates are saved in the bpmn file and can be retrieved as following :
process = kbase.getProcess(processDefId);
ArrayList<Object> coordinates = new ArrayList<Object>();
try
{
List<NodeInstanceLog> nodeInstanceLogList;
for (Node node : (Node[])((WorkflowProcessImpl) process).getNodes())
{
nodeInstanceLogList = JPAProcessInstanceDbLog.findNodeInstances(Long.parseLong(processInstanceId), new Long(node.getId()).toString());
if(nodeInstanceLogList.size() == 1)
{
logger.info("Name of the Node : "+node.getName());
coordinates.add(node.getMetaData().get("x"));
coordinates.add(node.getMetaData().get("y"));
coordinates.add(node.getMetaData().get("height"));
coordinates.add(node.getMetaData().get("width"));
}
}
coordinates.add(processName);
}
catch(Exception e)
{
CustomExceptionHandler.handleException(e);
}
Once you have the coordinates you can use div tags in html to relatively places images of process and arrow.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/797718#797718]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130214/ba66121a/attachment.html
More information about the jboss-user
mailing list