12 Replies Latest reply on May 29, 2006 8:07 AM by mohan chokkakula

    TaskAssignment works but findTaskInstances fails

    Sachin Shrotriya Newbie

      Using 3.1, DB2 8.x

      I created an assignment handler and assigned a task to the user "guest" using Assignable.setActorId("guest") method. This creates a task instance in JBPM_TASKINSTANCE with ACTORID_ as guest. This thorws following warning:

      13:15:06,068 [main] WARN StatefulPersistenceContext : Narrowing proxy to class org.jbpm.graph.node.StartState - this operation breaks ==
      13:15:06,088 [main] WARN StatefulPersistenceContext : Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==

      When jContext.getTaskMgmtSession().findTaskInstances("guest") is used to find tasks assigned, it throws following exception. I tried using swimlanes but same result.
      Before I get into more debugging:
      (1) Is there a known issue?
      (2) Am I doing something wrong?
      Thank you.
      --------------------------------------------------------------------------------------

      15:49:06,850 [main] DEBUG AbstractBatcher : select processdef0_.ID_ as ID1_4_, processdef0_.NAME_ as NAME2_4_, processdef0_.VERSION_ as VERSION3_4_, processdef0_.ISTERMINATIONIMPLICIT_ as ISTERMIN4_4_, processdef0_.STARTSTATE_ as STARTSTATE5_4_ from VTSC.JBPM_PROCESSDEFINITION processdef0_ where processdef0_.NAME_=? order by processdef0_.VERSION_ desC
      15:49:06,860 [main] DEBUG NullableType : binding 'simple' to parameter: 1
      15:49:06,871 [main] DEBUG NullableType : returning '510' as column: ID1_4_
      15:49:06,881 [main] DEBUG NullableType : returning 'simple' as column: NAME2_4_
      15:49:06,881 [main] DEBUG NullableType : returning '1' as column: VERSION3_4_
      15:49:06,881 [main] DEBUG NullableType : returning 'false' as column: ISTERMIN4_4_
      15:49:06,881 [main] DEBUG NullableType : returning '572' as column: STARTSTATE5_4_
      15:49:07,001 [main] DEBUG AbstractBatcher : select processins0_.ID_ as ID1_20_, processins0_.VERSION_ as VERSION2_20_, processins0_.START_ as START3_20_, processins0_.END_ as END4_20_, processins0_.ISSUSPENDED_ as ISSUSPEN5_20_, processins0_.PROCESSDEFINITION_ as PROCESSD6_20_, processins0_.ROOTTOKEN_ as ROOTTOKEN7_20_, processins0_.SUPERPROCESSTOKEN_ as SUPERPRO8_20_ from VTSC.JBPM_PROCESSINSTANCE processins0_ where processins0_.PROCESSDEFINITION_=? order by processins0_.START_ desc
      15:49:07,001 [main] DEBUG NullableType : binding '510' to parameter: 1
      15:49:07,001 [main] DEBUG NullableType : returning '46' as column: ID1_20_
      15:49:07,011 [main] DEBUG NullableType : returning '1' as column: VERSION2_20_
      15:49:07,011 [main] DEBUG NullableType : returning '2006-04-05 12:59:51' as column: START3_20_
      15:49:07,011 [main] DEBUG NullableType : returning null as column: END4_20_
      15:49:07,011 [main] DEBUG NullableType : returning 'false' as column: ISSUSPEN5_20_
      15:49:07,011 [main] DEBUG NullableType : returning '510' as column: PROCESSD6_20_
      15:49:07,021 [main] DEBUG NullableType : returning '46' as column: ROOTTOKEN7_20_
      15:49:07,021 [main] DEBUG NullableType : returning null as column: SUPERPRO8_20_
      15:49:07,021 [main] DEBUG NullableType : returning '45' as column: ID1_20_
      15:49:07,021 [main] DEBUG NullableType : returning '1' as column: VERSION2_20_
      15:49:07,021 [main] DEBUG NullableType : returning '2006-04-05 12:59:51' as column: START3_20_
      15:49:07,021 [main] DEBUG NullableType : returning null as column: END4_20_
      15:49:07,021 [main] DEBUG NullableType : returning 'false' as column: ISSUSPEN5_20_
      15:49:07,021 [main] DEBUG NullableType : returning '510' as column: PROCESSD6_20_
      15:49:07,021 [main] DEBUG NullableType : returning '45' as column: ROOTTOKEN7_20_
      15:49:07,021 [main] DEBUG NullableType : returning null as column: SUPERPRO8_20_
      15:49:07,061 [main] DEBUG AbstractBatcher : select instances0_.PROCESSINSTANCE_ as PROCESSI3_1_, instances0_.ID_ as ID1_1_, instances0_.NAME_ as NAME5_1_, instances0_.ID_ as ID1_23_0_, instances0_.PROCESSINSTANCE_ as PROCESSI3_23_0_, instances0_.TASKMGMTDEFINITION_ as TASKMGMT4_23_0_, instances0_.CLASS_ as CLASS2_23_0_ from VTSC.JBPM_MODULEINSTANCE instances0_ where instances0_.PROCESSINSTANCE_=?
      15:49:07,061 [main] DEBUG NullableType : binding '46' to parameter: 1
      15:49:07,061 [main] DEBUG NullableType : returning '71' as column: ID1_23_0_
      15:49:07,061 [main] DEBUG NullableType : returning 'T' as column: CLASS2_23_0_
      15:49:07,061 [main] DEBUG NullableType : returning '46' as column: PROCESSI3_23_0_
      15:49:07,071 [main] DEBUG NullableType : returning '540' as column: TASKMGMT4_23_0_
      15:49:07,071 [main] DEBUG NullableType : returning '46' as column: PROCESSI3_1_
      15:49:07,071 [main] DEBUG NullableType : returning '71' as column: ID1_1_
      15:49:07,071 [main] DEBUG NullableType : returning 'org.jbpm.taskmgmt.exe.TaskMgmtInstance' as column: NAME5_1_
      15:49:07,071 [main] DEBUG NullableType : returning '72' as column: ID1_23_0_
      15:49:07,071 [main] DEBUG NullableType : returning 'C' as column: CLASS2_23_0_
      15:49:07,071 [main] DEBUG NullableType : returning '46' as column: PROCESSI3_23_0_
      15:49:07,071 [main] DEBUG NullableType : returning '46' as column: PROCESSI3_1_
      15:49:07,081 [main] DEBUG NullableType : returning '72' as column: ID1_1_
      15:49:07,081 [main] DEBUG NullableType : returning 'org.jbpm.context.exe.ContextInstance' as column: NAME5_1_
      15:49:07,091 [main] DEBUG AbstractBatcher : select tokenvaria0_.CONTEXTINSTANCE_ as CONTEXTI3_1_, tokenvaria0_.ID_ as ID1_1_, tokenvaria0_.TOKEN_ as TOKEN2_1_, tokenvaria0_.ID_ as ID1_24_0_, tokenvaria0_.TOKEN_ as TOKEN2_24_0_, tokenvaria0_.CONTEXTINSTANCE_ as CONTEXTI3_24_0_ from VTSC.JBPM_TOKENVARIABLEMAP tokenvaria0_ where tokenvaria0_.CONTEXTINSTANCE_=?
      15:49:07,091 [main] DEBUG NullableType : binding '72' to parameter: 1
      15:49:07,101 [main] DEBUG NullableType : returning '10' as column: ID1_24_0_
      15:49:07,101 [main] DEBUG NullableType : returning '46' as column: TOKEN2_24_0_
      15:49:07,101 [main] DEBUG NullableType : returning '72' as column: CONTEXTI3_24_0_
      15:49:07,101 [main] DEBUG NullableType : returning '72' as column: CONTEXTI3_1_
      15:49:07,101 [main] DEBUG NullableType : returning '10' as column: ID1_1_
      15:49:07,101 [main] DEBUG NullableType : returning '46' as column: TOKEN2_1_
      15:49:07,101 [main] DEBUG AbstractBatcher : select token0_.ID_ as ID1_21_0_, token0_.VERSION_ as VERSION2_21_0_, token0_.NAME_ as NAME3_21_0_, token0_.START_ as START4_21_0_, token0_.END_ as END5_21_0_, token0_.NODEENTER_ as NODEENTER6_21_0_, token0_.NEXTLOGINDEX_ as NEXTLOGI7_21_0_, token0_.ISABLETOREACTIVATEPARENT_ as ISABLETO8_21_0_, token0_.ISTERMINATIONIMPLICIT_ as ISTERMIN9_21_0_, token0_.ISSUSPENDED_ as ISSUSPE10_21_0_, token0_.NODE_ as NODE11_21_0_, token0_.PROCESSINSTANCE_ as PROCESS12_21_0_, token0_.PARENT_ as PARENT13_21_0_, token0_.SUBPROCESSINSTANCE_ as SUBPROC14_21_0_ from VTSC.JBPM_TOKEN token0_ where token0_.ID_=?
      15:49:07,101 [main] DEBUG NullableType : binding '46' to parameter: 1
      15:49:07,111 [main] DEBUG NullableType : returning '2' as column: VERSION2_21_0_
      15:49:07,111 [main] DEBUG NullableType : returning null as column: NAME3_21_0_
      15:49:07,111 [main] DEBUG NullableType : returning '2006-04-05 12:59:51' as column: START4_21_0_
      15:49:07,111 [main] DEBUG NullableType : returning null as column: END5_21_0_
      15:49:07,111 [main] DEBUG NullableType : returning '2006-04-05 13:15:06' as column: NODEENTER6_21_0_
      15:49:07,111 [main] DEBUG NullableType : returning '7' as column: NEXTLOGI7_21_0_
      15:49:07,111 [main] DEBUG NullableType : returning 'true' as column: ISABLETO8_21_0_
      15:49:07,111 [main] DEBUG NullableType : returning 'false' as column: ISTERMIN9_21_0_
      15:49:07,111 [main] DEBUG NullableType : returning 'false' as column: ISSUSPE10_21_0_
      15:49:07,111 [main] DEBUG NullableType : returning '575' as column: NODE11_21_0_
      15:49:07,111 [main] DEBUG NullableType : returning '46' as column: PROCESS12_21_0_
      15:49:07,111 [main] DEBUG NullableType : returning null as column: PARENT13_21_0_
      15:49:07,121 [main] DEBUG NullableType : returning null as column: SUBPROC14_21_0_
      15:49:07,141 [main] DEBUG AbstractBatcher : select variablein0_.TOKENVARIABLEMAP_ as TOKENVAR6_1_, variablein0_.ID_ as ID1_1_, variablein0_.NAME_ as NAME3_1_, variablein0_.ID_ as ID1_25_0_, variablein0_.NAME_ as NAME3_25_0_, variablein0_.CONVERTER_ as CONVERTER4_25_0_, variablein0_.TOKEN_ as TOKEN5_25_0_, variablein0_.TOKENVARIABLEMAP_ as TOKENVAR6_25_0_, variablein0_.PROCESSINSTANCE_ as PROCESSI7_25_0_, variablein0_.BYTEARRAYVALUE_ as BYTEARRA8_25_0_, variablein0_.DATEVALUE_ as DATEVALUE9_25_0_, variablein0_.DOUBLEVALUE_ as DOUBLEV10_25_0_, variablein0_.LONGIDCLASS_ as LONGIDC11_25_0_, variablein0_.LONGVALUE_ as LONGVALUE12_25_0_, variablein0_.STRINGIDCLASS_ as STRINGI13_25_0_, variablein0_.STRINGVALUE_ as STRINGV14_25_0_, variablein0_.CLASS_ as CLASS2_25_0_ from VTSC.JBPM_VARIABLEINSTANCE variablein0_ where variablein0_.TOKENVARIABLEMAP_=?
      15:49:07,141 [main] DEBUG NullableType : binding '10' to parameter: 1
      15:49:07,141 [main] DEBUG NullableType : returning '10' as column: ID1_25_0_
      15:49:07,141 [main] DEBUG NullableType : returning 'S' as column: CLASS2_25_0_
      15:49:07,151 [main] DEBUG NullableType : returning 'SRID' as column: NAME3_org.jbpm.JbpmException: couldn't get task instances list for actor 'guest'
      at org.jbpm.db.TaskMgmtSession.findTaskInstances(TaskMgmtSession.java:63)
      at com.inovant.bpm.JbpmProcessTest.testExecuteProcessInstances(JbpmProcessTest.java:104)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at junit.framework.TestCase.runTest(TestCase.java:154)25_0_
      15:49:07,161 [main] DEBUG NullableType : returning '46' as column: TOKEN5_25_0_
      15:49:07,161 [main] DEBUG NullableType : returning '10' as column: TOKENVAR6_25_0_
      15:49:07,161 [main] DEBUG NullableType : returning '46' as column: PROCESSI7_25_0_
      15:49:07,161 [main] DEBUG NullableType : returning '1' as column: STRINGV14_25_0_
      15:49:07,161 [main] DEBUG NullableType : returning '10' as column: TOKENVAR6_1_
      15:49:07,161 [main] DEBUG NullableType : returning '10' as column: ID1_1_
      15:49:07,161 [main] DEBUG NullableType : returning 'SRID' as column: NAME3_1_
      15:49:07,161 [main] INFO JbpmManager : Process Instance for variable: SRID : with value = 1: found
      Process instance found
      15:49:07,191 [main] DEBUG AbstractBatcher : select taskinstan0_.ID_ as ID1_27_, taskinstan0_.NAME_ as NAME3_27_, taskinstan0_.DESCRIPTION_ as DESCRIPT4_27_, taskinstan0_.ACTORID_ as ACTORID5_27_, taskinstan0_.CREATE_ as CREATE6_27_, taskinstan0_.START_ as START7_27_, taskinstan0_.END_ as END8_27_, taskinstan0_.DUEDATE_ as DUEDATE9_27_, taskinstan0_.PRIORITY_ as PRIORITY10_27_, taskinstan0_.ISCANCELLED_ as ISCANCE11_27_, taskinstan0_.ISSUSPENDED_ as ISSUSPE12_27_, taskinstan0_.ISOPEN_ as ISOPEN13_27_, taskinstan0_.ISSIGNALLING_ as ISSIGNA14_27_, taskinstan0_.ISBLOCKING_ as ISBLOCKING15_27_, taskinstan0_.TASK_ as TASK16_27_, taskinstan0_.TOKEN_ as TOKEN17_27_, taskinstan0_.SWIMLANINSTANCE_ as SWIMLAN18_27_, taskinstan0_.TASKMGMTINSTANCE_ as TASKMGM19_27_ from VTSC.JBPM_TASKINSTANCE taskinstan0_ where taskinstan0_.ACTORID_=? and taskinstan0_.ISOPEN_='Y'
      15:49:07,251 [main] DEBUG NullableType : binding 'guest' to parameter: 1
      15:49:07,321 [main] WARN JDBCExceptionReporter : SQL Error: -401, SQLState: 42818
      15:49:07,321 [main] ERROR JDBCExceptionReporter : [IBM][CLI Driver][DB2/NT] SQL0401N The data types of the operands for the operation "=" are not compatible. SQLSTATE=42818

      15:49:07,321 [main] ERROR TaskMgmtSession : org.hibernate.exception.SQLGrammarException: could not execute query

      at junit.framework.TestCase.runBare(TestCase.java:127)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
      Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
      at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:65)
      at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
      at org.hibernate.loader.Loader.doList(Loader.java:2148)
      at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
      at org.hibernate.loader.Loader.list(Loader.java:2024)
      at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
      at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308)
      at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
      at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1129)
      at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
      at org.jbpm.db.TaskMgmtSession.findTaskInstances(TaskMgmtSession.java:59)
      ... 16 more
      Caused by: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] SQL0401N The data types of the operands for the operation "=" are not compatible. SQLSTATE=42818
      at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(Unknown Source)
      at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(Unknown Source)
      at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(Unknown Source)
      at COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2(Unknown Source)
      at COM.ibm.db2.jdbc.app.DB2PreparedStatement.executeQuery(Unknown Source)
      at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
      at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
      at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
      at org.hibernate.loader.Loader.doQuery(Loader.java:662)
      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
      at org.hibernate.loader.Loader.doList(Loader.java:2145)
      ... 24 more