[jboss-user] [JBoss jBPM] - problem with attributes of Node - XPath

yairfr do-not-reply at jboss.com
Thu Aug 16 07:55:52 EDT 2007


hi ,

i am showing a process with it's currrent task (Node) .

the code that retrieve the measurments of the red box that will wrap
the Node 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;
  | 		  }
  | 

the problem is that i get sometimes from the width and height attributes
value -1 .

can you please tell me what is the problem , and where, in the deployment itself or in the XPath .

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

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



More information about the jboss-user mailing list