jomarko commented on code in PR #2844:
URL: 
https://github.com/apache/incubator-kie-tools/pull/2844#discussion_r1912883028


##########
packages/dmn-editor/stories/useCases/insurancePricing/InsurancePricing.stories.tsx:
##########
@@ -0,0 +1,166 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import * as React from "react";
+import type { Meta, StoryObj } from "@storybook/react";
+import { getMarshaller } from "@kie-tools/dmn-marshaller";
+import { Empty } from "../../misc/empty/Empty.stories";
+import { DmnEditor, DmnEditorProps } from "../../../src/DmnEditor";
+import { StorybookDmnEditorProps } from "../../dmnEditorStoriesWrapper";
+
+export const insurancePricingDmn = `<?xml version="1.0" encoding="UTF-8" ?>
+<definitions xmlns="https://www.omg.org/spec/DMN/20230324/MODEL/"; 
xmlns:dmndi="https://www.omg.org/spec/DMN/20230324/DMNDI/"; 
xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/"; 
xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/"; 
xmlns:kie="https://kie.org/dmn/extensions/1.0"; 
expressionLanguage="https://www.omg.org/spec/DMN/20230324/FEEL/"; 
namespace="https://kie.org/dmn/_3BFF6543-4697-4C29-AF20-B8E622597121"; 
id="_370DC2EC-B59D-453D-9A4E-18A481386E98" name="Insurance Pricing">
+  <inputData name="Age" id="_A33974B4-3E37-4D4B-869B-674BDFC86373">
+    <variable name="Age" id="_ACA74946-078F-4C6C-8FDC-09D335E81982" 
typeRef="number" />
+  </inputData>
+  <inputData name="had previous incidents" 
id="_14C75636-256C-415F-B0B1-046C103F6175">
+    <variable name="had previous incidents" 
id="_17EE1FA9-7548-4B6C-8371-22F8374F9D2B" typeRef="boolean" />
+  </inputData>
+  <decision name="Insurance Total Price" 
id="_3D58D6F2-CC40-4BBB-86E6-F5EDDD8A5FAB">
+    <variable name="Insurance Total Price" 
id="_2E5FA120-0BE5-4F5F-BC4D-4D822507480D" typeRef="number" />
+    <informationRequirement id="_04C37286-500C-4A55-9613-88A35662EC41">
+      <requiredInput href="#_14C75636-256C-415F-B0B1-046C103F6175" />
+    </informationRequirement>
+    <informationRequirement id="_1003CC0F-E653-4C69-936E-925DA6025940">
+      <requiredInput href="#_A33974B4-3E37-4D4B-869B-674BDFC86373" />
+    </informationRequirement>
+    <decisionTable id="_806E4867-C6D7-4895-B6FC-98927BE4F472" 
hitPolicy="UNIQUE" label="Insurance Total Price" typeRef="number">
+      <input id="_8E73D3FB-0DD8-4D23-B642-752B906EC8E9">
+        <inputExpression id="_1E24B2F9-B0EE-4126-BB38-36138D24665F" 
typeRef="number">
+          <text>Age</text>
+        </inputExpression>
+      </input>
+      <input id="_A7FA6FE2-6186-4492-A0C9-2A24BB333BE6">
+        <inputExpression id="_10845A35-3DBC-4248-81F2-E4B380D5345C" 
typeRef="boolean">
+          <text>had previous incidents</text>
+        </inputExpression>
+      </input>
+      <output id="_4612AC80-6FB9-4329-8DA4-DEA3AE628F00" name="Output-1" />

Review Comment:
   Could we please manually remove this `name="Output-1"`? it is because of :
   - https://github.com/apache/incubator-kie-tools/pull/2834



##########
packages/dmn-editor/stories/useCases/payroll/Payroll.stories.tsx:
##########
@@ -0,0 +1,343 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import * as React from "react";
+import type { Meta, StoryObj } from "@storybook/react";
+import { getMarshaller } from "@kie-tools/dmn-marshaller";
+import { Empty } from "../../misc/empty/Empty.stories";
+import { DmnEditor, DmnEditorProps } from "../../../src/DmnEditor";
+import { StorybookDmnEditorProps } from "../../dmnEditorStoriesWrapper";
+
+export const payrollDmn = `<?xml version="1.0" encoding="UTF-8" ?>
+<dmn:definitions xmlns:dmn="https://www.omg.org/spec/DMN/20230324/MODEL/"; 
xmlns="https://kiegroup.org/dmn/_DF3A36C5-A538-4FC0-9F3A-56D7AE3C76A2"; 
xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/"; 
xmlns:kie="https://kie.org/dmn/extensions/1.0"; 
xmlns:dmndi="https://www.omg.org/spec/DMN/20230324/DMNDI/"; 
xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/"; 
xmlns:feel="http://www.omg.org/spec/DMN/20180521/FEEL/"; 
id="_8DEF2854-76EF-48E0-ACDE-0888E2F0831F" name="payroll" 
typeLanguage="https://www.omg.org/spec/DMN/20230324/FEEL/"; 
namespace="https://kiegroup.org/dmn/_DF3A36C5-A538-4FC0-9F3A-56D7AE3C76A2";>
+  <dmn:extensionElements />
+  <dmn:itemDefinition id="_A453AF8C-427C-43F8-A124-8279D90E2EAB" 
name="tPayroll" isCollection="false" 
typeLanguage="https://www.omg.org/spec/DMN/20230324/FEEL/";>
+    <dmn:itemComponent id="_3AE0F3B3-D604-4B16-B736-A0F83FE9D606" 
name="vacationDays" isCollection="false" 
typeLanguage="https://www.omg.org/spec/DMN/20230324/FEEL/";>
+      <dmn:typeRef>number</dmn:typeRef>
+    </dmn:itemComponent>
+    <dmn:itemComponent id="_034DC4FD-4296-4A5F-B0A7-520777E0DC46" 
name="taxRate" isCollection="false" 
typeLanguage="https://www.omg.org/spec/DMN/20230324/FEEL/";>
+      <dmn:typeRef>number</dmn:typeRef>
+    </dmn:itemComponent>
+    <dmn:itemComponent id="_0CCF6F37-0106-48A7-BA1D-E6C642902F2C" 
name="paymentDate" isCollection="false" 
typeLanguage="https://www.omg.org/spec/DMN/20230324/FEEL/";>
+      <dmn:typeRef>number</dmn:typeRef>
+    </dmn:itemComponent>
+  </dmn:itemDefinition>
+  <dmn:itemDefinition id="_CECD659C-A9F0-48B2-AD86-05B78ADCE487" 
name="tAddress" isCollection="false">
+    <dmn:itemComponent id="_4A1569B0-D18E-4C7F-BF83-CE48A1E702D0" 
name="street" isCollection="false">
+      <dmn:typeRef>string</dmn:typeRef>
+    </dmn:itemComponent>
+    <dmn:itemComponent id="_FA0C1126-BDE1-4DF1-B84F-DA655F1F5E82" name="city" 
isCollection="false">
+      <dmn:typeRef>string</dmn:typeRef>
+    </dmn:itemComponent>
+    <dmn:itemComponent id="_5ADF65AB-F8B8-4EA0-ABB5-23EC33C06C4C" 
name="zipCode" isCollection="false">
+      <dmn:typeRef>string</dmn:typeRef>
+    </dmn:itemComponent>
+    <dmn:itemComponent id="_0CF0D023-EAD5-41AD-B5B9-EF119E3335E8" 
name="country" isCollection="false">
+      <dmn:typeRef>string</dmn:typeRef>
+    </dmn:itemComponent>
+  </dmn:itemDefinition>
+  <dmn:itemDefinition id="_FC6426DC-1EF0-43B3-B37A-07165C1BF48D" 
name="tEmployee" isCollection="false">
+    <dmn:itemComponent id="_52FBCAB2-6939-4707-9BBD-5C68C8BB86DE" 
name="firstName" isCollection="false">
+      <dmn:typeRef>string</dmn:typeRef>
+    </dmn:itemComponent>
+    <dmn:itemComponent id="_32C503D7-503F-4A34-BB16-64B034BF6F91" 
name="lastName" isCollection="false">
+      <dmn:typeRef>string</dmn:typeRef>
+    </dmn:itemComponent>
+    <dmn:itemComponent id="_27AA5310-BD4E-486D-9EBE-8393F0537E11" 
name="personalId" isCollection="false">
+      <dmn:typeRef>string</dmn:typeRef>
+    </dmn:itemComponent>
+    <dmn:itemComponent id="_E7F36991-1CCE-4F05-B7D7-54A3A2E6DB60" 
name="birthDate" isCollection="false">
+      <dmn:typeRef>Any</dmn:typeRef>
+    </dmn:itemComponent>
+    <dmn:itemComponent id="_B97815AB-BF04-424C-BD78-9EC1F723FAD5" 
name="address" isCollection="false">
+      <dmn:typeRef>tAddress</dmn:typeRef>
+    </dmn:itemComponent>
+  </dmn:itemDefinition>
+  <dmn:inputData id="_2F274241-3ABA-4777-9A0A-47D16BA06076" name="employee">
+    <dmn:extensionElements />
+    <dmn:variable id="_EFE46F4C-02E8-4022-A92C-37DFCA10D3CD" name="employee" 
typeRef="tEmployee" />
+  </dmn:inputData>
+  <dmn:decisionService id="_695671A0-6184-4EAF-8763-AEAACDF5F837" 
name="payroll">
+    <dmn:extensionElements />
+    <dmn:variable id="_3B72B8F4-38CB-428E-98DC-936461941B00" name="payroll" 
typeRef="tPayroll" />
+    <dmn:outputDecision href="#_642235EA-5395-45C1-B078-F93EF889B382" />
+    <dmn:outputDecision href="#_3311C227-5535-4F37-BCC6-426CDD9D0BCF" />
+    <dmn:outputDecision href="#_B48F40DF-A54E-4850-841F-086A085F5E97" />
+    <dmn:inputData href="#_2F274241-3ABA-4777-9A0A-47D16BA06076" />
+  </dmn:decisionService>
+  <dmn:decision id="_C49CC255-F44C-4E4E-B5DD-C1F328B692D9" name="compute 
Payroll">
+    <dmn:extensionElements />
+    <dmn:variable id="_CDD8D60D-065A-450B-80AF-8A4094EB5D9E" name="compute 
Payroll" typeRef="Any" />

