Login  Register

Re: Users - sendMailToRoles

Posted by Andrew Sykes on May 01, 2006; 10:44am
URL: http://ofbiz.116.s1.nabble.com/Users-sendMailToRoles-tp138731p138738.html

Charles,

The definition for storeEmailAsCommunication is:

Service Name: storeEmailAsCommunication
Description: Store email as a communication event with the status
COM_COMPLETE. The communication event will be from the party of the
userLogin to the party of the partyId parameter. It is meant to run a
SECA after a sendMail to record outgoing emails.
Exportable: False

The important point to notice is "It is meant to run a SECA after a
sendMail to record outgoing emails."

In case you haven't come across SECAs yet, here's a quick definition...

SECA = Service Event Condition Action
A SECA is constituted of three parts, a Service Event, a Condition and
an Action.
Service Event = When a particular stage of execution is reached on the
named service.
Condition = When specific features of the data being processed are
found.
Action = A service to run

In applications/content/servicedef/secas.xml, you will see a definition
for sendMail that looks like this...

<eca service="sendMail" event="commit">
    <condition field-name="partyId" operator="is-not-empty"/>
    <action service="storeEmailAsCommunication" mode="sync"/>
</eca>

Each attribute is explained below

eca
service = sendMail
event = one of...
        auth: on authorisation
        commit: on transaction commit
        global-commit: on global transaction commit
        global-rollback: on global transaction roll-back
        in-validate: on validation of 'IN' parameters
        invoke: on invocation of the service
        out-validate: on validation of 'OUT' parameters
        return: on service return
        (in each case these are run 'just before' the event)

condition
field-name = one of the 'IN' parameters
operator = one of...
        contains
        equals
        greater
        greater-equals
        is-empty
        is-not-empty
        less
        less-equals
        not-equals
Although not shown above some of these operators also require one of
format/type/value attribute.

action
service: the service to call
mode: one of
        sync: synchronous service call
        async: asynchronous service call

>From all of the above, you can see that the SECA would only be called if
partyId had a value.

So, I guess that's the first thing to check. Let me know how you get
on...
--
Kind Regards
Andrew Sykes <[hidden email]>
Sykes Development Ltd
http://www.sykesdevelopment.com

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users