[jBPM] - jBPM 4.3 starting a sub-process after a state node will fail
by Tun Mang
Tun Mang [http://community.jboss.org/people/tunmang] created the discussion
"jBPM 4.3 starting a sub-process after a state node will fail"
To view the discussion, visit: http://community.jboss.org/message/534791#534791
--------------------------------------------------------------
Hi :
I got a db constrain failure when call executionService.signalExecutionById(executionId) for the "check_id" state node as shown below.
================================
<?xml version="1.0" encoding="UTF-8"?>
<process name="SubDocument" xmlns=" http://jbpm.org/4.3/jpdl http://jbpm.org/4.3/jpdl">
<start g="36,109,48,48">
<transition to="check_id" >
<event-listener>
<field name="msg"><string value="(start) go to state (check_id)."/></field>
</event-listener>
</transition>
</start>
<state name="check_id" g="256,106,88,52" >
<transition to="review" g="167,200:7,3">
<event-listener>
<field name="msg"><string value="(check_id) go to (sub-process)."/></field>
</event-listener>
</transition>
</state>
<sub-process name="review" sub-process-key="SubProcTasks" g="118,106,99,52">
<transition to="ok" g="167,67:6,-19">
<event-listener>
<field name="msg"><string value="(sub-process) go to parent (ok)."/></field>
</event-listener>
</transition>
</sub-process>
<state name="ok" g="255,41,88,52">
<transition to="end" g="167,67:6,-19">
<event-listener>
<field name="msg"><string value="(parent-process) go to (end)."/></field>
</event-listener>
</transition>
</state>
<end name="end" g="254,19,88,52" >
<on event="start">
<event-listener>
<field name="msg"><string value="(parent-process) entered (end) node."/></field>
</event-listener>
</on>
</end>
</process>
======================
The exception is listed below:
16:38:55,249 WRN | [JDBCExceptionReporter] SQL Error: 1452, SQLState: 23000
16:38:55,249 SEV | [JDBCExceptionReporter] Cannot add or update a child row:
a foreign key constraint fails (`jbpm_4_3/jbpm4_execution`, CONSTRAINT `FK_EXEC_SUBPI` FOREIGN KEY (`SUBPROCINST_`) REFERENCES `jbpm4_execution` (`DBID_`))
### EXCEPTION ###########################################
16:38:55,249 SEV | [AbstractFlushingEventListener] Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException: could not update: [org.jbpm.pvm.internal.model.ExecutionImpl#240001]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2425)
at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2307)
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2607)
at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:92)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.jbpm.pvm.internal.id.AcquireDbidBlockCmd.execute(AcquireDbidBlockCmd.java:35)
at org.jbpm.pvm.internal.id.AcquireDbidBlockCmd.execute(AcquireDbidBlockCmd.java:10)
at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
....
===============================
But if I remove the "check_id" state node and make the start node's transition directly go to the sub-process, everything goes fine.
Can someone help me about this one? Thanks a lot in advance.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/534791#534791]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 8 months
[jBPM] - jBPM 4.3 Spring bean as event listener
by Peter Swartwout
Peter Swartwout [http://community.jboss.org/people/spincycle] created the discussion
"jBPM 4.3 Spring bean as event listener"
To view the discussion, visit: http://community.jboss.org/message/534774#534774
--------------------------------------------------------------
I have followed the recommendations in the developer's guide for doing Spring integration with jBPM 4.3. My application deploys to JBoss 5, and the server starts cleanly.
Here's my issue: I want my processes to be able to use Spring beans for event listeners. The relevant process code is:
> <process name="speechrec" ...>
> <on event="start">
> <event-listener expr="#{processListener}" >
> <field name="eventType">
> <string value="start"/>
> </field>
> </event-listener>
> </on>
The bean id "processListener" is defined in my Spring config, and the expression #{processListener} is evaluated to the correct class name, but the class is instantiated by jBPM instead of Spring. So the bean's Spring properties are not injected, so of course I get NPE's whenever they are used. I was hoping the "expr" attribute would behave like Spring's "ref" attribute and make use of an existing bean if there is one.
Is there any way to get what I want? Does it mean that only jBPM beans can be used as event listeners?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/534774#534774]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 8 months
[JBoss Portal] - Issue with Subscription mode "E-Mail validation and admin approval"
by nikodc
nikodc [http://community.jboss.org/people/nikodc] created the discussion
"Issue with Subscription mode "E-Mail validation and admin approval""
To view the discussion, visit: http://community.jboss.org/message/534752#534752
--------------------------------------------------------------
Hi. I'm testing JBoss Portal in order to check whether it's suitable for a project we are planning to do.
I'm having a problem trying to configure the user registration with subscription mode "E-Mail validation and admin approval". The jBPM workflow was apparently stucked (in fact it was pending) and I couldn't found an easy way to check why. After a couple of minutes of testing I found my email account was incorrectly configured and that explained why there was an error about this in the server's log. Instead of reconfiguring the server I directly browsed to the email verification URL (someone posted in a blog what the format of that URL was) and a page showing the validation success message came along. After that, I logged in as a portal admin and browsed to the User Management section... then I clicked the "Show pending registrations" link but unfortunately the list was empty. I tryied to find out for a couple of hours why this happened but I was unable to discover a solution. Any ideas?
Info: JBoss Portal 2.7.2 bundled with JBoss AS 4.2.3, Ubuntu Desktop 9.04, Java SE 1.6.0_18-b07
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/534752#534752]
Start a new discussion in JBoss Portal at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 8 months