Re: [jboss-user] [jBPM] - JBPM 4.3 - org.jbpm.api.JbpmException: couldn't acquire block of ids
by Stefano Campanini
Stefano Campanini [http://community.jboss.org/people/campa] replied to the discussion
"JBPM 4.3 - org.jbpm.api.JbpmException: couldn't acquire block of ids"
To view the discussion, visit: http://community.jboss.org/message/539201#539201
--------------------------------------------------------------
Hi http://community.jboss.org/people/swiderski.maciej Maciej
I'm integratig JBPM into webapp based on Spring 3.0 all thing are managed using spring. Here sono details:
Datasource is DBCP via JNDI
TransactionManager is managed by spring
Persistace is Spring and Ibatis based
HBMSession, used only for jbpm, is configured as this
<bean id="sessionFactory" >
<property name="dataSource" ref="appDataSource" />
<property name="useTransactionAwareDataSource" value="true" /> <!-- it use transaciton spring managed -->
<property name="hibernateProperties">
<value>
hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
hibernate.hbm2ddl.auto=update
hibernate.format_sql=true
hibernate.show_sql=true
</value>
</property>
<property name="mappingLocations">
<list>
<value>classpath:jbpm.execution.hbm.xml</value>
<value>classpath:jbpm.repository.hbm.xml</value>
<value>classpath:jbpm.task.hbm.xml</value>
<value>classpath:jbpm.history.hbm.xml</value>
<value>classpath:jbpm.identity.hbm.xml</value>
</list>
</property>
</bean>
JBPM Spring iontegration is done using jbpm community way:
<bean id="springJbpmHelper" name="springHelper" >
<property name="jbpmCfg" value="conf/jbpm.cfg.xml" />
</bean>
<bean id="processEngine" factory-bean="springJbpmHelper" factory-method="createProcessEngine" />
My JBPMConfiguration is here:
<jbpm-configuration>
<!-- <import resource="jbpm.default.cfg.xml" />-->
<!--
jbpm.default.cfg.xml , modified <repository-cache /> with <object
class="org.jbpm.pvm.internal.repository.RepositoryCacheImpl" />
-->
<import resource="jbpm.default.scriptmanager.xml" />
<process-engine-context>
<repository-service />
<!-- <repository-cache /> -->
<object />
<execution-service />
<history-service />
<management-service />
<identity-service />
<task-service />
<object>
<field name="commandService">
<ref object="txRequiredCommandService" />
</field>
</object>
<object init="eager" />
<types resource="jbpm.variable.types.xml" />
<address-resolver />
<mail-template name='task-notification'>
<to users="${task.assignee}" />
<subject>${task.name}</subject>
<text><![CDATA[Hi ${task.assignee}, Task "${task.name}" has been assigned to you. ${task.description}
Sent by JBoss jBPM ]]></text>
</mail-template>
<mail-template name='task-reminder'>
<to users="${task.assignee}" />
<subject>${task.name}</subject>
<text><![CDATA[Hey ${task.assignee}, Do not forget about task "${task.name}". ${task.description}
Sent by JBoss jBPM
]]></text>
</mail-template>
</process-engine-context>
<transaction-context>
<repository-session />
<db-session />
<message-session />
<timer-session />
<history-sessions>
<object />
</history-sessions>
<mail-session>
<mail-server>
<session-properties resource="jbpm.mail.properties" />
</mail-server>
</mail-session>
</transaction-context>
<!-- <import resource="jbpm.variable.types.cfg.xml" /> -->
<import resource="jbpm.jpdl.cfg.xml" />
<import resource="jbpm.tx.spring.cfg.xml" />
<import resource="jbpm.identity.cfg.xml" />
</jbpm-configuration>
The issue is present also on junit testing or using the webapp ...
Junit testing enviroment is based on AbstractJUnit4SpringContextTests .
Here some sql printed by hibernate, as you asked:
Hibernate:
select
propertyim0_.KEY_ as KEY1_6_,
propertyim0_.VERSION_ as VERSION2_6_,
propertyim0_.VALUE_ as VALUE3_6_
from
JBPM4_PROPERTY propertyim0_ limit ?
Hibernate:
select
this_.KEY_ as KEY1_6_0_,
this_.VERSION_ as VERSION2_6_0_,
this_.VALUE_ as VALUE3_6_0_
from
JBPM4_PROPERTY this_
where
this_.KEY_=?
Hibernate:
select
this_.KEY_ as KEY1_6_0_,
this_.VERSION_ as VERSION2_6_0_,
this_.VALUE_ as VALUE3_6_0_
from
JBPM4_PROPERTY this_
where
this_.KEY_=?
Hibernate:
insert
into
JBPM4_PROPERTY
(VERSION_, VALUE_, KEY_)
values
(?, ?, ?)
Hibernate:
select
this_.KEY_ as KEY1_6_0_,
this_.VERSION_ as VERSION2_6_0_,
this_.VALUE_ as VALUE3_6_0_
from
JBPM4_PROPERTY this_
where
this_.KEY_=?
Hibernate:
select
propertyim0_.KEY_ as KEY1_6_,
propertyim0_.VERSION_ as VERSION2_6_,
propertyim0_.VALUE_ as VALUE3_6_
from
JBPM4_PROPERTY propertyim0_
where
propertyim0_.KEY_='next.dbid'
Do you see something wrong ?
Thanks in advance.
Stefano
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/539201#539201]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years
Re: [jboss-user] [jBPM Development PVM] - Problem with deployment of process design
by Sukla Nag
Sukla Nag [http://community.jboss.org/people/SuklaJbpm] replied to the discussion
"Problem with deployment of process design"
To view the discussion, visit: http://community.jboss.org/message/539188#539188
--------------------------------------------------------------
Hi Huisheng
Thanks for the help you gave in mentioning the user's guide, I have now deploye the entrire jbpm4.3 which installed jboss, eclipse all in the same direvctory of jbpm.
But now when I am trying to design a process, I need a project to be created, in version 3 there was a bpmn project which I was able to create, but now there is only bpm process definition menu. When I am trying to ctreate a new bpmn process definition, it is asking for a existing project. I craeted a dynamic web project & then tried to create a process definition, I am having two problems
1. The xml file created is not accepted saying no dtd definition, I checked one sample jpdl file, mine is same, but it is showing errors
2. Now there is no depoment / creation of process archive menu in gpd. SO how do I create a process archive or deploy now ?
Also if I changr the source file, the diagram does not change.
Could you please suggest something ?
Thanks one again
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/539188#539188]
Start a new discussion in jBPM Development PVM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years