6 Replies Latest reply on Jun 13, 2006 6:05 AM by kukeltje

    resume() and suspend() failing in JBPM 3.1

    romin.irani

      The resume() and suspend() methods on the ProcessInstance are failing in jBPM 3.1. The error is a SQL Syntax error "unknown column 'token'". On debugging, I have found the following named queries in the org/jbpm/db/hibernate.queries.hbm.xml as given below:

      <query name="MessagingSession.suspendMessagesForToken">
       <![CDATA[
       update org.jbpm.msg.Message
       set isSuspended = true
       where token = :token
       ]]>
       </query>
      
       <query name="MessagingSession.resumeMessagesForToken">
       <![CDATA[
       update org.jbpm.msg.Message
       set isSuspended = false
       where token = :token
       ]]>
       </query>
      
      On changing them to the following
      
      <query name="MessagingSession.suspendMessagesForToken">
       <![CDATA[
       update org.jbpm.msg.Message m
       set m.isSuspended = true
       where m.token = :token
       ]]>
       </query>
      
       <query name="MessagingSession.resumeMessagesForToken">
       <![CDATA[
       update org.jbpm.msg.Message m
       set m.isSuspended = false
       where m.token = :token
       ]]>
       </query>


      and replacing the file in JBPM JAR file, it worked. Note : I added the alias 'm'. Can someone confirm if I have indeed presented the fix or am I missing something here?