[jBPM] New message: "Re: Exception handling in JBPM4"
by Martin Porter
User development,
A new message was posted in the thread "Exception handling in JBPM4":
http://community.jboss.org/message/524154#524154
Author : Martin Porter
Profile : http://community.jboss.org/people/jedizippy
Message:
--------------------------------------------------------------
You can store the result in the process execution using execution.setVariable(). Your custom class would implement the ExternalActivityBehaviour and hence inside the execute() method you do your processing and at the end you call execution.takeXXXXX() with the name of the transition. Alternatively you can store a variable in the process execution and then have a decision handler implementing DecisionHandler in which you can check its value and return the transition from the decide() method.
Regards
Martin
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524154#524154
16 years, 2 months
[jBPM] New message: "Re: Exception handling in JBPM4"
by Flavio N.
User development,
A new message was posted in the thread "Exception handling in JBPM4":
http://community.jboss.org/message/524153#524153
Author : Flavio N.
Profile : http://community.jboss.org/people/VegaMilano
Message:
--------------------------------------------------------------
> use <custom> instead of <java>
custom seems to do not support "var" argument, so where can I put the result value of the Java method?
> you have access to the process Exection context and you can then use the execution.take(transition-name) to define which transition should be taken on the error case
>
Conceptually I understand, but probably I am still not familiar with JBPM:
where exactly execution.take(transition-name) takes place? Is it Java code or what? If it should be placed in the Java method I call, it assumes I have to modify Java methods to handle errors in JBPM???
I supposed there was some code to put in jpdl.xml to perform this. If you can modify the simple code I posted to show me what you're talking about it could be great.
Thanks
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524153#524153
16 years, 2 months
[jBPM] New message: "Re: jBPM 4.3 - Which JTA config to use for non-JBoss platform."
by Martin Porter
User development,
A new message was posted in the thread "jBPM 4.3 - Which JTA config to use for non-JBoss platform.":
http://community.jboss.org/message/524151#524151
Author : Martin Porter
Profile : http://community.jboss.org/people/jedizippy
Message:
--------------------------------------------------------------
Hi Juan,
I agree the JtaTransaction class should be getting those values from the hibernate config xml file. I may take a shot at implementing a new version of JtaTransaction which implements the Command<T> to try and get those from hibernate but to be honest as this needs to be done for all non JBoss servers the changes should really be made in the trunk code as otherwise everyone using Jta will have to implement this !. As JTA is pretty much bread and butter in a real world production environment I wonder how many people are really running on non-JBoss platforms !.
I have voted for the JIRA anyway.
Thanks for the tip.
I notice you are running on DB2 with 4.3. Did you see any issues with ID generation and integrity constraints as with sub-processes on DB2 as well as Oracle is has been seen in JTA environments. We seem to have solved it by implementing our own generation. Would be interested to know if you are using sub-processes and if you have come across this !.
Regards
Martin
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524151#524151
16 years, 2 months
[jBPM] New message: "Re: Exception handling in JBPM4"
by Martin Porter
User development,
A new message was posted in the thread "Exception handling in JBPM4":
http://community.jboss.org/message/524147#524147
Author : Martin Porter
Profile : http://community.jboss.org/people/jedizippy
Message:
--------------------------------------------------------------
Well the simple option is to use <custom> instead of <java> and then you have access to the process Exection context and you can then use the execution.take(transition-name) to define which transition should be taken on the error case and not throw it back to the BPM engine. We wrap this in a subprocess so the subprocess implements the business service (java code) and handles the error/retry/timeout and then the return from the subprocess defines which transition is taken in the parent process.
I am sure there are plenty of other ways however but this is working for us.
Regards
Martin
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524147#524147
16 years, 2 months
[jBPM] New message: "Re: Exception handling in JBPM4"
by Flavio N.
User development,
A new message was posted in the thread "Exception handling in JBPM4":
http://community.jboss.org/message/524145#524145
Author : Flavio N.
Profile : http://community.jboss.org/people/VegaMilano
Message:
--------------------------------------------------------------
This is my first exeperience in JBPM 4 and I can't believe it does not have a way to handle Exceptions in Java, especially if it was in JBPM 3.
Consider a very simple example:
http://community.jboss.org/servlet/JiveServlet/showImage/1985/jbpm.png
corresponding to code:
<?xml version="1.0" encoding="UTF-8"?>
<process name="MyProcess" xmlns="http://jbpm.org/4.3/jpdl">
<start g="122,135,48,48" name="startBlock">
<transition g="-55,-18" name="execute method" to="Call Java Method" />
</start>
<java name="Call Java Method" class="org.jbpm.helloworld.MyClass" continue="sync"
g="291,136,112,52" method="doSomething">
<transition name="terminate process" to="endBlock" g="-42,-18" />
</java>
<end g="519,136,48,48" name="endBlock" />
</process>
If my Java method throws an Exeception, HOW CAN IT BE HANDLED IN JBPM 4? Obviously I don't want to wrap each class to make a try-catch, so I suppose there is a way to define exception handler and redirect execution to a specified transition or something.
A sample code will be appreciate.
Thanks in advance
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524145#524145
16 years, 2 months
[EJB 3.0] New message: "DB Connection NON restore"
by Massimo Amato
User development,
A new message was posted in the thread "DB Connection NON restore":
http://community.jboss.org/message/524130#524130
Author : Massimo Amato
Profile : http://community.jboss.org/people/mamato
Message:
--------------------------------------------------------------
Hi,
I've an EJB3 application running on JBOSS 5.1
A thread, every second, looks uf for my stateless session bean and invokes a method
This method executes a query...
If, when the system is up an running, the DB crashes and goes up again, my application seems to be unable to restore the connection.
Is it normal ?
Any idea ?
2010-02-03 23:22:09,291 ERROR [it.mamato.ce.ejb.send.SenderTask] (Thread-1779) Exception javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not execute query
2010-02-03 23:22:10,291 WARN [org.hibernate.util.JDBCExceptionReporter] (Thread-1779) SQL Error: 0, SQLState: null
2010-02-03 23:22:10,291 ERROR [org.hibernate.util.JDBCExceptionReporter] (Thread-1779) La connessione è chiusa.
2010-02-03 23:22:10,291 ERROR [org.hibernate.ejb.AbstractEntityManagerImpl] (Thread-1779) Unable to mark for rollback on PersistenceException:
java.lang.IllegalStateException: [com.arjuna.ats.internal.jta.transaction.arjunacore.nosuchtx] [com.arjuna.ats.internal.jta.transaction.arjunacore.nosuchtx] No such transaction!
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.setRollbackOnly(BaseTransaction.java:191)
at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.setRollbackOnly(BaseTransactionManagerDelegate.java:123)
at org.hibernate.ejb.AbstractEntityManagerImpl.markAsRollback(AbstractEntityManagerImpl.java:421)
at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:576)
at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:76)
....
Thanks
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524130#524130
16 years, 2 months
[JBoss Portal] New message: "How to clear portlet cache?"
by bharath sadanagiri
User development,
A new message was posted in the thread "How to clear portlet cache?":
http://community.jboss.org/message/524127#524127
Author : bharath sadanagiri
Profile : http://community.jboss.org/people/jayabharath
Message:
--------------------------------------------------------------
*Hi,*
*In my jboss portal I have different Tabs like Home,Reports and apps.*
*Step 1:I clicked on Home tab first, all the portlets in Home tab got loaded and did some operations in all the portlets. So resultant portlets displayed in the Home page.*
*Step 2:After that I moved to reports tab and did some operations on all the report portlets. So resultant portlets displayed in the Reports page.*
*Step 3:I navigated between all the tabs but the last resultant portlets are still getting displayed.*
*
So my question is: Is there any configuaration like Expiration-Cache tag to display the default pages when the tab is clicked?
Thanks,
Bharath
*
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524127#524127
16 years, 2 months