[jboss-user] [JBoss jBPM] - showing image of current process stage

yairfr do-not-reply at jboss.com
Mon Aug 6 08:18:06 EDT 2007


hi ,

i develped  a small program that reads the gpd.xml and the processdefinition.xml of the process and show the map of the process with a red rectangle arround the current task of the process .
sometimes the rectange is not sorrounding the Node but is in other location , i suspect it is because of changes that was done to the diagram
that changed or not changed the XML .

anyway the code the determine the X,Y of the Rectange is :

  | 	  public int[] extractBoxConstraint(Element root, Token currentToken) {
  | 		    int[] result = new int[4];
  | 		    String nodeName = currentToken.getNode().getName();
  | 		    XPath xPath = new DefaultXPath("//node[@name='" + nodeName + "']");
  | 		    Element node = (Element) xPath.selectSingleNode(root);
  | 		    result[0] = Integer.valueOf(node.attribute("x").getValue()).intValue();
  | 		    result[1] = Integer.valueOf(node.attribute("y").getValue()).intValue();
  | 		    result[2] = Integer.valueOf(node.attribute("width").getValue()).intValue();
  | 		    result[3] = Integer.valueOf(node.attribute("height").getValue()).intValue();
  | 		    return result;
  | 		  }
  | 

thanks in Advance .
Yair

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071153#4071153

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071153



More information about the jboss-user mailing list