Review Comment:
   is `Any` appropriate here?



##########
packages/dmn-editor/stories/useCases/payroll/Payroll.stories.tsx:
##########
@@ -0,0 +1,343 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import * as React from "react";
+import type { Meta, StoryObj } from "@storybook/react";
+import { getMarshaller } from "@kie-tools/dmn-marshaller";
+import { Empty } from "../../misc/empty/Empty.stories";
+import { DmnEditor, DmnEditorProps } from "../../../src/DmnEditor";
+import { StorybookDmnEditorProps } from "../../dmnEditorStoriesWrapper";
+
+export const payrollDmn = `<?xml version="1.0" encoding="UTF-8" ?>
+<dmn:definitions xmlns:dmn="https://www.omg.org/spec/DMN/20230324/MODEL/"; 
xmlns="https://kiegroup.org/dmn/_DF3A36C5-A538-4FC0-9F3A-56D7AE3C76A2"; 
xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/"; 
xmlns:kie="https://kie.org/dmn/extensions/1.0"; 
xmlns:dmndi="https://www.omg.org/spec/DMN/20230324/DMNDI/"; 
xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/"; 
xmlns:feel="http://www.omg.org/spec/DMN/20180521/FEEL/"; 
id="_8DEF2854-76EF-48E0-ACDE-0888E2F0831F" name="payroll" 
typeLanguage="https://www.omg.org/spec/DMN/20230324/FEEL/"; 
namespace="https://kiegroup.org/dmn/_DF3A36C5-A538-4FC0-9F3A-56D7AE3C76A2";>
+  <dmn:extensionElements />
+  <dmn:itemDefinition id="_A453AF8C-427C-43F8-A124-8279D90E2EAB" 
name="tPayroll" isCollection="false" 
typeLanguage="https://www.omg.org/spec/DMN/20230324/FEEL/";>
+    <dmn:itemComponent id="_3AE0F3B3-D604-4B16-B736-A0F83FE9D606" 
name="vacationDays" isCollection="false" 
typeLanguage="https://www.omg.org/spec/DMN/20230324/FEEL/";>
+      <dmn:typeRef>number</dmn:typeRef>
+    </dmn:itemComponent>
+    <dmn:itemComponent id="_034DC4FD-4296-4A5F-B0A7-520777E0DC46" 
name="taxRate" isCollection="false" 
typeLanguage="https://www.omg.org/spec/DMN/20230324/FEEL/";>
+      <dmn:typeRef>number</dmn:typeRef>
+    </dmn:itemComponent>
+    <dmn:itemComponent id="_0CCF6F37-0106-48A7-BA1D-E6C642902F2C" 
name="paymentDate" isCollection="false" 
typeLanguage="https://www.omg.org/spec/DMN/20230324/FEEL/";>
+      <dmn:typeRef>number</dmn:typeRef>
+    </dmn:itemComponent>
+  </dmn:itemDefinition>
+  <dmn:itemDefinition id="_CECD659C-A9F0-48B2-AD86-05B78ADCE487" 
name="tAddress" isCollection="false">
+    <dmn:itemComponent id="_4A1569B0-D18E-4C7F-BF83-CE48A1E702D0" 
name="street" isCollection="false">
+      <dmn:typeRef>string</dmn:typeRef>
+    </dmn:itemComponent>
+    <dmn:itemComponent id="_FA0C1126-BDE1-4DF1-B84F-DA655F1F5E82" name="city" 
isCollection="false">
+      <dmn:typeRef>string</dmn:typeRef>
+    </dmn:itemComponent>
+    <dmn:itemComponent id="_5ADF65AB-F8B8-4EA0-ABB5-23EC33C06C4C" 
name="zipCode" isCollection="false">
+      <dmn:typeRef>string</dmn:typeRef>
+    </dmn:itemComponent>

Review Comment:
   the example does not touch these fields, also, we de not demonstrate feature 
like constraints of data types or similar, do we need to keep them in the 
example?
   
   similar question for the `tEmployee`:
   - firstname
   - lastname
   - personalId
   - birthDate



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to