[jbpm-users] [JBoss jBPM] - Inheriting from ProcessDefinition

pjacobsen do-not-reply at jboss.com
Wed Aug 20 14:50:22 EDT 2008


To add some additional fields to my process definitions, I've subclassed the jBPM ProcessDefinition object with my own.

	<subclass name="com.xxx.XXXProcessDefinition"
  | 		extends="org.jbpm.graph.def.ProcessDefinition"
  | 		discriminator-value="S">
  | 		<property name="definitionName" type="string" column="SDS_NAME" />
  | ....

However, I'm unsure of what would be the best way to create a my new process definition subclass.  The archive parsers and process definiton itself all seem to use the static function on the ProcessDefintion: ProcessDefinition.createNewProcessDefinition(); which doesn't allow me to create my subclass while reusing the code to wire up the default module and such.

Has anyone done this in a manner that wouldn't be likely to break on new releases of jBPM (i.e. I don't think it's a good idea to make my own function to create a definition or attempt to clone my subclass from the ProcessDefinition) as it would seem somewhat brittle should modules go away... or something else be added.

Thanks!
Paul

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

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



More information about the jbpm-users mailing list