4 Replies Latest reply on Jan 14, 2009 6:41 AM by Ronald van Kuijk

    TaskNode override

    Sergey Sachkov Newbie

      I need to override TaskNode with my custome Node to add type attribute to it.
      I read on the forum that for this I need update jbpm.cfg.xml with

      <string name="resource.node.types" value="com/jbpm/node/node.types.xml" />

      I've moved node.types.xml to the location above and updated task node value
      <node-type element="task-node" class="com.jbpm.node.MyNode" />

      I've created MyNode.java and override execute() method, created MyNode.hbm.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE hibernate-mapping PUBLIC
       "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
      <hibernate-mapping default-access="field">
       <subclass name="com.jbpm.node.MyNode"
       discriminator-value="M" extends="org.jbpm.graph.node.TaskNode">
       <property name="type" column="TYPE_" />

      and updated hibernate.cfg.xml with MyNode.hbm.xml
      Adn deployed the application. But when running I'm still having TaskNode returned to me and not MyNode.
      Will the described above solution work or I need to change jbpm source to add type attribute?
      Thank you.