[jboss-user] [JBoss jBPM] - GPD-78 Adding ConfigInfoElements to Actions and nested Confi

jorell do-not-reply at jboss.com
Fri Aug 3 21:37:49 EDT 2007


This is mainly to do with Jira issue GPD-78 http://jira.jboss.com/jira/browse/GPD-78. For some reason i was unable to create an account otherwise I would have re-opened the issue myself. 
If someone else is getting the same problem could they re-open this issue.

Basically my process has an a node with an action element like this:
<action class="SomeActionHandler">
  | 	<keys>
  | 		<entry>
  |                                             <key>VarName</key>
  |                                             <value>1122</value>
  |                                 </entry>
  | 	</keys>
  | 	<receive>
  | 		<element>030101</element>
  | 		<element>030102</element>	
  | 	</receive>
  | </action>
  | 

When I try to open this template the config info elements do not get created. I've narrowed the problem down to ConfigInfoElementDomAdapter.initialize() and ActionDomAdapter.initialize()  methods which need the line addElements(configInfoElement.getConfigInfoElements()); at the end. 

Another issue is with the getTextContent() method in XmlAdapter class. There should be a null check while getting the node value (this issue also comes up when you have nested configInfoElements). So the following in XmlAdapter.java :

  | protected String getTextContent() {
  | 		StringBuffer buffer = new StringBuffer();
  | 		NodeList list = getNode().getChildNodes();
  | 		for (int i = 0; i < list.getLength(); i++) {
  | 			buffer.append(list.item(i).getNodeValue());
  | 		}
  | 		return buffer.toString().trim();
  | 	}
  | 
should be changed to:

  | protected String getTextContent() {
  | 		StringBuffer buffer = new StringBuffer();
  | 		NodeList list = getNode().getChildNodes();
  | 		for (int i = 0; i < list.getLength(); i++) {
  | 			String nodeValue = list.item(i).getNodeValue();
  | 			if (nodeValue != null)
  | 				buffer.append(nodeValue);
  | 		}
  | 		return buffer.toString().trim();
  | 	}
  | 
I'd appreciate it if someone could confirm these issues for me.
Thanks.

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

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



More information about the jboss-user mailing list