1 Reply Latest reply on Nov 23, 2005 9:56 AM by Ronald van Kuijk

    Unable to retrieve PROCESSDEFINITION from database

    Michael Holtzman Newbie

      I am developing a standalone java application using jbpm, and I am having a problem retrieving a process definition from the database (Oracle).

      When I execute this code

      JbpmSession jbpmSession = Manager.jbpmSessionFactory.openJbpmSession();
      
       System.out.println("TestDef: Getting process definition");
       ProcessDefinition processDefinition =
       jbpmSession.getGraphSession().findLatestProcessDefinition("Example Process");
       System.out.println("TestDef: Retrieved process definition '" + processDefinition.getName() + "'");
      
       jbpmSession.close();
      


      it never returns from the findLatestProcessDefinition method.

      Here is the debug log ...

      ===> Received command: WORKFLOW_JBPM_LAUNCH_PROCESS
      09:27:57,476 DEBUG ? : opened session at timestamp: 4639768893341696
      TestDef: Getting process definition
      09:27:57,476 DEBUG ? : iterate: select pd from org.jbpm.graph.def.ProcessDefinition as pd where pd.name = :name order by
       pd.version desc
      09:27:57,476 DEBUG ? : named parameters: {name=Example Process}
      09:27:57,476 DEBUG ? : parse() - HQL: select pd from org.jbpm.graph.def.ProcessDefinition as pd where pd.name = :name or
      der by pd.version desc
      09:27:57,492 DEBUG ? : --- HQL AST ---
       \-[QUERY] 'query'
       +-[SELECT_FROM] 'SELECT_FROM'
       | +-[FROM] 'from'
       | | \-[RANGE] 'RANGE'
       | | +-[DOT] '.'
       | | | +-[DOT] '.'
       | | | | +-[DOT] '.'
       | | | | | +-[DOT] '.'
       | | | | | | +-[IDENT] 'org'
       | | | | | | \-[IDENT] 'jbpm'
       | | | | | \-[IDENT] 'graph'
       | | | | \-[IDENT] 'def'
       | | | \-[IDENT] 'ProcessDefinition'
       | | \-[ALIAS] 'pd'
       | \-[SELECT] 'select'
       | \-[IDENT] 'pd'
       +-[WHERE] 'where'
       | \-[EQ] '='
       | +-[DOT] '.'
       | | +-[IDENT] 'pd'
       | | \-[IDENT] 'name'
       | \-[COLON] ':'
       | \-[IDENT] 'name'
       \-[ORDER] 'order'
       +-[DOT] '.'
       | +-[IDENT] 'pd'
       | \-[IDENT] 'version'
       \-[DESCENDING] 'desc'
      
      09:27:57,492 DEBUG ? : throwQueryException() : no errors
      09:27:57,492 DEBUG ? : select << begin [level=1, statement=select]
      09:27:57,492 DEBUG ? : FromClause{level=1} : org.jbpm.graph.def.ProcessDefinition (pd) -> processdef0_
      09:27:57,492 DEBUG ? : Resolved : pd -> processdef0_.ID_
      09:27:57,492 DEBUG ? : Resolved : pd -> processdef0_.ID_
      09:27:57,492 DEBUG ? : getDataType() : name -> org.hibernate.type.StringType@12549c4
      09:27:57,492 DEBUG ? : Resolved : pd.name -> processdef0_.NAME_
      


      The Oracle database test ran without errors, and the process definition is clearly in the database. Any suggestions (PLEASE!). I am evaluationg JBPM for a major project here, and I need to show it is a viable solution.

      Thanx.