Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-5062

[DMN Designer] Systematically correct node prefix/trailing space on import

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • DMN Editor
    • None
    • NEW
    • NEW

      I understand DROOLS-5017 has been re-purposed to allow Info and Warn level messages be displayed on Stunner Validation dialog. That is fine.

      But, imho, an UX point is not being considered, where is necessary instead.

      By the DMN spec, a node should not have a prefix/trailing space, as space insensitivity would mandate 1 trailing or 2 trailing spaces are simply ignored etc.
      The engine is lenient to avoid this crashing the evaluation, but still is a bad designed model to persist the node name (DRGElement name and its corresponding variable name) with those extra spaces IMHO.

      Further, I consider is just the Analyst which slipped a space.

      In my perspective, the editor should just strip away the prefix/trailing space:

      • While Importing a DMN model from file Upload
      • While editing a DRGElement and hitting OK to save its name (See DROOLS-5060)

      For your consideration, thanks.

      See comment on DROOLS-5060:-

      I'd like to move the other request ("While Importing a DMN model from file Upload") to a new JIRA for the following reason:

      • It is an automated correction/cleanse
      • We already have one automated correction (when layout information is missing or insufficient)
      • We may, in the future, want to support other automated corrections
      • I'd therefore like to consolidate the approach to how automated corrections are detected, ran and reported to the User. My initial opinion is that when opening (or importing or some other trigger to be determined) a DMN file we collect (probably via CDI discovery) all implementations of "Automated Fixers" (one of which if layout another is trim leading/trailing space etc). We then show the list of possible fixes to the User, they can select whatever they like and then we run them and save the file. Anyway, IMO, it's out of scope of this JIRA as it'd need some UX involvement.

            yamer@redhat.com Yeser Amer
            mmortari@redhat.com Matteo Mortari
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: