Yep - definitely a bug. I've checked out the code now to confirm it. The code 
is casting to GenericElement via the SemanticElement interface, but our friend 
ProcessDefinition can't be cast that way as it doesn't extend  GenericElement. 
I've updated Play to show how it's blowing up. (This reflects the code pattern 
used in GenericElementXmlAdapter).

import org.jbpm.gd.common.model.GenericElement;
  | import org.jbpm.gd.common.model.SemanticElement;
  | import org.jbpm.gd.jpdl.model.ProcessDefinition;
  | 
  | 
  | public class Play {
  | 
  |     public static void main(String[] args) {
  |             
  |             ProcessDefinition pd = new ProcessDefinition();
  |             //GenericElement ge = (GenericElement)pd;
  | 
  |     
  |             SemanticElement se = (SemanticElement)pd;
  |             GenericElement ge = (GenericElement)se;
  |     }
  | }
  | 

This compiles happily and gives a runtime error...

anonymous wrote : Exception in thread "main" java.lang.ClassCastException: 
org.jbpm.gd.jpdl.model.ProcessDefinition cannot be cast to 
org.jbpm.gd.common.model.GenericElement
  |     at Play.main(Play.java:15)
  | 

Case proved I think! Now, how do I raise a bug report?!

(I'm still not clear how some of you guys did get it working. Maybe you're 
using a different version of the designer plugin in eclipse, or maybe this has 
only sneaked into the windows version somehow)?

Cheers,
Ian.


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4095736
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to