Connector e-mail

1
0
-1

Hello,

I am using version Bonita BPMN Community 6.2.2. and I am new in this. Trying to make simple process: Employee asking for permission, Managers approves/denies and employee should get e-mail notification about result. Most of the time this part (sending email, done by System) fails, no email and status is: Failed. In best case status is executing, but e-mail never arrives. Currently: SMTP Host: smtp.gmail.com Port: 465 Username: mygooglmail@gmail.com Pass: My password (checked, correct)

From: mygooglmail@gmail.com To: Variable email Subject: Test

Where is mistake? What to do to finally receive this e-mail result?

Comments

Submitted by haris.subasic on Thu, 12/11/2014 - 15:34

In a case of a problem, the best is to check the logs, and to see what is the error stack. You can also copy/paste the error here and someone will try to help you understand it. In the Studio, you will find your engine log under Help menu.

Submitted by marcy.ira on Thu, 12/11/2014 - 15:56

Hi, thank you for answer.

Last try is still in state Executing.

These are the previous one logs:

11-Dec-2014 13:49:25 org.bonitasoft.engine.log.technical.TechnicalLoggerSLF4JImpl log WARNING: Error while executing connector with id 11 org.bonitasoft.engine.core.connector.exception.SConnectorException: org.bonitasoft.engine.connector.exception.SConnectorException: java.util.concurrent.ExecutionException: org.bonitasoft.engine.connector.exception.SConnectorException: org.bonitasoft.engine.connector.exception.SConnectorValidationException: org.bonitasoft.engine.connector.ConnectorValidationException: Error validating connector org.bonitasoft.connectors.email.EmailConnector: No recipient address(es) is set (either in 'to', 'cc' or 'bcc'

at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnectorInClassloader(ConnectorServiceImpl.java:309)
at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnector(ConnectorServiceImpl.java:146)
at org.bonitasoft.engine.connector.ConnectorServiceDecorator.executeConnector(ConnectorServiceDecorator.java:117)
at org.bonitasoft.engine.execution.work.ExecuteConnectorWork.work(ExecuteConnectorWork.java:122)
at org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork.work(FailureHandlingBonitaWork.java:72)
at org.bonitasoft.engine.work.BonitaWork.run(BonitaWork.java:56)
at org.bonitasoft.engine.work.SequenceRunnableExecutor.innerRun(SequenceRunnableExecutor.java:45)
at org.bonitasoft.engine.work.BonitaRunnable.run(BonitaRunnable.java:35)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Caused by: org.bonitasoft.engine.connector.exception.SConnectorException: java.util.concurrent.ExecutionException: org.bonitasoft.engine.connector.exception.SConnectorException: org.bonitasoft.engine.connector.exception.SConnectorValidationException: org.bonitasoft.engine.connector.ConnectorValidationException: Error validating connector org.bonitasoft.connectors.email.EmailConnector: No recipient address(es) is set (either in 'to', 'cc' or 'bcc'

at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl.execute(ConnectorExecutorImpl.java:97)
at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnectorInClassloader(ConnectorServiceImpl.java:301)
... 13 more

Caused by: java.util.concurrent.ExecutionException: org.bonitasoft.engine.connector.exception.SConnectorException: org.bonitasoft.engine.connector.exception.SConnectorValidationException: org.bonitasoft.engine.connector.ConnectorValidationException: Error validating connector org.bonitasoft.connectors.email.EmailConnector: No recipient address(es) is set (either in 'to', 'cc' or 'bcc'

at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl.getValue(ConnectorExecutorImpl.java:107)
at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl.execute(ConnectorExecutorImpl.java:91)
... 14 more

Caused by: org.bonitasoft.engine.connector.exception.SConnectorException: org.bonitasoft.engine.connector.exception.SConnectorValidationException: org.bonitasoft.engine.connector.ConnectorValidationException: Error validating connector org.bonitasoft.connectors.email.EmailConnector: No recipient address(es) is set (either in 'to', 'cc' or 'bcc'

at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl$ExecuteConnectorCallable.call(ConnectorExecutorImpl.java:143)
at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl$ExecuteConnectorCallable.call(ConnectorExecutorImpl.java:124)
... 5 more

Caused by: org.bonitasoft.engine.connector.exception.SConnectorValidationException: org.bonitasoft.engine.connector.ConnectorValidationException: Error validating connector org.bonitasoft.connectors.email.EmailConnector: No recipient address(es) is set (either in 'to', 'cc' or 'bcc'

at org.bonitasoft.engine.core.connector.impl.SConnectorAdapter.validate(SConnectorAdapter.java:63)
at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl$ExecuteConnectorCallable.call(ConnectorExecutorImpl.java:139)
... 6 more

Caused by: org.bonitasoft.engine.connector.ConnectorValidationException: Error validating connector org.bonitasoft.connectors.email.EmailConnector: No recipient address(es) is set (either in 'to', 'cc' or 'bcc'

at org.bonitasoft.connectors.email.EmailConnector.validateInputParameters(EmailConnector.java:183)
at org.bonitasoft.engine.core.connector.impl.SConnectorAdapter.validate(SConnectorAdapter.java:61)
... 7 more

11-Dec-2014 13:49:25 org.bonitasoft.engine.log.technical.TechnicalLoggerSLF4JImpl log WARNING: No catch error event was defined to handle the error code '' defined in the process [name: Pool4, version: 1.0], throw event: . This throw error event will act as a Terminate Event. 11-Dec-2014 15:10:40 org.bonitasoft.forms.server.accessor.impl.XMLApplicationFormDefAccessorImpl WARNING: The node for the form Pool4--1.0$recap was not found in the forms definition file 11-Dec-2014 15:10:40 org.bonitasoft.forms.server.accessor.impl.XMLApplicationFormDefAccessorImpl WARNING: The node for the form Pool4--1.0$recap was not found in the forms definition file 11-Dec-2014 15:10:41 org.bonitasoft.forms.server.accessor.impl.XMLApplicationFormDefAccessorImpl WARNING: The node for the form Pool4--1.0$recap was not found in the forms definition file 11-Dec-2014 15:10:41 org.bonitasoft.forms.server.accessor.impl.XMLApplicationFormDefAccessorImpl WARNING: The node for the form Pool4--1.0$recap was not found in the forms definition file 11-Dec-2014 15:10:46 org.bonitasoft.forms.server.accessor.impl.XMLApplicationFormDefAccessorImpl WARNING: The node for the form Pool4--1.0$recap was not found in the forms definition file

5 answers

1
0
-1

Hi Irina,

Glad you've opened the diagrams, as for the configure button not being oeprational, I assume it works under normal (say a new process) rather than an imported one? If yes then there must be an error in the diagram somewhere. I could try it on my platform if you wanted as long a there is nothing company confidential in it and you're free to pass it on.

The new email issue is to do with SSL security and certificates.

I've done a general google search and there is much on this subject but one article that looks good is referenced here

Note though a comment I found on another post relating to the previous post:

*The only thing I want to point out here is the link to InstallCert.java in his blog is dead, but you can download it from https://code.google.com/p/java-use-examples/source/browse/trunk/src/com/aw/ad/util/InstallCert.java *

Hope this helps, regards Seán

1
0
-1

rather than make gmail less secure as someone said, why not install a simple email server on your PC to get it working without having to go to google.

I have HMailServer on the same machine which does a great job.

regards

1
0
-1

Hi,

From the error logs, it seems you not successfully captured recipient email using variable thus the log said:

  1. org.bonitasoft.connectors.email.EmailConnector: No recipient address(es) is set (either in 'to', 'cc' or 'bcc' - See more at: http://community.bonitasoft.com/answers/connector-e-mail#sthash.8kbbZXX5...

You might want to check how u get the recepient email

Hope helpful

1
0
-1

In the log, we can see: No recipient address(es) is set (either in 'to', 'cc' or 'bcc' I would say that sometimes your variable (or script) that determines the receipient of the email is empty. So, double check what you described as "Variable email" in your original post.

Comments

Submitted by sylvain.bailly on Thu, 12/11/2014 - 16:28

Try to write your recipient address manually and if it works, put your variable.

Submitted by marcy.ira on Thu, 12/11/2014 - 16:45

Hi.

I have two ways of defining and neither one is giving me result.

  1. Approved - To is defined as Script with: return BonitaUsers.getUserProfessionalContactInfo(apiAccessor, BonitaUsers.getProcessInstanceInitiator(apiAccessor, processInstanceId).getId()).getEmail();

And as result it gives status: Failed, so i guess something in that script is wrong.

  1. Not approved **- To is defined as variable called **email (Text), in execution of process i enter email, where i want it to be sent. This gives status:* Executing*, nothing in logs, but no email.
Submitted by sylvain.bailly on Fri, 12/12/2014 - 00:39

I have the same on my process and it works: return BonitaUsers.getUserProfessionalContactInfo(apiAccessor,BonitaUsers.getProcessInstanceInitiator(apiAccessor,processInstanceId).getId()).getEmail();

Do not jump a line after the return. Create a form at the begining in a new human task and put it as initial value to see what you get.

Submitted by marcy.ira on Fri, 12/12/2014 - 09:48

I did this, but it is still not working. Now process is executing, no failing, but no email either. I tried different emails

Submitted by sylvain.bailly on Fri, 12/12/2014 - 12:52

Problem fixed

Submitted by sylvain.bailly on Fri, 12/12/2014 - 12:52

Problem fixed

1
0
-1

Hi,

all your parameters are OK. I think that it is a gmail security problem. Go to your account settings and activate the option to allow the application less secure (see : http://www.hostingpics.net/viewer.php?id=574208errorMail.png)

Comments

Submitted by marcy.ira on Tue, 01/06/2015 - 10:51

I installed new version Community 6.4.0. and I have two problem. One, connector is not working again. Second, can't transfer diagrams from previous version (can't open them).

For connectors, this is log:

Jan 6, 2015 10:29:12 AM org.bonitasoft.engine.log.technical.TechnicalLoggerSLF4JImpl log FINE: THREAD_ID=300 | HOSTNAME=Ira | TENANT_ID=1 | Exception : org.bonitasoft.engine.core.connector.exception.SConnectorException: PROCESS_DEFINITION_ID=7934307358719980562 | PROCESS_NAME=Pokusaj | PROCESS_VERSION=3.0 | PROCESS_INSTANCE_ID=1012 | ROOT_PROCESS_INSTANCE_ID=1012 | FLOW_NODE_DEFINITION_ID=-8581955940093892709 | FLOW_NODE_INSTANCE_ID=20057 | FLOW_NODE_NAME=Approved | CONNECTOR_DEFINITION_IMPLEMENTATION_CLASS_NAME=saljem emial | CONNECTOR_INSTANCE_ID=20011 | org.bonitasoft.engine.connector.exception.SConnectorException: java.util.concurrent.ExecutionException: org.bonitasoft.engine.connector.exception.SConnectorException: org.bonitasoft.engine.connector.ConnectorException: javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465; nested exception is: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnectorInClassloader(ConnectorServiceImpl.java:332) at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnector(ConnectorServiceImpl.java:150) at org.bonitasoft.engine.connector.ConnectorServiceDecorator.executeConnector(ConnectorServiceDecorator.java:111) at org.bonitasoft.engine.execution.work.ExecuteConnectorWork.work(ExecuteConnectorWork.java:125) at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42) at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42) at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42) at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42) at org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork.work(FailureHandlingBonitaWork.java:70) at org.bonitasoft.engine.work.BonitaWork.run(BonitaWork.java:56) at org.bonitasoft.engine.work.SequenceRunnableExecutor.innerRun(SequenceRunnableExecutor.java:47) at org.bonitasoft.engine.work.BonitaRunnable.run(BonitaRunnable.java:35) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) Caused by: org.bonitasoft.engine.connector.exception.SConnectorException: java.util.concurrent.ExecutionException: org.bonitasoft.engine.connector.exception.SConnectorException: org.bonitasoft.engine.connector.ConnectorException: javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465; nested exception is: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl.execute(ConnectorExecutorImpl.java:119) at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnectorInClassloader(ConnectorServiceImpl.java:324) ... 14 more Caused by: java.util.concurrent.ExecutionException: org.bonitasoft.engine.connector.exception.SConnectorException: org.bonitasoft.engine.connector.ConnectorException: javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465; nested exception is: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222) at java.util.concurrent.FutureTask.get(FutureTask.java:83) at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl.getValue(ConnectorExecutorImpl.java:143) at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl.execute(ConnectorExecutorImpl.java:113) ... 15 more Caused by: org.bonitasoft.engine.connector.exception.SConnectorException: org.bonitasoft.engine.connector.ConnectorException: javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465; nested exception is: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at org.bonitasoft.engine.core.connector.impl.SConnectorAdapter.execute(SConnectorAdapter.java:72) at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl$ExecuteConnectorCallable.call(ConnectorExecutorImpl.java:188) at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl$ExecuteConnectorCallable.call(ConnectorExecutorImpl.java:170) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) ... 3 more Caused by: org.bonitasoft.engine.connector.ConnectorException: javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465; nested exception is: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at org.bonitasoft.connectors.email.EmailConnector.executeBusinessLogic(EmailConnector.java:473) at org.bonitasoft.engine.connector.AbstractConnector.execute(AbstractConnector.java:74) at org.bonitasoft.engine.core.connector.impl.SConnectorAdapter.execute(SConnectorAdapter.java:70) ... 7 more Caused by: javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465; nested exception is: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1972) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:642) at javax.mail.Service.connect(Service.java:317) at javax.mail.Service.connect(Service.java:176) at javax.mail.Service.connect(Service.java:125) at javax.mail.Transport.send0(Transport.java:194) at javax.mail.Transport.send(Transport.java:124) at org.bonitasoft.connectors.email.EmailConnector.executeBusinessLogic(EmailConnector.java:471) ... 9 more Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1747) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:241) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:235) at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1209) at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:135) at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593) at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:943) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1188) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1215) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1199) at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:548) at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:352) at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:207) at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1938) ... 16 more Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:323) at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:217) at sun.security.validator.Validator.validate(Validator.java:218) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:126) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:209) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:249) at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1188) ... 27 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:174) at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:238) at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:318) ... 33 more

Recipient mail is script: return BonitaUsers.getUserProfessionalContactInfo(apiAccessor, BonitaUsers.getProcessInstanceInitiator(apiAccessor, processInstanceId).getId()).getEmail();

Yes, I have right email in contacts and i tried to enter manually address, but didn't work. Please help.

Submitted by Sean McP on Sat, 01/10/2015 - 04:31

regarding the Failure to open diagrams, how did you move them?

If you copied the Diagram folder from 6.3.x to 6.4.x this will not work, you must

Open 6.3.x -> Open Diagram -> Diagram->Export (the diagram) (Not export as) and close 6.3.x

This will create a BAR file.

Open 6.4.x -> Diagram->Import (the diagram) point to the created BAR file from the export above.

Hope this helps,

re the Mail - can't help there sorry...

regards Seán

Submitted by marcy.ira on Sun, 01/11/2015 - 01:07

Hi Sean,

In meanwhile I managed to open diagrams (in the way that you described), but the button for Configure is not working for all imported diagrams. I am pressing it, but nothing happens. And without it I can't run process.

I still have problem with sending e-mail...

Notifications