I would like your guidance on the jira OFBIZ-5853
To sum up, when I converted the crud service I had a doubt on createPartyRole that tested if the partyRole exists before creation. I doubt because most call of this service test this existence and there is another service "ensurePartyRole" that realize exactly the same process. But as Hans pointed out, the conversion change the service (and he is right!). So we have some different way : * revert the crud service createPartyRole, keep the same method createPartyRole and ensurePartyRole and developer select that he like * Keep like this, createPartyRole use the coherence of create crud service and we use ensurePartyRole when we need check before a creation * like above but we can change all createPartyRole call encapsuled by a check direclty by ensurePartyRole * Other idea, maybe I misunderstood something and you have a good suggestion to go back. Please address :) Nicolas -- Nicolas Malin - Consultant - 06 17 66 40 06 - nereide.fr <http://nereide.fr> |
Hi Nicolas,
My first suggestion would be to look into the svn history of the two services, it might provide a better picture of how we came to have this double up of similar functionality. Perhaps the function of one of the services has unintentionally changed over time. But if both services perform roughly the same logic then I would probably just suggest we get rid of ensurePartyRole and rely solely on createPartyRole (and perhaps ensure the service description is accurate). Regards Scott On Sat, Dec 6, 2014 at 6:37 AM, Nicolas Malin <[hidden email]> wrote: > I would like your guidance on the jira OFBIZ-5853 > > To sum up, when I converted the crud service I had a doubt on > createPartyRole that tested if the partyRole exists before creation. I > doubt because most call of this service test this existence and there is > another service "ensurePartyRole" that realize exactly the same process. > > But as Hans pointed out, the conversion change the service (and he is > right!). So we have some different way : > * revert the crud service createPartyRole, keep the same method > createPartyRole and ensurePartyRole and developer select that he like > * Keep like this, createPartyRole use the coherence of create crud service > and we use ensurePartyRole when we need check before a creation > * like above but we can change all createPartyRole call encapsuled by a > check direclty by ensurePartyRole > * Other idea, maybe I misunderstood something and you have a good > suggestion to go back. > > Please address :) > > Nicolas > > -- > > Nicolas Malin - Consultant - 06 17 66 40 06 - nereide.fr < > http://nereide.fr> > > |
Administrator
|
Le 09/12/2014 04:19, Scott Gray a écrit : > Hi Nicolas, > > My first suggestion would be to look into the svn history of the two > services, it might provide a better picture of how we came to have this > double up of similar functionality. Perhaps the function of one of the > services has unintentionally changed over time. > > But if both services perform roughly the same logic then I would probably > just suggest we get rid of ensurePartyRole and rely solely on > createPartyRole (and perhaps ensure the service description is accurate). ensurePartyRole subsumes createPartyRole so it can supersedes it and there would be no confusions. See for instance https://issues.apache.org/jira/browse/OFBIZ-5905 Jacques > > Regards > Scott > > On Sat, Dec 6, 2014 at 6:37 AM, Nicolas Malin <[hidden email]> > wrote: > >> I would like your guidance on the jira OFBIZ-5853 >> >> To sum up, when I converted the crud service I had a doubt on >> createPartyRole that tested if the partyRole exists before creation. I >> doubt because most call of this service test this existence and there is >> another service "ensurePartyRole" that realize exactly the same process. >> >> But as Hans pointed out, the conversion change the service (and he is >> right!). So we have some different way : >> * revert the crud service createPartyRole, keep the same method >> createPartyRole and ensurePartyRole and developer select that he like >> * Keep like this, createPartyRole use the coherence of create crud service >> and we use ensurePartyRole when we need check before a creation >> * like above but we can change all createPartyRole call encapsuled by a >> check direclty by ensurePartyRole >> * Other idea, maybe I misunderstood something and you have a good >> suggestion to go back. >> >> Please address :) >> >> Nicolas >> >> -- >> >> Nicolas Malin - Consultant - 06 17 66 40 06 - nereide.fr < >> http://nereide.fr> >> >> |
Administrator
|
This could be more complex than I thought: there are 115 references to createPartyRole vs 5 only for ensurePartyRole
Jacques Le 11/12/2014 16:17, Jacques Le Roux a écrit : > > Le 09/12/2014 04:19, Scott Gray a écrit : >> Hi Nicolas, >> >> My first suggestion would be to look into the svn history of the two >> services, it might provide a better picture of how we came to have this >> double up of similar functionality. Perhaps the function of one of the >> services has unintentionally changed over time. >> >> But if both services perform roughly the same logic then I would probably >> just suggest we get rid of ensurePartyRole and rely solely on >> createPartyRole (and perhaps ensure the service description is accurate). > I'd rather replace createPartyRole implementation by ensurePartyRole one. > ensurePartyRole subsumes createPartyRole so it can supersedes it and there would be no confusions. See for instance > https://issues.apache.org/jira/browse/OFBIZ-5905 > > Jacques > >> >> Regards >> Scott >> >> On Sat, Dec 6, 2014 at 6:37 AM, Nicolas Malin <[hidden email]> >> wrote: >> >>> I would like your guidance on the jira OFBIZ-5853 >>> >>> To sum up, when I converted the crud service I had a doubt on >>> createPartyRole that tested if the partyRole exists before creation. I >>> doubt because most call of this service test this existence and there is >>> another service "ensurePartyRole" that realize exactly the same process. >>> >>> But as Hans pointed out, the conversion change the service (and he is >>> right!). So we have some different way : >>> * revert the crud service createPartyRole, keep the same method >>> createPartyRole and ensurePartyRole and developer select that he like >>> * Keep like this, createPartyRole use the coherence of create crud service >>> and we use ensurePartyRole when we need check before a creation >>> * like above but we can change all createPartyRole call encapsuled by a >>> check direclty by ensurePartyRole >>> * Other idea, maybe I misunderstood something and you have a good >>> suggestion to go back. >>> >>> Please address :) >>> >>> Nicolas >>> >>> -- >>> >>> Nicolas Malin - Consultant - 06 17 66 40 06 - nereide.fr < >>> http://nereide.fr> >>> >>> > |
Free forum by Nabble | Edit this page |