[JBoss jBPM] - Re: Fork/Join Problem
by freak182
Hello,
I end my task like this:
wfEngine.signal(wfTask.path.id, null);
wfEngine.endTask(taskInstanceId, null);
but i already solve my problem. What happened is this:
anonymous wrote : 7.7. Combining your hibernate classes
|
| In your project, you might use hibernate for your persistence. Combining your persistent classes with the jBPM persistent classes is optional. There are two major benefits when combining your hibernate persistence with jBPM's hibernate persistence:
|
| First, session, connection and transaction management become easier. By combining jBPM and your persistence into one hibernate session factory, there is one hibernate session, one jdbc connection that handles both yours and jBPM's persistence. So automatically the jBPM updates are in the same transaction as the updates to your own domain model. This can eliminates the need for using a transaction manager.
|
| Secondly, this enable you to drop your hibernatable persistent object in to the process variables without any further hassle.
|
| The easiest way to integrate your persistent classes with the jBPM persistent classes is by creating one central hibernate.cfg.xml. You can take the jBPM src/config.files/hibernate.cfg.xml as a starting point and add references to your own hibernate mapping files in there.
I perform an update to the persistence class in my domain model before it work fine. Now my question is, do i have always perform an update or any transaction in my domain model before committing the jbpm transaction? Is there a way that i dont have to perform transaction in my domain model but still jbpm will work just fine?
Thanks a lot.
Cheers.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4233902#4233902
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4233902
15 years, 6 months
[JBoss jBPM] - Re: java activity argument problem
by nuvole
"nuvole" wrote : Hi, all~!
| I'm using jbpm4-beta2 version and jpdl java activity.
| but i don't know how java activity invoke method with Object type argument.
|
| <?xml version="1.0" encoding="UTF-8"?>
| |
| | <process name="Java" xmlns="http://jbpm.org/4.0/jpdl">
| |
| | <start g="20,20,48,48">
| | <transition name="" to="invoke java method"/>
| | </start>
| |
| | <java class="com.xener.jbpm.JohnDoe" g="96,16,127,52" method="hello" name="invoke java method" var="answer">
| |
| | <field name="state"><string value="fine"/></field>
| | <field name="session"><env type="org.hibernate.Session"/></field>
| |
| | <arg>
| | <object class="com.xener.jbpm.JohnDoeMsg">
| | <field name="msg"><string value="#{msgObject}"/></field>
| | </object>
| | </arg>
| |
| | <transition name="" to="wait"/>
| |
| | </java>
| |
| | <state g="255,16,88,52" name="wait"/>
| |
| | </process>
|
| but this error occured:
|
| | 16:38:12,187 ERROR [STDERR] org.hibernate.HibernateException: instance not of expected entity type:
| | org.jbpm.pvm.internal.type.variable.UnpersistableVariable is not a: org.jbpm.pvm.internal.type.Vari
| | ble
| | at org.hibernate.persister.entity.AbstractEntityPersister.getSubclassEntityPersister(Abstra
| | tEntityPersister.java:3663)
| | at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1374)
| | at org.hibernate.engine.ForeignKeys.isTransient(ForeignKeys.java:203)
| | at org.hibernate.event.def.AbstractSaveEventListener.getEntityState(AbstractSaveEventListen
| | r.java:535)
| | at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSave
| | rUpdateEventListener.java:103)
| | at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpd
| | teEventListener.java:93)
| | at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:534)
| | at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:526)
| | at org.hibernate.engine.CascadingAction$5.cascade(CascadingAction.java:241)
| | at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:291)
| | at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:239)
| | at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192)
| | at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:319)
| | at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:265)
| | at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:242)
| | at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192)
| | at org.hibernate.engine.Cascade.cascade(Cascade.java:153)
| | at org.hibernate.event.def.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEve
| | tListener.java:154)
| | at org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlush
| | ngEventListener.java:145)
| | at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(Abstra
| | tFlushingEventListener.java:88)
| | at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java
| | 49)
| | at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
| | at org.jbpm.pvm.internal.tx.HibernateSessionResource.prepare(HibernateSessionResource.java:
| | 4)
| | at org.jbpm.pvm.internal.tx.StandardTransaction.commit(StandardTransaction.java:106)
| | at org.jbpm.pvm.internal.tx.StandardTransaction.complete(StandardTransaction.java:65)
| | at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInter
| | eptor.java:61)
| | at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:54)
| | at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
| | at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceByKey(ExecutionServic
| | Impl.java:72)
| | at com.xener.jbpm.JavaInstantiateTest.testJavaInstantiate(JavaInstantiateTest.java:65)
| | at com.xener.jbpm.web.JBPMServlet.doGet(JBPMServlet.java:23)
| | at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
| | at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.
| | ava:290)
| | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206
| |
| | at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.
| | ava:235)
| | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206
| |
| | at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
| | at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
| | at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.j
| | va:190)
| | at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
| | at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextE
| | tablishmentValve.java:126)
| | at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEs
| | ablishmentValve.java:70)
| | at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| | at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| | at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java
| | 158)
| | at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| | at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
| | at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
| | at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.j
| | va:601)
| | at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| | at java.lang.Thread.run(Thread.java:619)
| |
|
| Thanks for any help~!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4233811#4233811
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4233811
15 years, 6 months
[JBoss jBPM] - java activity argument problem
by nuvole
Hi, all~!
I'm using jbpm4-beta2 version and jpdl java activity.
but i don't know how java activity invoke method with Object type argument.
<?xml version="1.0" encoding="UTF-8"?>
|
| <process name="Java" xmlns="http://jbpm.org/4.0/jpdl">
|
| <start g="20,20,48,48">
| <transition name="" to="invoke java method"/>
| </start>
|
| <java class="com.xener.jbpm.JohnDoe" g="96,16,127,52" method="hello" name="invoke java method" var="answer">
|
| <field name="state"><string value="fine"/></field>
| <field name="session"><env type="org.hibernate.Session"/></field>
|
| <arg>
| <object class="com.xener.jbpm.JohnDoeMsg">
| <field name="msg"><string value="#{msgObject}"/></field>
| </object>
| </arg>
|
| <transition name="" to="wait"/>
|
| </java>
|
| <state g="255,16,88,52" name="wait"/>
|
| </process>
Thanks for any help~!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4233797#4233797
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4233797
15 years, 6 months