Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-9558

Manage deprecated service on the ModelService

    Details

    • Type: New Feature
    • Status: Patch Available
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: Trunk
    • Fix Version/s: None
    • Component/s: framework
    • Labels:
      None

      Description

      Following the thread https://s.apache.org/6PzU on how manage the deprecated service we started on the idea :

      • create a new element deprecated on services.xsd with attribute
      • * use-instead : what service replace the current
      • * since
      • * and content element as reason of the deprecation
      • alert in log warning each call on this service
      • set "@deprecated" on the service List in webtools and inform on detail service page.

      The patch contains this feature

      1. OFBIZ-9558.patch
        10 kB
        Nicolas Malin
      2. OFBIZ-9558.patch
        9 kB
        Nicolas Malin

        Activity

        Hide
        soledad Nicolas Malin added a comment -

        Forget label file _'

        Show
        soledad Nicolas Malin added a comment - Forget label file _ '
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Thanks Nicolas,

        I only reviewed (not tested), this sounds quite right to me. Just something I second is Scott's suggestion about using strikethrough in webtools

        For webtools, add a strikethrough on the service name in the Service List screen and add the information to the UI in the service definition screen.

        Note that HTML <strike> Tag. is Not Supported in HTML5. but seems still supported by modern browsers

        I note that Scott also suggested:

        I think it would be a good idea to replace the attribute definitions on the old service to use the "implements" element which would point to the new service. It would help keep them aligned with each other for future changes without duplication.

        This could be part of a deprecation policy (not only about service but also Java, Groovy, etc.) we don't have yet but for Entities (I checked only in wiki) and could be added with a definitive way as Scott wondered for

        (I can't remember the policy for deprecation, remove after the next release or after two?)

        Show
        jacques.le.roux Jacques Le Roux added a comment - Thanks Nicolas, I only reviewed (not tested), this sounds quite right to me. Just something I second is Scott's suggestion about using strikethrough in webtools For webtools, add a strikethrough on the service name in the Service List screen and add the information to the UI in the service definition screen. Note that HTML <strike> Tag. is Not Supported in HTML5. but seems still supported by modern browsers I note that Scott also suggested: I think it would be a good idea to replace the attribute definitions on the old service to use the "implements" element which would point to the new service. It would help keep them aligned with each other for future changes without duplication. This could be part of a deprecation policy (not only about service but also Java, Groovy, etc.) we don't have yet but for Entities (I checked only in wiki) and could be added with a definitive way as Scott wondered for (I can't remember the policy for deprecation, remove after the next release or after two?)
        Hide
        soledad Nicolas Malin added a comment -

        Hello Jacques,
        Yes instead change the html, I just add @deprecated but it's easier to set both before commit this patch

        I note that Scott also suggested:
        I think it would be a good idea to replace the attribute definitions on the old service to use the "implements" element which would point to the new service. It would help keep them aligned with each other for future changes without duplication.

        For my view, it's only when you deprecate a service that your replace directly on the service definition. I haven't planned to do this on the modelService that could be introduce some complexity and perhaps a confusion between service definition and attributes loaded

        Show
        soledad Nicolas Malin added a comment - Hello Jacques, Yes instead change the html, I just add @deprecated but it's easier to set both before commit this patch I note that Scott also suggested: I think it would be a good idea to replace the attribute definitions on the old service to use the "implements" element which would point to the new service. It would help keep them aligned with each other for future changes without duplication. For my view, it's only when you deprecate a service that your replace directly on the service definition. I haven't planned to do this on the modelService that could be introduce some complexity and perhaps a confusion between service definition and attributes loaded
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Nicolas,

        For my view, it's only when you deprecate a service that your replace directly on the service definition

        Yes that's what I mean. We should write a deprecate policy in the wiki, not only for Entities. We would also write when the depecated code is removed...

        Show
        jacques.le.roux Jacques Le Roux added a comment - Nicolas, For my view, it's only when you deprecate a service that your replace directly on the service definition Yes that's what I mean. We should write a deprecate policy in the wiki, not only for Entities . We would also write when the depecated code is removed...
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Hi Nicolas, I'll create a wiki page for code deprecation rules...

        Show
        jacques.le.roux Jacques Le Roux added a comment - Hi Nicolas, I'll create a wiki page for code deprecation rules...
        Hide
        soledad Nicolas Malin added a comment - - edited

        Thanks Jacques, so I will commit few time after

        Show
        soledad Nicolas Malin added a comment - - edited Thanks Jacques, so I will commit few time after
        Hide
        soledad Nicolas Malin added a comment -

        Jacques I commit the deprecated on trunk at 1804786. When we are clear how process to deprecated a service (the procedure) I will update the service definition deleteRateAmout and deletePartyRate as example linked to the wiki page.

        Show
        soledad Nicolas Malin added a comment - Jacques I commit the deprecated on trunk at 1804786. When we are clear how process to deprecated a service (the procedure) I will update the service definition deleteRateAmout and deletePartyRate as example linked to the wiki page.
        Hide
        soledad Nicolas Malin added a comment -

        I prepared the xsd update on ofbiz site. I will publish it after the documentation, during this time I keep open this issus

        Show
        soledad Nicolas Malin added a comment - I prepared the xsd update on ofbiz site. I will publish it after the documentation, during this time I keep open this issus
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Thanks Nicolas, I'll soon take care of the wiki page.

        Show
        jacques.le.roux Jacques Le Roux added a comment - Thanks Nicolas, I'll soon take care of the wiki page.
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        I'm waiting a bit in this thread http://markmail.org/message/ofwvwe2tgsxckptr (Pony Mail does not have it all, yet?) before writing the rules in the wiki page

        Show
        jacques.le.roux Jacques Le Roux added a comment - I'm waiting a bit in this thread http://markmail.org/message/ofwvwe2tgsxckptr (Pony Mail does not have it all, yet?) before writing the rules in the wiki page
        Hide
        soledad Nicolas Malin added a comment -

        this thread seems to be frozen , I think we can finalize this point.

        Show
        soledad Nicolas Malin added a comment - this thread seems to be frozen , I think we can finalize this point.
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Yes please Nicolas, feel free to close. I still have to write the rules, but I don't need a Jira for that, or will create a new one.

        Show
        jacques.le.roux Jacques Le Roux added a comment - Yes please Nicolas, feel free to close. I still have to write the rules, but I don't need a Jira for that, or will create a new one.

          People

          • Assignee:
            soledad Nicolas Malin
            Reporter:
            soledad Nicolas Malin
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Development