[JBoss jBPM] - Re: About integrating JBPM in an existing EAR
by shekharv
Actually,
I will get the code sample going today or so, but just so that you are not held up, here's how you would do it.
You initialize the Jbpmconfiguration object,
| //Setup the SessionFactory, this would be in your control.
| //I am using the HibernateUtil approach, that is pretty well documented
| //on the Hibernate site.
| SessionFactory sessionFactory = HibernateUtil.getSessionFactory();
| JbpmConfiguration configuration = new JbpmConfiguration();
|
| //Substitute this with however you want to get a handle to the config
| //file.
| String jbpmConfigResource = "your_app.jbpm.cfg.xml";
| if (jbpmCfgResource != null) {
| configuration.setResource(jbpmTestCfgResource);
| configuration.setSessionFactory(sessionFactory);
| }
|
Once you do the above, you should have the code going such that Hibernate uses your sessionFactory to interact with the database.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4244760#4244760
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4244760
16 years, 8 months
[JBoss jBPM] - Help with massive architectural problem: old jbpm processes
by donorschoose
So as I understand it, running jBPM 3.1 processes cannot be migrated to new process definitions. This has, ironically, created a situation in which jBPM has become the single component in our architecture which prevents the evolution of the workflow process definitions. Allow me to elaborate.
Note: I joined DonorsChoose after this architectural problem was baked into the code, so I'm searching for a way around/out of it now.
DonorsChoose.org is a non-profit dedicated to funding projects and proposals created by teachers and funded by donations from the public. A given proposal is instantiated as a jBPM process instance.
When DonorsChoose.org first chose jBPM, the idea was that using a workflow library would make it much easier to modify the workflow process definitions as the needs of the organization changed. In practice, however, it has made it far more difficult to evolve the workflow process definitons. In particular, we have frequently had the need to add a new transition or modify the process definition because of a change in the business process environment. However, even when we make a change to the process definition that doesn't delete any existing tokens, etc., old process instances still run using the old version of the definition. However, our processes often live for months or longer, and the whole point of changing the process is so we can update all the existing proposals in place.
Given this, it has made it extremely difficult to modify the jBPM process definitions at all, and in fact what we've resorted to doing is hacking around this as touching the jBPM process definitions is unworkable for our application. It seems in retrospect we would have been much better off manually coding our workflows rather than trying to use jBPM.
What I'm posting about is --- is there some way to deal with this situation? Is there a way to hack jBPM so we can do things like add transitions or other nondestructive modifications to process definitions which would apply to running instances?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4244756#4244756
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4244756
16 years, 8 months
[JBoss jBPM] - Re: exception in the last node of the process
by daviddev
Hi,
this is what I get after turning on the jbpm debugging mode.
| 2009-07-20 17:31:11,779 DEBUG [org.jbpm.db.JobSession] deleting timers for process instance org.jbpm.graph.exe.ProcessInstance@df9e70
| 2009-07-20 17:31:11,779 WARN [com.arjuna.ats.arjuna.logging.arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_2] TwoPhaseCoordinator.beforeCompletion - failed for com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple@30ab27
| org.hibernate.QueryParameterException: could not locate named parameter [processInstance]
| at org.hibernate.engine.query.ParameterMetadata.getNamedParameterDescriptor(ParameterMetadata.java:75)
| at org.hibernate.engine.query.ParameterMetadata.getNamedParameterExpectedType(ParameterMetadata.java:81)
| at org.hibernate.impl.AbstractQueryImpl.determineType(AbstractQueryImpl.java:413)
| at org.hibernate.impl.AbstractQueryImpl.setParameter(AbstractQueryImpl.java:383)
| at org.jbpm.db.JobSession$DeleteJobsSynchronization.beforeCompletion(JobSession.java:191)
| at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:114)
| at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:247)
| at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:86)
| at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
| at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1389)
| at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
| at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
| at org.jboss.resource.adapter.jms.inflow.JmsServerSession$XATransactionDemarcationStrategy.end(JmsServerSession.java:494)
| at org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:248)
| at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
| at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
| at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:756)
| at java.lang.Thread.run(Unknown Source)
| 2009-07-20 17:31:11,794 WARN [org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler] Message redelivered=2 max=1 sending it to the dlq org.jboss.mq.SpyObjectMessage {
| Header {
| jmsDestination : QUEUE.CardLifeCycleManagerInMsg
| jmsDeliveryMode : 2
| jmsExpiration : 0
| jmsPriority : 4
| jmsMessageID : ID:17-12481074673264
| jmsTimeStamp : 1248107467326
| jmsCorrelationID: null
| jmsReplyTo : null
| jmsType : null
| jmsRedelivered : true
| jmsProperties : {JMSXDeliveryCount=3, JMS_JBOSS_REDELIVERY_LIMIT=1, JMS_JBOSS_REDELIVERY_COUNT=2}
| jmsPropReadWrite: false
| msgReadOnly : true
| producerClientId: ID:17
| }
| }
| 2009-07-20 17:31:11,794 ERROR [org.jboss.resource.adapter.jms.inflow.JmsServerSession] org.jboss.resource.adapter.jms.inflow.JmsServerSession@1ce3ae9 failed to commit/rollback
| javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state
| at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1401)
| at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
| at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
| at org.jboss.resource.adapter.jms.inflow.JmsServerSession$XATransactionDemarcationStrategy.end(JmsServerSession.java:494)
| at org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:248)
| at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
| at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
| at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:756)
| at java.lang.Thread.run(Unknown Source)
| Caused by: org.hibernate.QueryParameterException: could not locate named parameter [processInstance]
| at org.hibernate.engine.query.ParameterMetadata.getNamedParameterDescriptor(ParameterMetadata.java:75)
| at org.hibernate.engine.query.ParameterMetadata.getNamedParameterExpectedType(ParameterMetadata.java:81)
| at org.hibernate.impl.AbstractQueryImpl.determineType(AbstractQueryImpl.java:413)
| at org.hibernate.impl.AbstractQueryImpl.setParameter(AbstractQueryImpl.java:383)
| at org.jbpm.db.JobSession$DeleteJobsSynchronization.beforeCompletion(JobSession.java:191)
| at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:114)
| at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:247)
| at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:86)
| at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
| at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1389)
| ... 8 more
| 2009-07-20 17:31:48,574 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] Periodic recovery - first pass <Mon, 20 Jul 2009 17:31:48>
| 2009-07-20 17:31:48,574 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] StatusModule: first pass
| 2009-07-20 17:31:48,574 DEBUG [com.arjuna.ats.txoj.logging.txojLoggerI18N] [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_3] - TORecoveryModule - first pass
| 2009-07-20 17:31:48,574 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.recovery.info.firstpass] Local XARecoveryModule - first pass
| 2009-07-20 17:31:58,574 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] Periodic recovery - second pass <Mon, 20 Jul 2009 17:31:58>
| 2009-07-20 17:31:58,574 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] AtomicActionRecoveryModule: Second pass
| 2009-07-20 17:31:58,574 DEBUG [com.arjuna.ats.txoj.logging.txojLoggerI18N] [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_6] - TORecoveryModule - second pass
| 2009-07-20 17:31:58,574 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.recovery.info.secondpass] Local XARecoveryModule - second pass
|
does this help you?
thanks
DSE
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4244723#4244723
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4244723
16 years, 8 months