Re: [OFBIZ-12801] "Error at CommunicationEventServices.groovy:489"

2023-05-03 Thread Michael Brohl
+1 A much better explanation of my thoughts than I could have put into words. Thanks, Michael Am 02.05.23 um 11:43 schrieb Daniel Watford: Hi Nicholas, I can see value in the approach I think you are proposing (please correct me if I am wrong) which I would summarise as: - All scripts are

Re: [OFBIZ-12801] "Error at CommunicationEventServices.groovy:489"

2023-05-02 Thread Daniel Watford
Hi Nicholas, I can see value in the approach I think you are proposing (please correct me if I am wrong) which I would summarise as: - All scripts are considered service implementations and will handle parameters and return types accordingly, and - GroovyEventHandler should invoke an event

Re: [OFBIZ-12801] "Error at CommunicationEventServices.groovy:489"

2023-04-28 Thread Nicolas Malin
Hi, My preference would be to the simplest for developer and keep the three word (error, failure and success). For that, we can force the return of each function as Map. After delegate the problematic to each handler. By the way, the GroovyEventHandler that call GroovyBaseScript already

Re: [OFBIZ-12801] "Error at CommunicationEventServices.groovy:489"

2023-04-28 Thread Daniel Watford
Hi Gil, I don't think we need to go as far as creating a new GroovyBaseClass. Deprecating GroovyBaseScript:success is still preferred in my opinion, replacing it with serviceSuccess and scriptSuccess. These two methods could return separate types which extend from Map and help make it clear

Re: [OFBIZ-12801] "Error at CommunicationEventServices.groovy:489"

2023-04-28 Thread Gil Portenseigne
Hello I got a quick look about it, having two separate class means having two distinct groovy DSL and need lot of modification that IMO are not worth the complexity for this subject. I now only wonder, is it that bad too keep that one exception (about untyped return) for

Re: [OFBIZ-12801] "Error at CommunicationEventServices.groovy:489"

2023-04-26 Thread Gil Portenseigne
Hello, I like the idea that the developer do not have to sync about which method to use. If I understand well what Michael envision, i.e. to use for event a new GroovyBaseEvent class, and for services/scripts a GroovyBaseScript class, that both extends a common class for the common code,

Re: [OFBIZ-12801] "Error at CommunicationEventServices.groovy:489"

2023-04-20 Thread Michael Brohl
To have it even more clear, I would separate logic for events and services. The GroovyBaseScript in the service engine package should only be used for services and there should be another one for events, if really needed. Mixing both together is bad practice IMO. There seem to be only 7

Re: [OFBIZ-12801] "Error at CommunicationEventServices.groovy:489"

2023-04-20 Thread Jacques Le Roux
Hi Daniel, I dont think there is a knowledge about methods being both services and events. I think there are not (much?) such cases. Being acquainted to OFBiz logs I did not check the trunk demo log content (now in Docker); so I wonder if there are such other cases than

Re: [OFBIZ-12801] "Error at CommunicationEventServices.groovy:489"

2023-04-19 Thread Daniel Watford
Hello, In my opinion, the semantics of calling an event handler vs a service implementation are different, albeit similar enough that most handler/implementation authors wouldn't necessarily care how the code was called. The untyped nature of Groovy had allowed a certain degree of flexibility in

[OFBIZ-12801] "Error at CommunicationEventServices.groovy:489"

2023-04-19 Thread Jacques Le Roux
Hi All, At OFBIZ-12801, we had a discussion with Daniel and Gil about the described issue (last comments there) We are unsure of the best solution, so this thread to discuss and decide. As Gil reported, Jacopo's comment of the related commit* contains <> What would be your opinion about a