Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-4264

In the DMN boxed expression editor React PoC, implement a draft integration for loading/saving Literal, Relation and Context logic types

XMLWordPrintable

    • 2021 Week 04-06 (from Jan 25), 2021 Week 07-09 (from Feb 15), 2021 Week 10-12 (from Mar 8)

      Goal of this task is to catch blockers caused by the integration of the React BoxedExpressionEditor component inside the existing DMN Editor (implemented in GWT).

      For sure, several classes used in this task will be reused (e.g. jsInterop classes for loading/saving definitions).

      From the React component point of view: since there is a conflict regarding the global rules defined in PFv3 vs PFv4 (look at https://app.slack.com/client/T293J2PL4/C9Q224EFL/thread/C9Q224EFL-1614271076.016500) it will be necessary to:

      1. Import base-no-reset.css instead of base.css
      2. Include missing global rules (from base.css) at the root level of BoxedExpressionEditor component, so that they will be isolated, but look&feel will be preserved.

      From the DMN editor point of view: any commit will be pushed to already existing branch dmn-boxed-react-poc. Obviously there will be few limitations (before the final version):

      1. Right-click context menu, that it is generally blocked in the DMN editor (https://github.com/kiegroup/kie-wb-common/blob/master/kie-wb-common-stunner/kie-wb-common-stunner-client/kie-wb-common-stunner-widgets/src/main/java/org/kie/workbench/common/stunner/client/widgets/presenters/session/impl/SessionPresenterView.java#L121) has been enabled by commenting this block. For sure, another strategy will be used, like we are doing for having the context menu in the (old) decision table.
      2. "Back to" link is not present, but for sure it will be (in the final version).
      3. Introduce the usage of ids for each element (e.g. column in Relation) used by the editor
      4. Use enum instead of const for strings like logicType and dataType
      5. Changes (changing expression name) from the external world (e.g. properties panel) should be reflected in the editor
      6. When changing expression name, the updated value should be immediately reflected in the decision navigator
      7. Selected logic type should be immediately reflected in the decision navigator
      8. Evaluate the removal of automatic creation of LiteralExpression cell for empty context entry - ref.
        https://github.com/kiegroup/kie-wb-common/blob/7a8d98411a666742b37c83c21de990246119f6a9/kie-wb-common-dmn/kie-wb-common-dmn-api/src/main/java/org/kie/workbench/common/dmn/api/definition/model/ContextEntry.java#L36 
        https://github.com/kiegroup/kie-wb-common/blob/97079a64d9c5b55ef1dead45e6d43c2bc77a534a/kie-wb-common-dmn/kie-wb-common-dmn-backend/src/main/java/org/kie/workbench/common/dmn/backend/definition/v1_1/ContextEntryPropertyConverter.java#L59 
        Maybe empty Expression is enough.

      Open questions:

      1. Where to save "width" property? for example width of a relation column, or width of literal expression
      2. Can you confirm that every literal expression wrapped (as cell) in the Relation component has "text" type?

        1. error-reopen.log
          38 kB
        2. existing-relation.png
          existing-relation.png
          12 kB
        3. image-2021-03-02-12-21-39-876.png
          image-2021-03-02-12-21-39-876.png
          2 kB
        4. react-relation.png
          react-relation.png
          14 kB

            vpellegr Valentino Pellegrino (Inactive)
            vpellegr Valentino Pellegrino (Inactive)
            Jozef Marko Jozef Marko
            Jozef Marko Jozef Marko
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: