bpmn-io / dmn-js

View and edit DMN diagrams in the browser.
https://bpmn.io/toolkit/dmn-js/
Other
296 stars 137 forks source link

Add support for editing variable property #594

Open suniv2010 opened 4 years ago

suniv2010 commented 4 years ago

Is your feature request related to a problem? Please describe.

The DMN 1.3 specification describes a variable property for inputData and decision elements.

image

It can be used to specify a data type, e.g.

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" xmlns:dmndi="https://www.omg.org/spec/DMN/20191111/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" id="Definitions_1gd0ltx" name="DRD" namespace="http://camunda.org/schema/1.0/dmn" exporter="Camunda Modeler" exporterVersion="4.3.0">
  <inputData id="InputData_1">
    <variable id="Variable1" name="Age" typeRef="number"/>
  </inputData>
  <dmndi:DMNDI>
    <dmndi:DMNDiagram>
      <dmndi:DMNShape id="DMNShape_124il6q" dmnElementRef="InputData_1">
        <dc:Bounds height="45" width="125" x="148" y="78" />
      </dmndi:DMNShape>
    </dmndi:DMNDiagram>
  </dmndi:DMNDI>
</definitions>

Currently, we only support importing this property, but it can't be set in the dmn properties panel.

Describe the solution you'd like

Make it possible to configure the variable property in the dmn-js-properties-panel.

Describe alternatives you've considered

/

Additional context

/

pinussilvestrus commented 4 years ago

Please add more context to this feature request.

suniv2010 commented 4 years ago

Hi Niklas Kiefer,

I wanted to add the data type for the InputData.

[image: image.png]

Above is the inputData which I have added, and I want to add the data type for the same like this. Below is from VScode "kogito bundle"" editor. Same feature I am am looking in dmn-js.

[image: image.png]

On Tue, Oct 13, 2020 at 1:04 PM Niklas Kiefer notifications@github.com wrote:

Please add more context to this feature request.

  • Are you referring to missing DMN 1.3 support? If yes, can you explain, what property is missing and reference the specification accordingly?
  • How should the solution look like? Can you provide a sketch or something similar?
  • Why is this feature needed?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bpmn-io/dmn-js/issues/594#issuecomment-707551999, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD2IZ2RZ22B4PBLOYR5AKI3SKP7H3ANCNFSM4SOII4EA .

pinussilvestrus commented 4 years ago

So giving this forum thread answer you're looking for support for the "variable" property, right?

image

If yes, we already support rendering it, but there is currently no way to edit this property.

If I am right, please update the issue description to indicate this accordingly.

pinussilvestrus commented 4 years ago

Hi Niklas Kiefer, I wanted to add the data type for the InputData. [image: image.png] Above is the inputData which I have added, and I want to add the data type for the same like this. Below is from VScode "kogito bundle"" editor. Same feature I am am looking in dmn-js. [image: image.png] On Tue, Oct 13, 2020 at 1:04 PM Niklas Kiefer @.***> wrote: Please add more context to this feature request. - Are you referring to missing DMN 1.3 support? If yes, can you explain, what property is missing and reference the specification accordingly? - How should the solution look like? Can you provide a sketch or something similar? - Why is this feature needed? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#594 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD2IZ2RZ22B4PBLOYR5AKI3SKP7H3ANCNFSM4SOII4EA .

We can't see your attached images

pinussilvestrus commented 4 years ago

@suniv2010 can you confirm whether it's about the variable property I refer to in one of my last comments? Therefore this would an example of XML

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" xmlns:dmndi="https://www.omg.org/spec/DMN/20191111/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" id="Definitions_1gd0ltx" name="DRD" namespace="http://camunda.org/schema/1.0/dmn" exporter="Camunda Modeler" exporterVersion="4.3.0">
  <inputData id="InputData_1">
    <variable id="Variable1" name="Age" typeRef="number"/>
  </inputData>
  <dmndi:DMNDI>
    <dmndi:DMNDiagram>
      <dmndi:DMNShape id="DMNShape_124il6q" dmnElementRef="InputData_1">
        <dc:Bounds height="45" width="125" x="148" y="78" />
      </dmndi:DMNShape>
    </dmndi:DMNDiagram>
  </dmndi:DMNDI>
</definitions>

I'd like to scope this PR in case it's only missing property support so we can move forward with this one.

pinussilvestrus commented 4 years ago

Since no updates came in I updated the issues given the assumptions I made.

Dogtiti commented 2 years ago

@pinussilvestrus so, how to add <variable id="Variable1" name="Age" typeRef="number"/> into the <inputData/>? Or,can you show some examples? Thanks

barmac commented 2 years ago

Hi @Dogtiti, I believe this issue would better work via the properties panel as we don't really see variable on the diagram. What do you think? If you agree, please open an issue in that project and link this issue back.