You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2023/03/07 10:48:08 UTC

[ofbiz-framework] branch trunk updated: Fixed: Convert CommunicationEventServices mini lang to groovy (OFBIZ-9992) (OFBIZ-11164)

This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 6d6b0e38d9 Fixed: Convert CommunicationEventServices mini lang to groovy (OFBIZ-9992) (OFBIZ-11164)
6d6b0e38d9 is described below

commit 6d6b0e38d96c57365528871254d609572428fcdf
Author: Jacques Le Roux <ja...@les7arts.com>
AuthorDate: Tue Mar 7 11:45:50 2023 +0100

    Fixed: Convert CommunicationEventServices mini lang to groovy (OFBIZ-9992) (OFBIZ-11164)
    
    In the new groovy file, CommunicationEventServices.groovy The parameter was set
    as the whole object communicationEvent instead of the ID only
    communicationEventId which is the one required. It gave this error :
    Error running Groovy method [sendEmailDated] in Groovy file
    [component://party/groovyScripts/communication/CommunicationEventServices.groovy]:
    (org.apache.ofbiz.service.ServiceValidationException: The following required
    parameter is missing: [IN] [sendCommEventAsEmail.communicationEventId])
    
    I did the line change and it worked and sent the email.
    
    jleroux: I was a bit lost in (OFBIZ-9992) and (OFBIZ-11164) so I simply checked
    sendCommEventAsEmail definition and that's alright
    
    Thanks: Serge Byishimo (https://github.com/sergeByishimo)
---
 .../party/groovyScripts/communication/CommunicationEventServices.groovy | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/applications/party/groovyScripts/communication/CommunicationEventServices.groovy b/applications/party/groovyScripts/communication/CommunicationEventServices.groovy
index 0e1d03c3d4..a099944b74 100644
--- a/applications/party/groovyScripts/communication/CommunicationEventServices.groovy
+++ b/applications/party/groovyScripts/communication/CommunicationEventServices.groovy
@@ -483,7 +483,7 @@ def sendEmailDated() {
     List<GenericValue> communicationEvents = from("CommunicationEvent").where(conditions).queryList()
     communicationEvents.each { communicationEvent ->
         // run service don't cover the new transaction need
-        serviceContext.communicationEvent = communicationEvent
+        serviceContext.communicationEventId = communicationEvent.communicationEventId
         dispatcher.runSync("sendCommEventAsEmail", serviceContext, 7200, true)
     }