ProcessDefinition pd = context.getGraphSession().findLatestProcessDefinition("hello");
每次都是这里错误hibernate.cfg.xml
<?xml version='1.0' encoding='utf-8'?><!DOCTYPE hibernate-configuration PUBLIC
          "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
          "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"><hibernate-configuration>
  <session-factory>    <!-- jdbc connection properties -->
    <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property> 
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> 
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpm</property> 
<property name="hibernate.connection.username">root</property> 
<property name="hibernate.connection.password"></property>    <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
        
    <!-- other hibernate properties 
    <property name="hibernate.show_sql">true</property>
    <property name="hibernate.format_sql">true</property>
    <property name="hibernate.use_sql_comments">true</property>
    -->    <!-- ############################################ -->
    <!-- # mapping files with external dependencies # -->
    <!-- ############################################ -->    <!-- following mapping file has a dependendy on   -->
    <!-- 'bsh-{version}.jar'.                         -->
    <!-- uncomment this if you don't have bsh on your -->
    <!-- classpath.  you won't be able to use the     -->
    <!-- script element in process definition files   -->
    <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>    <!-- following mapping files have a dependendy on  -->
    <!-- 'jbpm-identity-{version}.jar', mapping files  -->
    <!-- of the pluggable jbpm identity component.     -->
    <!-- comment out the following 3 lines if you don't-->
    <!-- want to use the default jBPM identity mgmgt   -->
    <!-- component                                     -->
    <mapping resource="org/jbpm/identity/User.hbm.xml"/>
    <mapping resource="org/jbpm/identity/Group.hbm.xml"/>
    <mapping resource="org/jbpm/identity/Membership.hbm.xml"/>    <!-- ###################### -->
    <!-- # jbpm mapping files # -->
    <!-- ###################### -->    <!-- hql queries and type defs -->
    <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" />
    
    <!-- graph.def mapping files -->
    <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
    <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
    <mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/>
    <mapping resource="org/jbpm/graph/def/Event.hbm.xml"/>
    <mapping resource="org/jbpm/graph/def/Action.hbm.xml"/>
    <mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/>
    <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
    <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>    <!-- graph.node mapping files -->
    ...... 略
  </session-factory>
</hibernate-configuration>processdefinition.xml
<?xml version="1.0" encoding="UTF-8"?><process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="hello">
<start-state name="start">
<task>
<controller>
<variable name="name"></variable>
<variable name="day"></variable>
<variable name="note"></variable>
</controller>
</task>
      <transition name="to_confirm" to="confirm">
       <action name="requestAction" class="com.ts.jbpm.hello.actions.RequestAction">
       <reason>我要请假</reason>
       </action>
      </transition>
</start-state>

<state name="confirm">
<transition name="to_end" to="end">
</transition>
</state>

<end-state name="end"></end-state>
</process-definition>数据库也都部署好了
jbpm_processdefinition
--------------------------------------------------------------------------------
|ID_   |   NAME_   |   VERSION_  |   ISTERMINATIONIMPLICIT_  |   STARTSTATE_   |
--------------------------------------------------------------------------------
| 1    |   hello   |   1         |   (Binary/Image)          |   1             |
--------------------------------------------------------------------------------