[jBPM] - Question of local human task
by Jimmy dong
Jimmy dong [https://community.jboss.org/people/jimmy.dongjia] created the discussion
"Question of local human task"
To view the discussion, visit: https://community.jboss.org/message/738266#738266
--------------------------------------------------------------
when human task start, the tables of jbpm will be created automatic, but after I start local human task, there is no table created.
and show error:
javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:76)
at org.jbpm.task.service.TaskService.<init>(TaskService.java:109)
at org.jbpm.task.service.TaskService.<init>(TaskService.java:92)
at com.sample.JbpmAPIUtil.getService(JbpmAPIUtil.java:162)
at com.sample.JbpmAPIUtil.getTaskService(JbpmAPIUtil.java:84)
at com.sample.ProcessLocalTaskTaskAPITest.main(ProcessLocalTaskTaskAPITest.java:65)
Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.doList(Loader.java:2231)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
at org.hibernate.loader.Loader.list(Loader.java:2120)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:67)
... 5 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'jbpm.Task' doesn't exist
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3609)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3541)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2002)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2293)
at com.mysql.jdbc.jdbc2.optional.PreparedStatementWrapper.executeQuery(PreparedStatementWrapper.java:846)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1808)
at org.hibernate.loader.Loader.doQuery(Loader.java:697)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
at org.hibernate.loader.Loader.doList(Loader.java:2228)
... 13 more
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/738266#738266]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 10 months
[jBPM] - Sharing variables across jbpm processes
by Richard Evans
Richard Evans [https://community.jboss.org/people/r3vans] created the discussion
"Sharing variables across jbpm processes"
To view the discussion, visit: https://community.jboss.org/message/737909#737909
--------------------------------------------------------------
Hello there.
I want to define in one place a setting that is used as input to timer events in many processes. The value will change from environment to environment so I want to localise it.
I guess that global variables should work...
I defined the setting in the timer
- Timer Delay: #{statusPollInterval}
I then tried to set the global variable.
- kSession.getGlobal.set("statusPollInterval", "2s") didn't seem to work
- kRuntime.setGlobal.set("statusPollInterval", "2s") gave me an *unexpected global* message
- The following spring config also give unexpected global.
<drools:script>
<drools:set-global identifier="statusPollInterval">
<bean class="java.lang.String">
<constructor-arg value ="2s"/>
</bean>
</drools:set-global>
</drools:script>
Q1. Is a global variable the best approach for shared settings like this?
Q2. If so, what am I doing wrong? Do I have to declare the global in a drools:resource?
I have searched previous discussions on globals but have not managed to get the answer. I am new to jbpm so would be grateful for anywone with the patience to assume little prior knowledge.
My configuration is currently all in spring config.
Many thanks,
Richard
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/737909#737909]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 10 months