This content has been marked as final.
Show 6 replies
-
1. Re: Is mail blocking?
frinux Apr 29, 2009 12:54 AM (in response to frinux)It seems mail node is blocking, I just tried. I would like to handle when the sending of a mail fails. I saw that this node can handle exceptions, so I added one :
<mail-node name="notifier_valideur" to="#{demande.valideur.email}" template="task-assign"> <subject>#{mailSubject}</subject> <text>#{mailText}</text> <exception-handler exception-class="javax.mail.SendFailedException"> <action class="InvalidEmailAddressExceptionHandler" name="mailFailed"></action> </exception-handler> <exception-handler exception-class="com.sun.mail.smtp.SMTPAddressFailedException"> <action class="InvalidEmailAddressExceptionHandler" name="smtpFailed"></action> </exception-handler> <transition to="valider_demande"></transition> </mail-node>
Result is that I still get the exception, and workflow stops here. I even don't get inside the InvalidEmailAddressExceptionHandler class.
What's wrong? -
2. Re: Is mail blocking?
frinux May 5, 2009 11:56 AM (in response to frinux)I still have this problem. Can someone indicate how to use the exception handler? Seems I got something wrong (or a bug in jBPM ?!)
-
3. Re: Is mail blocking?
frinux May 6, 2009 5:02 AM (in response to frinux)Ok it seems my ActionHandler was wrong.
But now another problem. It seems jBPM wants to log the exception in the database, and that tjis exception is too long for mysql column :106375 [http-8080-Processor23] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: 22001 106375 [http-8080-Processor23] ERROR org.hibernate.util.JDBCExceptionReporter - Data truncation: Data too long for column 'EXCEPTION_' at row 1 01:54:05,734 ERROR WSCreerDemande:137 - error when processing creerDemande : org.jbpm.graph.def.DelegationException: could not insert: [org.jbpm.graph.log.ActionLog] org.jbpm.graph.def.DelegationException: could not insert: [org.jbpm.graph.log.ActionLog]
-
4. Re: Is mail blocking?
kukeltje May 6, 2009 7:26 AM (in response to frinux)Ok it seems my ActionHandler was wrong.
Would be nice (for others to learn if they encounter the same issue) to report what was wrongBut now another problem. It seems jBPM wants to log the exception in the database, and that tjis exception is too long for mysql column :
106375 [http-8080-Processor23] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: 22001 106375 [http-8080-Processor23] ERROR org.hibernate.util.JDBCExceptionReporter - Data truncation: Data too long for column 'EXCEPTION_' at row 1 01:54:05,734 ERROR WSCreerDemande:137 - error when processing creerDemande : org.jbpm.graph.def.DelegationException: could not insert: [org.jbpm.graph.log.ActionLog] org.jbpm.graph.def.DelegationException: could not insert: [org.jbpm.graph.log.ActionLog]
Oracle right?
Two things:
- Post more info on your environment (db, jbpm version etc) and search the forum/wiki first
- New issues belong in new topics -
5. Re: Is mail blocking?
kukeltje May 6, 2009 7:27 AM (in response to frinux)Sorry, MySQL I see it now... hmm... still it belongs in a new topic... ;-)
-
6. Re: Is mail blocking?
frinux May 6, 2009 9:55 AM (in response to frinux)You're right.
First, my ActionHandler was a simple class, which did not implement the ActionHandler interface. That was the problem
Here is a simple one:import org.jbpm.graph.def.ActionHandler; import org.jbpm.graph.exe.ExecutionContext; public class InvalidEmailAddressExceptionHandler implements ActionHandler { private static final long serialVersionUID = 1L; public void execute(ExecutionContext executionContext) { System.out.println("wrong email"); //FIXME crash when insertion of log into database } }
Now, the other issue has been posted in a new topic : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4229030#4229030