Triggering Comm Event Creation from Email

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Triggering Comm Event Creation from Email

darrell73s
Hi fellow OFBiz'ers,

I've been looking into e-mailing in the framework, and noticed something that I hope you might be able to help me out with.

I noticed that if I attempt to use the "Email Password" feature of the eCommerce login page, I'm able to send the message (after of course configuring my mail settings), but I noticed that if I view the CommunicationEvents for the party, either through Party Manager, or by directly viewing the entity, there are no records created.

After tracing the service calls, I see that LoginEvents calls the "sendMailHiddenInLogFromScreen" service, which ultimately ends with calling the "sendMail" service. I also noticed that there are SECAs in "applications\party\servicedef\secas.xml" which will invoke "createCommEventFromEmail" when sendMail/sendMailMultiPart is invoked with a partyId, and an empty communicationEventId.

From my testing, I've concluded that I cannot get these SECA's to trigger. I've verified that the input map before the call to "sendMail", and in the call contains a partyId, and does not contain a communicationEventId. Additionally, I've tried removing the conditions on the SECA, but this does not result in "createCommEventFromEmail" being called. I've created another SECA in this file which calls a simple test service, and I've used "createPerson" in-validate as a trigger which I've verified that this works fine.

I wanted to confirm that the intended behavior is that a CommunicationEvent should be created. Also, am I missing something as to why this SECA wouldn't be called? (there's a comment below these SECA's which indicates that the scheduled job of the "sendEmailDated" process which runs every 5 minutes has replaced some SECA's, but I didn't think that applied to these)

Thanks for the help
Darrell
Reply | Threaded
Open this post in threaded view
|

Re: Triggering Comm Event Creation from Email

Sumit  Pandit
Hi Darrell,

Technically haven't noticed why it is not working. But a thought wrt functional behavior; since retrieve password email contains user password in it, therefore for security reasons, it should not be logged anywhere in system.

--
Thanks and Regards
Sumit Pandit
07503046188



----- Original Message -----
| From: "darrell73s" <[hidden email]>
| To: [hidden email]
| Sent: Friday, December 27, 2013 5:06:29 AM
| Subject: Triggering Comm Event Creation from Email
|
| Hi fellow OFBiz'ers,
|
| I've been looking into e-mailing in the framework, and noticed
| something
| that I hope you might be able to help me out with.
|
| I noticed that if I attempt to use the "Email Password" feature of
| the
| eCommerce login page, I'm able to send the message (after of course
| configuring my mail settings), but I noticed that if I view the
| CommunicationEvents for the party, either through Party Manager, or
| by
| directly viewing the entity, there are no records created.
|
| After tracing the service calls, I see that LoginEvents calls the
| "sendMailHiddenInLogFromScreen" service, which ultimately ends with
| calling
| the "sendMail" service. I also noticed that there are SECAs in
| "applications\party\servicedef\secas.xml" which will invoke
| "createCommEventFromEmail" when sendMail/sendMailMultiPart is invoked
| with a
| partyId, and an empty communicationEventId.
|
| From my testing, I've concluded that I cannot get these SECA's to
| trigger.
| I've verified that the input map before the call to "sendMail", and
| in the
| call contains a partyId, and does not contain a communicationEventId.
| Additionally, I've tried removing the conditions on the SECA, but
| this does
| not result in "createCommEventFromEmail" being called. I've created
| another
| SECA in this file which calls a simple test service, and I've used
| "createPerson" in-validate as a trigger which I've verified that this
| works
| fine.
|
| I wanted to confirm that the intended behavior is that a
| CommunicationEvent
| should be created. Also, am I missing something as to why this SECA
| wouldn't
| be called? (there's a comment below these SECA's which indicates that
| the
| scheduled job of the "sendEmailDated" process which runs every 5
| minutes has
| replaced some SECA's, but I didn't think that applied to these)
|
| Thanks for the help
| Darrell
|
|
|
| --
| View this message in context:
| http://ofbiz.135035.n4.nabble.com/Triggering-Comm-Event-Creation-from-Email-tp4646533.html
| Sent from the OFBiz - User mailing list archive at Nabble.com.
|
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you


Reply | Threaded
Open this post in threaded view
|

Re: Triggering Comm Event Creation from Email

darrell73s
Hi Sumit,

Thanks for the reply, please see my comments inline

Sumit Pandit-2 wrote
But a thought wrt functional behavior; since retrieve password email contains user password in it, therefore for security reasons, it should not be logged anywhere in system.
I agree, functionally, this makes sense to not store sensitive user credentials in the logs/database.

Sumit Pandit-2 wrote
Technically haven't noticed why it is not working.
As it turns out, the reason that "createCommEventFromEmail" it is not triggered for the "hiddenInLog" services is due to something I overlooked when initially looking into the flow. I had overlooked the fact that the "sendMailHiddenInLog" and "sendMailMultiPartHiddenInLog" services do not invoke the sendMail/sendMailMultipart services like originally thought, but instead directly call the sendMail method in EmailServices, thus not triggering the "createCommEventFromEmail" SECA which is triggered off of the sendMail/sendMailMultiPart services.

Best Regards (and Happy New Year),
Darrell