This is an automated email from the ASF dual-hosted git repository.

yamer pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git


The following commit(s) were added to refs/heads/main by this push:
     new 3639feb0ff4 kie-issues#1514: Test Scenario Editor:  Advanced use cases 
(Expressions, List) (#2919)
3639feb0ff4 is described below

commit 3639feb0ff4ad6b87fa20b75df2531f3b0fe6645
Author: Yeser Amer <[email protected]>
AuthorDate: Tue Mar 4 08:59:02 2025 +0100

    kie-issues#1514: Test Scenario Editor:  Advanced use cases (Expressions, 
List) (#2919)
    
    Co-authored-by: Luiz João Motta <[email protected]>
    Co-authored-by: Jozef Marko <[email protected]>
---
 .../src/creation/TestScenarioCreationPanel.css     |   4 +
 .../src/creation/TestScenarioCreationPanel.tsx     |  12 +-
 .../drawer/TestScenarioDrawerDataSelectorPanel.tsx | 428 ++++++++++-----------
 .../src/i18n/TestScenarioEditorI18n.ts             |   2 +
 packages/scesim-editor/src/i18n/locales/en.ts      |   2 +
 .../src/mutations/createNewDmnTypeTestScenario.ts  | 121 +++---
 .../src/mutations/pushFactMappings.ts              |  13 +-
 .../scesim-editor/src/mutations/updateColumn.ts    |  20 +-
 .../src/store/TestScenarioEditorStore.ts           |   5 +-
 .../src/store/computed/computeDmnDataObjects.ts    |  99 +++--
 .../computed/computeTestScenarioDataObjects.ts     |  28 +-
 .../scesim-editor/src/table/TestScenarioTable.tsx  |  22 +-
 .../stories/examples/AvailableDMNModels.ts         |  20 +-
 .../stories/examples/ExternalDmnModels.ts          | 151 +++++++-
 .../stories/misc/collection/Collection.mdx         |  46 +++
 .../stories/misc/collection/Collection.stories.tsx | 277 +++++++++++++
 .../stories/misc/expression/Expression.mdx         |  46 +++
 .../stories/misc/expression/Expression.stories.tsx | 234 +++++++++++
 .../stories/misc/simple/Simple.stories.tsx         | 181 ++++++++-
 .../tests-e2e/features/keyboard/keyboard.spec.ts   |   2 +-
 .../features/selection/contextMenu.spec.ts         |   2 +-
 .../scesimEditor/backgroundTable/populate.spec.ts  |   1 +
 .../backgroundTable/selectorPanel.spec.ts          |   6 +-
 .../testScenarioTable/contextMenu.spec.ts          |   2 +-
 .../testScenarioTable/populate.spec.ts             |   1 +
 .../testScenarioTable/selectorPanel.spec.ts        |   4 +-
 26 files changed, 1343 insertions(+), 386 deletions(-)

diff --git a/packages/scesim-editor/src/creation/TestScenarioCreationPanel.css 
b/packages/scesim-editor/src/creation/TestScenarioCreationPanel.css
index e4c4aa96e26..9826007d3dd 100644
--- a/packages/scesim-editor/src/creation/TestScenarioCreationPanel.css
+++ b/packages/scesim-editor/src/creation/TestScenarioCreationPanel.css
@@ -21,3 +21,7 @@
   margin-left: 5px;
   vertical-align: top;
 }
+
+.kie-scesim-editor-creation-panel--rule-scesim-alert {
+  margin-top: 20px;
+}
diff --git a/packages/scesim-editor/src/creation/TestScenarioCreationPanel.tsx 
b/packages/scesim-editor/src/creation/TestScenarioCreationPanel.tsx
index 785bba602a6..9fc3332c37c 100644
--- a/packages/scesim-editor/src/creation/TestScenarioCreationPanel.tsx
+++ b/packages/scesim-editor/src/creation/TestScenarioCreationPanel.tsx
@@ -22,6 +22,7 @@ import { useCallback, useState } from "react";
 import { useCancelableEffect } from 
"@kie-tools-core/react-hooks/dist/useCancelableEffect";
 import { basename } from "path";
 
+import { Alert } from "@patternfly/react-core/dist/js/components/Alert";
 import { Button } from "@patternfly/react-core/dist/js/components/Button";
 import { Checkbox } from "@patternfly/react-core/dist/js/components/Checkbox";
 import { EmptyState, EmptyStateIcon } from 
"@patternfly/react-core/dist/js/components/EmptyState";
@@ -280,7 +281,7 @@ function TestScenarioCreationPanel() {
               <>
                 <span>{i18n.creationPanel.testSkip}</span>
                 <Tooltip content={i18n.drawer.settings.testSkippedTooltip}>
-                  <Icon 
className={"kie-scesim-editor-creation-panel--info-icon"} size="sm" 
status="info">
+                  <Icon 
className="kie-scesim-editor-creation-panel--info-icon" size="sm" status="info">
                     <HelpIcon />
                   </Icon>
                 </Tooltip>
@@ -292,9 +293,16 @@ function TestScenarioCreationPanel() {
           />
         </FormGroup>
       </Form>
+      {assetType === "RULE" && (
+        <Alert
+          className="kie-scesim-editor-creation-panel--rule-scesim-alert"
+          variant="danger"
+          title="Rule based Test Scenario is not supported yet."
+        />
+      )}
       <Button
         icon={<AddIcon />}
-        isDisabled={assetType === "" || (assetType === "DMN" && 
!selectedDmnModel)}
+        isDisabled={assetType === "" || assetType === "RULE" || (assetType === 
"DMN" && !selectedDmnModel)}
         onClick={createTestScenario}
         variant="primary"
       >
diff --git 
a/packages/scesim-editor/src/drawer/TestScenarioDrawerDataSelectorPanel.tsx 
b/packages/scesim-editor/src/drawer/TestScenarioDrawerDataSelectorPanel.tsx
index 9765184f2e1..22ff8badb8f 100644
--- a/packages/scesim-editor/src/drawer/TestScenarioDrawerDataSelectorPanel.tsx
+++ b/packages/scesim-editor/src/drawer/TestScenarioDrawerDataSelectorPanel.tsx
@@ -20,6 +20,7 @@
 import * as React from "react";
 
 import { useCallback, useEffect, useMemo, useState } from "react";
+import { cloneDeep } from "lodash";
 
 import { Bullseye } from "@patternfly/react-core/dist/js/layouts/Bullseye";
 import { Button } from "@patternfly/react-core/dist/js/components/Button/";
@@ -52,6 +53,104 @@ const enum TestScenarioDataSelectorState {
   TREEVIEW_ENABLED_ONLY, // TreeView component is enabled only, in a read only 
mode (when a column is selected)
 }
 
+/* It checks if the given root Data Object is already assigned */
+const isRootDataObjectAssignable = (
+  dataObject: TestScenarioDataObject,
+  assignedExpressionElements: SceSim__expressionElementsType[]
+) => {
+  let filtered = true;
+  for (const expressionElements of assignedExpressionElements) {
+    if (
+      !expressionElements ||
+      !expressionElements.ExpressionElement ||
+      expressionElements.ExpressionElement.length === 0
+    ) {
+      continue;
+    }
+    if (expressionElements.ExpressionElement[0].step.__$$text === 
dataObject.expressionElements[0]) {
+      filtered = false;
+      break;
+    }
+  }
+  return filtered;
+};
+
+function filterOutDataObjectChildrenByExpressionElements(
+  dataObject: TestScenarioDataObject,
+  allExpressionElements: string[]
+): boolean {
+  if (dataObject.children) {
+    dataObject.children = dataObject.children.filter((child) => {
+      return filterOutDataObjectChildrenByExpressionElements(child, 
allExpressionElements);
+    });
+  }
+
+  return 
!allExpressionElements.includes(dataObject.expressionElements.join("."));
+}
+
+const filterDataObjectsById = (item: TestScenarioDataObject, itemId: string) 
=> {
+  if (item.id === itemId) {
+    return true;
+  }
+
+  if (item.children) {
+    const dataObjects: TestScenarioDataObject[] = item.children
+      .map((object: TestScenarioDataObject) => Object.assign({}, object))
+      .filter((child: TestScenarioDataObject) => filterDataObjectsById(child, 
itemId));
+
+    return dataObjects.length > 0;
+  }
+
+  return false;
+};
+
+const filterDataObjectsByName = (item: TestScenarioDataObject, name: string) 
=> {
+  if (item.name.toLowerCase().includes(name.toLowerCase())) {
+    return true;
+  }
+
+  if (item.children) {
+    const dataObjects: TestScenarioDataObject[] = item.children
+      .map((object: TestScenarioDataObject) => Object.assign({}, object))
+      .filter((child: TestScenarioDataObject) => 
filterDataObjectsByName(child, name));
+
+    return dataObjects.length > 0;
+  }
+
+  return false;
+};
+
+/* It returns the Root Data Object with its hierarchy given a set of Test 
Scenario Data Object and an itemId */
+const findDataObjectRootParent = (dataObjects: TestScenarioDataObject[], 
itemId: string) => {
+  const filtered = dataObjects
+    .map((object) => Object.assign({}, object))
+    .filter((item) => filterDataObjectsById(item, itemId));
+
+  return filtered[0];
+};
+
+const filterTypesItems = (dataObject: TestScenarioDataObject, 
factIdentifierName: string) => {
+  return dataObject.name === factIdentifierName;
+};
+
+/* It returns the TestScenarioDataObject that matches the provided ID 
searching over all provided TestScenarioDataObjects and its children */
+function findTestScenarioDataObjectById(
+  testScenarioDataObjects: TestScenarioDataObject[],
+  id: string
+): TestScenarioDataObject | undefined {
+  for (const testScenarioDataObject of testScenarioDataObjects) {
+    if (testScenarioDataObject.id === id) {
+      return testScenarioDataObject;
+    } else if (testScenarioDataObject.children) {
+      const testScenarioDataObjectChild = 
findTestScenarioDataObjectById(testScenarioDataObject.children, id);
+      if (testScenarioDataObjectChild) {
+        return testScenarioDataObjectChild;
+      }
+    }
+  }
+  return undefined;
+}
+
 function TestScenarioDataSelectorPanel() {
   const { i18n } = useTestScenarioEditorI18n();
   const { externalModelsByNamespace } = useExternalModels();
@@ -79,92 +178,9 @@ function TestScenarioDataSelectorPanel() {
     isExpanded: false,
   });
 
-  const filterDataObjectsByID = useCallback((item, itemID) => {
-    if (item.id === itemID) {
-      return true;
-    }
-
-    if (item.children) {
-      return (
-        (item.children = item.children
-          .map((object: TestScenarioDataObject) => Object.assign({}, object))
-          .filter((child: TestScenarioDataObject) => 
filterDataObjectsByID(child, itemID))).length > 0
-      );
-    }
-
-    return false;
-  }, []);
-
-  const findDataObjectRootParent = useCallback(
-    (dataObjects: TestScenarioDataObject[], itemId: string) => {
-      const filtered = dataObjects
-        .map((object) => Object.assign({}, object))
-        .filter((item) => filterDataObjectsByID(item, itemId));
-
-      return filtered[0];
-    },
-    [filterDataObjectsByID]
-  );
-
-  const isDataObjectRootParent = useCallback((dataObjects: 
TestScenarioDataObject[], itemID: string) => {
-    return dataObjects.map((object) => Object.assign({}, 
object)).filter((item) => item.id === itemID).length === 1;
-  }, []);
-
-  const filterTypesItems = useCallback((dataObject, factIdentifierName) => {
-    return dataObject.name === factIdentifierName;
-  }, []);
-
-  const filterDataObjectByExpressionElements = useCallback(
-    (dataObject: TestScenarioDataObject, allExpressionElements: 
SceSim__expressionElementsType[]) => {
-      let filtered = true;
-      for (const expressionElements of allExpressionElements) {
-        if (
-          !expressionElements ||
-          !expressionElements.ExpressionElement ||
-          expressionElements.ExpressionElement.length === 0
-        ) {
-          continue;
-        }
-        if (expressionElements.ExpressionElement[0].step.__$$text === 
dataObject.name) {
-          filtered = false;
-          break;
-        }
-      }
-      return filtered;
-    },
-    []
-  );
-
-  const filterDataObjectChildrenByExpressionElements = useCallback(
-    (dataObject: TestScenarioDataObject, allExpressionElements: 
SceSim__expressionElementsType[]) => {
-      if (dataObject.children) {
-        for (const expressionElements of allExpressionElements) {
-          if (
-            !expressionElements ||
-            !expressionElements.ExpressionElement ||
-            expressionElements.ExpressionElement.length === 0
-          ) {
-            continue;
-          }
-          if (expressionElements.ExpressionElement[0].step.__$$text === 
dataObject.name) {
-            const selected: TestScenarioDataObject[] = 
dataObject.children.filter((dataObjectChild) => {
-              const fieldName = 
expressionElements.ExpressionElement!.at(-1)!.step.__$$text;
-              if (dataObject.isSimpleTypeFact) {
-                fieldName.concat(".");
-              }
-              return dataObjectChild.name !== fieldName;
-            });
-            dataObject.children = selected;
-          }
-        }
-      }
-    },
-    []
-  );
-
   /** It filters out all the Data Objects and their Children already assigned 
in the table */
   const filterOutAlreadyAssignedDataObjectsAndChildren = useCallback(
-    (expressionElement: SceSim__expressionElementsType, isBackground: boolean) 
=> {
+    (selectedColumnExpressionElement: SceSim__expressionElementsType | 
undefined, isBackground: boolean) => {
       const testScenarioDescriptor = isBackground
         ? scesimModel.ScenarioSimulationModel.background.scesimModelDescriptor
         : scesimModel.ScenarioSimulationModel.simulation.scesimModelDescriptor;
@@ -172,36 +188,43 @@ function TestScenarioDataSelectorPanel() {
         (factMapping) => factMapping.expressionElements!
       );
 
-      const filteredDataObjects: TestScenarioDataObject[] = dataObjects
-        .map((object) => JSON.parse(JSON.stringify(object))) // Deep copy: the 
Objects may mutate due to children filtering
-        .filter((dataObject) => 
!filterDataObjectByExpressionElements(dataObject, [expressionElement]));
-      filteredDataObjects.forEach((dataObject) =>
-        filterDataObjectChildrenByExpressionElements(dataObject, 
assignedExpressionElements)
-      );
+      const assignedIds = testScenarioDescriptor.factMappings
+        .FactMapping!.filter(
+          (factMapping) => factMapping.expressionElements && 
factMapping.expressionElements.ExpressionElement
+        )
+        .map((factMapping) =>
+          factMapping
+            .expressionElements!.ExpressionElement!.map((expressionElement) => 
expressionElement.step.__$$text)
+            .join(".")
+        )
+        .filter((ee) => ee);
+
+      let filteredDataObjects: TestScenarioDataObject[] = [];
+
+      // An Empty column has been selected. Filtering out all assigined 
Instances
+      if (
+        !selectedColumnExpressionElement?.ExpressionElement ||
+        selectedColumnExpressionElement?.ExpressionElement?.length === 0
+      ) {
+        filteredDataObjects = dataObjects
+          .map((object) => cloneDeep(object)) // Deep copy: the Objects may 
mutate due to children filtering
+          .filter((dataObject) => isRootDataObjectAssignable(dataObject, 
assignedExpressionElements));
+      } else {
+        // In case of not empty column, it keeps the selected root Fact 
Mapping (Instance) and then filtering out the already
+        // assigned children Data Objects.
+        filteredDataObjects = dataObjects
+          .map((object) => cloneDeep(object)) // Deep copy: the Objects may 
mutate due to children filtering
+          .filter((dataObject) => !isRootDataObjectAssignable(dataObject, 
[selectedColumnExpressionElement]));
+        filteredDataObjects.filter((dataObject) =>
+          filterOutDataObjectChildrenByExpressionElements(dataObject, 
assignedIds)
+        );
+      }
+
       return filteredDataObjects;
     },
-    [
-      dataObjects,
-      filterDataObjectByExpressionElements,
-      filterDataObjectChildrenByExpressionElements,
-      scesimModel.ScenarioSimulationModel,
-    ]
+    [dataObjects, scesimModel.ScenarioSimulationModel]
   );
 
-  const filterItems = useCallback((item, input) => {
-    if (item.name.toLowerCase().includes(input.toLowerCase())) {
-      return true;
-    }
-
-    if (item.children) {
-      return (
-        (item.children = item.children
-          .map((object: TestScenarioDataObject) => Object.assign({}, object))
-          .filter((child: TestScenarioDataObject) => filterItems(child, 
input))).length > 0
-      );
-    }
-  }, []);
-
   useEffect(() => {
     console.debug("========SELECTOR PANEL USE EFFECT===========");
     console.debug("Selected Column:");
@@ -232,30 +255,17 @@ function TestScenarioDataSelectorPanel() {
       const isFactIdentifierAssigned =
         selectedColumnMetadata.factMapping.factIdentifier.className!.__$$text 
!== "java.lang.Void";
 
-      let filteredDataObjects: TestScenarioDataObject[] = [];
-      if (isFactIdentifierAssigned) {
-        const expressionElement = 
selectedColumnMetadata.factMapping.expressionElements!;
-        filteredDataObjects = filterOutAlreadyAssignedDataObjectsAndChildren(
-          expressionElement,
-          selectedColumnMetadata.isBackground
-        );
-      } else {
-        const testScenarioDescriptor = selectedColumnMetadata.isBackground
-          ? 
scesimModel.ScenarioSimulationModel.background.scesimModelDescriptor
-          : 
scesimModel.ScenarioSimulationModel.simulation.scesimModelDescriptor;
-        const assignedExpressionElements = 
testScenarioDescriptor.factMappings.FactMapping!.map(
-          (factMapping) => factMapping.expressionElements!
-        );
-
-        filteredDataObjects = dataObjects
-          .map((object) => JSON.parse(JSON.stringify(object))) // Deep copy: 
the Objects may mutate due to children filtering
-          .filter((dataObject) => 
filterDataObjectByExpressionElements(dataObject, assignedExpressionElements));
-      }
+      let filteredDataObjects: TestScenarioDataObject[] = 
filterOutAlreadyAssignedDataObjectsAndChildren(
+        selectedColumnMetadata.factMapping.expressionElements,
+        selectedColumnMetadata.isBackground
+      );
 
       /** Applying User search key to the filteredDataObjects, if present */
       const isUserFilterPresent = treeViewStatus.searchKey.trim() !== "";
       if (isUserFilterPresent) {
-        filteredDataObjects = filteredDataObjects.filter((item) => 
filterItems(item, treeViewStatus.searchKey));
+        filteredDataObjects = filteredDataObjects.filter((item) =>
+          filterDataObjectsByName(item, treeViewStatus.searchKey)
+        );
       }
 
       setDataSelectorStatus(TestScenarioDataSelectorState.ENABLED);
@@ -284,36 +294,29 @@ function TestScenarioDataSelectorPanel() {
     const isSimpleTypeFact =
       
selectedColumnMetadata.factMapping.expressionElements!.ExpressionElement!.length
 === 1 &&
       selectedColumnMetadata.factMapping.className.__$$text !== 
"java.lang.Void";
-    let fieldID: string;
+    let fieldId: string;
     if (isExpressionType) {
-      fieldID = 
selectedColumnMetadata.factMapping.expressionElements!.ExpressionElement![0].step.__$$text;
+      fieldId = 
selectedColumnMetadata.factMapping.expressionElements!.ExpressionElement![0].step.__$$text;
     } else if (isSimpleTypeFact) {
-      fieldID = 
selectedColumnMetadata.factMapping.expressionElements!.ExpressionElement![0].step.__$$text.concat(".");
+      fieldId = selectedColumnMetadata.factMapping
+        .expressionElements!.ExpressionElement![0].step.__$$text.concat(".")
+        .concat("value");
     } else {
-      fieldID = selectedColumnMetadata.factMapping
+      fieldId = selectedColumnMetadata.factMapping
         .expressionElements!.ExpressionElement!.map((expressionElement) => 
expressionElement.step.__$$text)
         .join(".");
     }
 
-    //TODO 1 This not work with multiple level and expressions fields. see 
kie-issues#1514
-    const treeViewItemToActivate = filteredDataObjects
-      .reduce((acc: TestScenarioDataObject[], item) => {
-        return item.children ? acc.concat(item.children) : acc;
-      }, [])
-      .filter((item) => item.id === fieldID);
+    const treeViewItemToActivate = findTestScenarioDataObjectById(dataObjects, 
fieldId)!;
 
     setDataSelectorStatus(TestScenarioDataSelectorState.TREEVIEW_ENABLED_ONLY);
     setFilteredItems(filteredDataObjects);
-    setTreeViewStatus({ activeItems: treeViewItemToActivate, searchKey: "", 
isExpanded: true });
+    setTreeViewStatus({ activeItems: [treeViewItemToActivate], searchKey: "", 
isExpanded: true });
     console.debug("Case 3");
     console.debug("=============USE EFFECT END===============");
   }, [
     dataObjects,
-    filterDataObjectByExpressionElements,
-    filterDataObjectChildrenByExpressionElements,
     filterOutAlreadyAssignedDataObjectsAndChildren,
-    filterItems,
-    filterTypesItems,
     scesimModel,
     selectedColumnMetadata,
     treeViewStatus.searchKey,
@@ -330,13 +333,13 @@ function TestScenarioDataSelectorPanel() {
         ? testScenarioType === "DMN"
           ? i18n.drawer.dataSelector.emptyDataObjectsTitleDMN
           : i18n.drawer.dataSelector.emptyDataObjectsTitleRule
-        : "No more properties"; //TODO CHANGE
+        : i18n.drawer.dataSelector.emptyDataObjectsTitle;
     const description =
       dataObjects.length === 0
         ? testScenarioType === "DMN"
           ? i18n.drawer.dataSelector.emptyDataObjectsDescriptionDMN
           : i18n.drawer.dataSelector.emptyDataObjectsDescriptionRule
-        : "All the properties have been already assigned"; //TODO CHANGE
+        : i18n.drawer.dataSelector.emptyDataObjectsDescription;
 
     {
       testScenarioType === "DMN"
@@ -351,10 +354,7 @@ function TestScenarioDataSelectorPanel() {
     filteredItems.length,
     dataObjects.length,
     testScenarioType,
-    i18n.drawer.dataSelector.emptyDataObjectsTitleDMN,
-    i18n.drawer.dataSelector.emptyDataObjectsTitleRule,
-    i18n.drawer.dataSelector.emptyDataObjectsDescriptionDMN,
-    i18n.drawer.dataSelector.emptyDataObjectsDescriptionRule,
+    i18n.drawer.dataSelector,
   ]);
 
   const insertDataObjectButtonStatus = useMemo(() => {
@@ -366,21 +366,24 @@ function TestScenarioDataSelectorPanel() {
     }
 
     const oneActiveTreeViewItem = treeViewStatus.activeItems.length === 1;
-    if (!oneActiveTreeViewItem) {
+    if (!treeViewStatus.activeItems === undefined || 
treeViewStatus.activeItems.length !== 1) {
       return { message: 
i18n.drawer.dataSelector.insertDataObjectTooltipDataObjectSelectionMessage, 
enabled: false };
     }
-
+    const activeItem = treeViewStatus.activeItems[0] as TestScenarioDataObject;
     const expressionElement = 
selectedColumnMetadata.factMapping.expressionElements!;
-
-    const filteredDataObjects: TestScenarioDataObject[] = 
filterOutAlreadyAssignedDataObjectsAndChildren(
+    const assegnedDataObjects: TestScenarioDataObject[] = 
filterOutAlreadyAssignedDataObjectsAndChildren(
       expressionElement,
       selectedColumnMetadata.isBackground
     );
-    const isAlreadyAssigined =
-      filteredDataObjects.length === 1 &&
-      !filteredDataObjects[0].children?.find((child) => child.id === 
treeViewStatus.activeItems[0].id);
 
-    if (oneActiveTreeViewItem && isAlreadyAssigined) {
+    const isActiveItemMiddleDataObject: boolean =
+      activeItem?.children != null && activeItem.children.length > 0 && 
activeItem.expressionElements.length > 1;
+
+    const isAssignabile =
+      !isActiveItemMiddleDataObject &&
+      findTestScenarioDataObjectById(assegnedDataObjects, activeItem.id!) !== 
undefined;
+
+    if (oneActiveTreeViewItem && !isAssignabile) {
       return {
         message: 
i18n.drawer.dataSelector.insertDataObjectTooltipDataObjectAlreadyAssignedMessage,
         enabled: false,
@@ -388,68 +391,63 @@ function TestScenarioDataSelectorPanel() {
     }
 
     return { message: 
i18n.drawer.dataSelector.insertDataObjectTooltipDataObjectAssignMessage, 
enabled: true };
-  }, [filterOutAlreadyAssignedDataObjectsAndChildren, i18n, 
selectedColumnMetadata, treeViewStatus.activeItems]);
+  }, [filterOutAlreadyAssignedDataObjectsAndChildren, i18n, 
selectedColumnMetadata, treeViewStatus]);
 
   const onAllExpandedToggle = useCallback((_event) => {
     setAllExpanded((prev) => !prev);
   }, []);
 
-  // CHECK
-  const onInsertDataObjectClick = useCallback(
-    /** TODO 2 : NEED A POPUP ASKING IF WE WANT TO REPLACE VALUES OR NOT see 
kie-issues#1514 */
-    () => {
-      const isBackground = selectedColumnMetadata!.isBackground;
-      const isRootType = isDataObjectRootParent(dataObjects, 
treeViewStatus.activeItems[0].id!.toString());
-      const rootDataObject = findDataObjectRootParent(dataObjects, 
treeViewStatus.activeItems[0].id!.toString());
-      const className = 
treeViewStatus.activeItems[0].customBadgeContent!.toString();
-      const expressionAlias = isRootType ? "Expression </>" : 
treeViewStatus.activeItems[0].name!.toString();
-      const expressionElementsSteps = 
treeViewStatus.activeItems[0].id!.split(".").filter((step) => !!step.trim()); 
//WARNING !!!! THIS DOESN'T WORK WITH IMPORTED DATA OBJECTS see kie-issues#1514
-      const factName = treeViewStatus.activeItems[0].id!.split(".")[0]; 
//WARNING !!!! THIS DOESN'T WORK WITH IMPORTED DATA OBJECTS see kie-issues#1514
-      const factClassName = isRootType
-        ? treeViewStatus.activeItems[0].customBadgeContent!.toString()
-        : rootDataObject.customBadgeContent!.toString();
-      const factMappingValueType = isRootType ? "EXPRESSION" : 
"NOT_EXPRESSION";
-
-      testScenarioEditorStoreApi.setState((state) => {
-        const factMappings = isBackground
-          ? 
state.scesim.model.ScenarioSimulationModel.background.scesimModelDescriptor.factMappings.FactMapping!
-          : 
state.scesim.model.ScenarioSimulationModel.simulation.scesimModelDescriptor.factMappings.FactMapping!;
-        const factMappingValuesTypes = isBackground
-          ? 
state.scesim.model.ScenarioSimulationModel.background.scesimData.BackgroundData!
-          : 
state.scesim.model.ScenarioSimulationModel.simulation.scesimData.Scenario!;
-
-        const { updatedFactMapping } = updateColumn({
-          className: className,
-          expressionAlias: expressionAlias,
-          expressionElementsSteps: expressionElementsSteps,
-          expressionIdentifierName: 
selectedColumnMetadata!.factMapping.expressionIdentifier.name?.__$$text,
-          expressionIdentifierType: 
selectedColumnMetadata!.factMapping.expressionIdentifier.type?.__$$text,
-          factMappings: factMappings,
-          factClassName: factClassName,
-          factIdentifierClassName: 
selectedColumnMetadata!.factMapping.factIdentifier.className?.__$$text,
-          factIdentifierName: 
selectedColumnMetadata!.factMapping.factIdentifier.name?.__$$text,
-          factMappingValuesTypes: factMappingValuesTypes,
-          factMappingValueType: factMappingValueType,
-          factName: factName,
-          selectedColumnIndex: selectedColumnMetadata!.index,
-        });
-
-        state.dispatch(state).table.updateSelectedColumn({
-          factMapping: updatedFactMapping,
-          index: selectedColumnMetadata!.index,
-          isBackground: isBackground,
-        });
-      });
-    },
-    [
+  const onInsertDataObjectClick = useCallback(() => {
+    const userSelectedTestScenarioObject = treeViewStatus.activeItems[0] as 
TestScenarioDataObject;
+
+    if (!userSelectedTestScenarioObject) {
+      console.warn("No Data Object selected in the item view.");
+      return;
+    }
+
+    const rootSelectedTestScenarioDataObject = findDataObjectRootParent(
       dataObjects,
-      findDataObjectRootParent,
-      isDataObjectRootParent,
-      selectedColumnMetadata,
-      testScenarioEditorStoreApi,
-      treeViewStatus.activeItems,
-    ]
-  );
+      treeViewStatus.activeItems[0].id!.toString()
+    );
+    const isBackground = selectedColumnMetadata!.isBackground;
+    const isRootType = rootSelectedTestScenarioDataObject.id === 
userSelectedTestScenarioObject.id;
+    const expressionAlias = isRootType
+      ? "expression </>"
+      : 
userSelectedTestScenarioObject.id.replace(userSelectedTestScenarioObject.expressionElements[0]
 + ".", "");
+    const factMappingValueType = isRootType ? "EXPRESSION" : "NOT_EXPRESSION";
+
+    testScenarioEditorStoreApi.setState((state) => {
+      const factMappings = isBackground
+        ? 
state.scesim.model.ScenarioSimulationModel.background.scesimModelDescriptor.factMappings.FactMapping!
+        : 
state.scesim.model.ScenarioSimulationModel.simulation.scesimModelDescriptor.factMappings.FactMapping!;
+      const factMappingValuesTypes = isBackground
+        ? 
state.scesim.model.ScenarioSimulationModel.background.scesimData.BackgroundData!
+        : 
state.scesim.model.ScenarioSimulationModel.simulation.scesimData.Scenario!;
+
+      const { updatedFactMapping } = updateColumn({
+        className: userSelectedTestScenarioObject.className!,
+        expressionAlias: expressionAlias,
+        expressionElementsSteps: 
userSelectedTestScenarioObject.expressionElements,
+        expressionIdentifierName: 
selectedColumnMetadata!.factMapping.expressionIdentifier.name?.__$$text,
+        expressionIdentifierType: 
selectedColumnMetadata!.factMapping.expressionIdentifier.type?.__$$text,
+        factMappings: factMappings,
+        factClassName: rootSelectedTestScenarioDataObject.className!,
+        factIdentifierClassName: 
selectedColumnMetadata!.factMapping.factIdentifier.className?.__$$text,
+        factIdentifierName: 
selectedColumnMetadata!.factMapping.factIdentifier.name?.__$$text,
+        factMappingValuesTypes: factMappingValuesTypes,
+        factMappingValueType: factMappingValueType,
+        factName: rootSelectedTestScenarioDataObject.name,
+        genericTypes: userSelectedTestScenarioObject.collectionGenericType ?? 
[],
+        selectedColumnIndex: selectedColumnMetadata!.index,
+      });
+
+      state.dispatch(state).table.updateSelectedColumn({
+        factMapping: updatedFactMapping,
+        index: selectedColumnMetadata!.index,
+        isBackground: isBackground,
+      });
+    });
+  }, [dataObjects, selectedColumnMetadata, testScenarioEditorStoreApi, 
treeViewStatus.activeItems]);
 
   const onClearSelectionClicked = useCallback((_event) => {
     setTreeViewStatus((prev) => {
diff --git a/packages/scesim-editor/src/i18n/TestScenarioEditorI18n.ts 
b/packages/scesim-editor/src/i18n/TestScenarioEditorI18n.ts
index 3fd56e9d833..3443243dde4 100644
--- a/packages/scesim-editor/src/i18n/TestScenarioEditorI18n.ts
+++ b/packages/scesim-editor/src/i18n/TestScenarioEditorI18n.ts
@@ -83,8 +83,10 @@ interface TestScenarioEditorDictionary extends 
ReferenceDictionary {
       dataObjectsDescriptionRule: string;
       descriptionDMN: string;
       descriptionRule: string;
+      emptyDataObjectsTitle: string;
       emptyDataObjectsTitleDMN: string;
       emptyDataObjectsTitleRule: string;
+      emptyDataObjectsDescription: string;
       emptyDataObjectsDescriptionDMN: string;
       emptyDataObjectsDescriptionRule: string;
       expandAll: string;
diff --git a/packages/scesim-editor/src/i18n/locales/en.ts 
b/packages/scesim-editor/src/i18n/locales/en.ts
index a3812a3b931..7fa17740fad 100644
--- a/packages/scesim-editor/src/i18n/locales/en.ts
+++ b/packages/scesim-editor/src/i18n/locales/en.ts
@@ -100,8 +100,10 @@ export const en: TestScenarioEditorI18n = {
         "To edit a test scenario definition, select a grid's column and assign 
it a DMN Node attribute using the below selector",
       descriptionRule:
         "To edit a test scenario definition, select a grid's column and assign 
it a Java Class field using the below selector",
+      emptyDataObjectsTitle: "No more properties",
       emptyDataObjectsTitleDMN: "No DMN Nodes",
       emptyDataObjectsTitleRule: "No Java Classes",
+      emptyDataObjectsDescription: "All the properties have been already 
assigned",
       emptyDataObjectsDescriptionDMN: "Impossible to retrieve the DMN Nodes 
data from the linked DMN file.",
       emptyDataObjectsDescriptionRule: "Impossible to retrieve the Java 
Classes from the project.",
       expandAll: "Expand all",
diff --git 
a/packages/scesim-editor/src/mutations/createNewDmnTypeTestScenario.ts 
b/packages/scesim-editor/src/mutations/createNewDmnTypeTestScenario.ts
index 688a636cf37..edea66531e9 100644
--- a/packages/scesim-editor/src/mutations/createNewDmnTypeTestScenario.ts
+++ b/packages/scesim-editor/src/mutations/createNewDmnTypeTestScenario.ts
@@ -39,6 +39,7 @@ const EMPTY_GIVEN_FACTMAPPING = {
   factAlias: "INSTANCE-1",
   factIdentifierName: "INSTANCE-1",
   factIdentifierClassName: "java.lang.Void",
+  genericTypes: undefined,
 };
 
 const EMPTY_EXPECT_FACTMAPPING = {
@@ -50,6 +51,7 @@ const EMPTY_EXPECT_FACTMAPPING = {
   factAlias: "INSTANCE-2",
   factIdentifierName: "INSTANCE-2",
   factIdentifierClassName: "java.lang.Void",
+  genericTypes: undefined,
 };
 
 type FactMapping = {
@@ -61,6 +63,7 @@ type FactMapping = {
   factAlias: string;
   factIdentifierName: string;
   factIdentifierClassName: string;
+  genericTypes: string[] | undefined;
 };
 
 /**
@@ -137,115 +140,78 @@ export function createNewDmnTypeTestScenario({
   });
 }
 
-function isSimpleType(type: string) {
-  return [
-    "Any",
-    "boolean",
-    "context",
-    "date",
-    "date and time",
-    "days and time duration",
-    "number",
-    "string",
-    "time",
-    "years and months duration",
-    "<Undefined>",
-  ].includes(type);
-}
-
 function generateFactMappingsAndFactMappingValuesFromDmnModel(
   drgElements: DMN15__tInputData[] | DMN15__tDecision[],
   expressionIdentifierType: "EXPECT" | "GIVEN",
-  itemDefinitionMap: Map<string, DMN15__tItemDefinition>
+  allItemDefinitionsMap: Map<string, DMN15__tItemDefinition>
 ) {
   const factMappingsToPush = [] as FactMapping[];
 
   drgElements.forEach((drgElement) => {
-    const itemDefinition = 
itemDefinitionMap.get(drgElement.variable!["@_typeRef"]!);
+    const itemDefinition = 
allItemDefinitionsMap.get(drgElement.variable!["@_typeRef"]!);
     if (!itemDefinition?.itemComponent || itemDefinition?.itemComponent.length 
=== 0) {
-      factMappingsToPush.push(
-        generateSimpleTypeFactMapping(
-          drgElement.variable!["@_typeRef"]!,
-          100,
-          [drgElement.variable!["@_name"]!],
-          expressionIdentifierType,
-          drgElement.variable!["@_name"]!,
-          drgElement.variable!["@_typeRef"]!
-        )
-      );
+      factMappingsToPush.push({
+        className: itemDefinition?.["@_isCollection"] ? "java.util.List" : 
drgElement.variable!["@_typeRef"]!,
+        columnWidth: 100,
+        expressionAlias: "value",
+        expressionElements: [drgElement.variable!["@_name"]!],
+        expressionIdentifierType: expressionIdentifierType,
+        factAlias: drgElement.variable!["@_name"]!,
+        factIdentifierName: drgElement.variable!["@_name"]!,
+        factIdentifierClassName: drgElement.variable!["@_typeRef"]!,
+        genericTypes: itemDefinition?.["@_isCollection"] ? 
[drgElement.variable!["@_typeRef"]!] : undefined,
+      });
     } else {
-      if (itemDefinition?.typeRef && 
isSimpleType(itemDefinition?.typeRef?.__$$text)) {
-        generateSimpleTypeFactMapping(
-          itemDefinition?.typeRef?.__$$text,
-          100,
-          [drgElement.variable!["@_name"]!],
-          expressionIdentifierType,
-          drgElement.variable!["@_name"]!,
-          drgElement.variable!["@_typeRef"]!
-        );
-      } else {
-        itemDefinition?.itemComponent!.forEach((itemComponent) => {
-          recursevlyNavigateItemComponent(
+      itemDefinition?.itemComponent!.forEach((itemComponent) => {
+        factMappingsToPush.push(
+          ...recursevlyNavigateItemComponent(
+            allItemDefinitionsMap,
             100,
-            factMappingsToPush,
             [drgElement.variable!["@_name"]!],
             expressionIdentifierType,
             itemComponent,
             drgElement.variable!["@_name"]!,
             drgElement.variable!["@_typeRef"]!
-          );
-        });
-      }
+          )
+        );
+      });
     }
   });
 
   return factMappingsToPush.sort((a, b) => 
a.expressionElements.join().localeCompare(b.expressionElements.join()));
 }
 
-function generateSimpleTypeFactMapping(
-  className: string,
-  columnWidth: number,
-  expressionElements: string[],
-  expressionIdentifierType: "EXPECT" | "GIVEN",
-  name: string,
-  typeRef: string
-) {
-  return {
-    className,
-    columnWidth,
-    expressionAlias: "value",
-    expressionElements: expressionElements,
-    expressionIdentifierType,
-    factAlias: name,
-    factIdentifierName: name,
-    factIdentifierClassName: typeRef,
-  };
-}
-
 function recursevlyNavigateItemComponent(
+  allItemDefinitionsMap: Map<string, DMN15__tItemDefinition>,
   columnWidth: number,
-  factMappingsToReturn: FactMapping[],
   expressionElements: string[],
   expressionIdentifierType: "EXPECT" | "GIVEN",
   itemComponent: DMN15__tItemDefinition,
   name: string,
   typeRef: string
 ) {
-  if (!itemComponent.typeRef && itemComponent.itemComponent) {
-    itemComponent.itemComponent.forEach((nestedItemComponent) => {
-      recursevlyNavigateItemComponent(
-        columnWidth,
-        factMappingsToReturn,
-        [...expressionElements, itemComponent["@_name"]],
-        expressionIdentifierType,
-        nestedItemComponent,
-        name,
-        typeRef
+  const factMappingsToReturn: FactMapping[] = [];
+  const currentItemDefinition = 
allItemDefinitionsMap.has(itemComponent?.typeRef?.__$$text ?? "")
+    ? allItemDefinitionsMap.get(itemComponent?.typeRef?.__$$text ?? "")
+    : itemComponent;
+
+  if (!currentItemDefinition?.typeRef && currentItemDefinition?.itemComponent) 
{
+    currentItemDefinition.itemComponent.forEach((nestedItemComponent) => {
+      factMappingsToReturn.push(
+        ...recursevlyNavigateItemComponent(
+          allItemDefinitionsMap,
+          columnWidth,
+          [...expressionElements, itemComponent["@_name"]],
+          expressionIdentifierType,
+          nestedItemComponent,
+          name,
+          typeRef
+        )
       );
     });
   } else {
     factMappingsToReturn.push({
-      className: itemComponent.typeRef!.__$$text,
+      className: itemComponent?.["@_isCollection"] ? "java.util.List" : 
itemComponent.typeRef!.__$$text,
       columnWidth: columnWidth,
       expressionAlias: [...expressionElements.slice(1), 
itemComponent["@_name"]].join("."),
       expressionElements: [...expressionElements, itemComponent["@_name"]],
@@ -253,6 +219,9 @@ function recursevlyNavigateItemComponent(
       factAlias: name,
       factIdentifierName: name,
       factIdentifierClassName: typeRef,
+      genericTypes: itemComponent?.["@_isCollection"] ? 
[itemComponent!.typeRef!.__$$text] : undefined,
     });
   }
+
+  return factMappingsToReturn;
 }
diff --git a/packages/scesim-editor/src/mutations/pushFactMappings.ts 
b/packages/scesim-editor/src/mutations/pushFactMappings.ts
index 338b1c76eed..91129cd29b1 100644
--- a/packages/scesim-editor/src/mutations/pushFactMappings.ts
+++ b/packages/scesim-editor/src/mutations/pushFactMappings.ts
@@ -41,14 +41,18 @@ export function pushFactMappings({
     factAlias: string;
     factIdentifierName: string;
     factIdentifierClassName: string;
+    genericTypes?: string[];
   }[];
 }) {
   factMappingsToPush.forEach((factMappingToPush) => {
-    const expressionElementss = 
factMappingToPush.expressionElements.map((expressionElement) => ({
+    const expressionElements = 
factMappingToPush.expressionElements.map((expressionElement) => ({
       step: {
         __$$text: expressionElement,
       },
     }));
+    const genericTypes = factMappingToPush.genericTypes?.map((genericType) => 
({
+      __$$text: genericType,
+    }));
 
     const newFactMapping = {
       className: { __$$text: factMappingToPush.className },
@@ -56,7 +60,7 @@ export function pushFactMappings({
       expressionAlias: { __$$text: factMappingToPush.expressionAlias },
       expressionElements: factMappingToPush.expressionElements
         ? {
-            ExpressionElement: expressionElementss,
+            ExpressionElement: expressionElements,
           }
         : undefined,
       expressionIdentifier: {
@@ -75,6 +79,11 @@ export function pushFactMappings({
         },
       },
       factMappingValueType: { __$$text: "NOT_EXPRESSION" },
+      genericTypes: factMappingToPush.genericTypes
+        ? {
+            string: genericTypes,
+          }
+        : undefined,
     };
 
     factMappingsModel.push(newFactMapping);
diff --git a/packages/scesim-editor/src/mutations/updateColumn.ts 
b/packages/scesim-editor/src/mutations/updateColumn.ts
index 1fb8215bfaa..98959d41505 100644
--- a/packages/scesim-editor/src/mutations/updateColumn.ts
+++ b/packages/scesim-editor/src/mutations/updateColumn.ts
@@ -36,6 +36,7 @@ export function updateColumn({
   factIdentifierClassName,
   factIdentifierName,
   factName,
+  genericTypes,
   selectedColumnIndex,
 }: {
   className: string;
@@ -50,20 +51,29 @@ export function updateColumn({
   factIdentifierClassName: string | undefined;
   factIdentifierName: string | undefined;
   factName: string;
+  genericTypes: string[];
   selectedColumnIndex: number;
 }): { updatedFactMapping: SceSim__FactMappingType } {
   const factMappingToUpdate = factMappings[selectedColumnIndex];
   factMappingToUpdate.className = { __$$text: className };
-  factMappingToUpdate.factAlias = { __$$text: factName };
-  factMappingToUpdate.factIdentifier.className = { __$$text: factClassName };
-  factMappingToUpdate.factIdentifier.name = { __$$text: factName };
-  factMappingToUpdate.factMappingValueType = { __$$text: factMappingValueType 
};
   factMappingToUpdate.expressionAlias = { __$$text: expressionAlias };
   factMappingToUpdate.expressionElements = {
     ExpressionElement: expressionElementsSteps.map((ee) => {
       return { step: { __$$text: ee } };
     }),
   };
+  factMappingToUpdate.factAlias = { __$$text: factName };
+  factMappingToUpdate.factIdentifier.className = { __$$text: factClassName };
+  factMappingToUpdate.factIdentifier.name = { __$$text: factName };
+  factMappingToUpdate.factMappingValueType = { __$$text: factMappingValueType 
};
+  factMappingToUpdate.genericTypes =
+    genericTypes.length > 0
+      ? {
+          string: genericTypes.map((genericType) => {
+            return { __$$text: genericType };
+          }),
+        }
+      : undefined;
 
   factMappingValuesTypes.forEach((fmv) => {
     const factMappingValues = fmv.factMappingValues.FactMappingValue!;
@@ -77,7 +87,7 @@ export function updateColumn({
     const factMappingValueToUpdate = 
factMappingValues[factMappingValueToUpdateIndex];
     factMappingValueToUpdate.factIdentifier.className = { __$$text: 
factClassName };
     factMappingValueToUpdate.factIdentifier.name = { __$$text: factName };
-    //factMappingValueToUpdate.rawValue = { __$$text: update.value, "@_class": 
"string" },  //TODO 2 related see kie-issues#1514
+    factMappingValueToUpdate.rawValue = undefined;
   });
 
   return { updatedFactMapping: JSON.parse(JSON.stringify(factMappingToUpdate)) 
};
diff --git a/packages/scesim-editor/src/store/TestScenarioEditorStore.ts 
b/packages/scesim-editor/src/store/TestScenarioEditorStore.ts
index ed80d205177..a03b50ede7b 100644
--- a/packages/scesim-editor/src/store/TestScenarioEditorStore.ts
+++ b/packages/scesim-editor/src/store/TestScenarioEditorStore.ts
@@ -52,8 +52,11 @@ export type TestScenarioAlert = {
 export type TestScenarioDataObject = {
   id: string;
   children?: TestScenarioDataObject[];
+  className?: string;
+  collectionGenericType?: string[];
   customBadgeContent?: string;
-  isSimpleTypeFact?: boolean;
+  expressionElements: string[];
+  hasBadge?: boolean;
   name: string;
 };
 
diff --git a/packages/scesim-editor/src/store/computed/computeDmnDataObjects.ts 
b/packages/scesim-editor/src/store/computed/computeDmnDataObjects.ts
index 3e766b389f8..85eac2c4ce3 100644
--- a/packages/scesim-editor/src/store/computed/computeDmnDataObjects.ts
+++ b/packages/scesim-editor/src/store/computed/computeDmnDataObjects.ts
@@ -38,10 +38,8 @@ export function computeDmnDataObjects(
 
   const dmnModel = 
externalModelsByNamespace?.get(settings.dmnNamespace!.__$$text);
 
-  /* CHECKS external DMN */
-
   if (dmnModel) {
-    const itemDefinitions = new Map(
+    const allItemDefinitionsMap = new Map(
       dmnModel.model.definitions.itemDefinition?.map(
         (itemDefinition) => [itemDefinition["@_name"], itemDefinition] as const
       )
@@ -55,10 +53,10 @@ export function computeDmnDataObjects(
     );
 
     const inpuDataObjects = inputDataElements?.map((inputDataElement) =>
-      createTestScenarioObjects(inputDataElement, itemDefinitions)
+      createTestScenarioObjects(inputDataElement, allItemDefinitionsMap)
     );
     const decisionDataObjects = decisionElements?.map((decisionElement) =>
-      createTestScenarioObjects(decisionElement, itemDefinitions)
+      createTestScenarioObjects(decisionElement, allItemDefinitionsMap)
     );
     dataObjects.push(...(inpuDataObjects ?? []), ...(decisionDataObjects ?? 
[]));
   }
@@ -68,88 +66,81 @@ export function computeDmnDataObjects(
 
 function createTestScenarioObjects(
   drgElement: DMN15__tInputData | DMN15__tDecision,
-  itemDefinitionMap: Map<string, DMN15__tItemDefinition>
+  allItemDefinitionsMap: Map<string, DMN15__tItemDefinition>
 ): TestScenarioDataObject {
-  const children: TestScenarioDataObject[] = [];
-
   const drgElementName = drgElement["@_name"];
   const drgElementTypeRef = drgElement!.variable?.["@_typeRef"];
-  const isDrgElementSimpleType = isSimpleType(drgElementTypeRef!);
-
-  if (isDrgElementSimpleType) {
-    children.push({
-      id: drgElementName.concat("."), //TO BE REVIEWED IN 
https://github.com/apache/incubator-kie-issues/issues/1514
-      name: "value",
-      customBadgeContent: drgElementTypeRef,
-      isSimpleTypeFact: isDrgElementSimpleType,
-    });
-  } else {
-    const itemDefinition = itemDefinitionMap.get(drgElementTypeRef!);
-    children.push(...createChildrenTestScenarioObjects(itemDefinition, 
drgElementName, drgElementTypeRef!));
-  }
+  const itemDefinition = drgElementTypeRef ? 
allItemDefinitionsMap.get(drgElementTypeRef) : undefined;
 
   return {
     id: drgElementName,
     name: drgElementName,
-    customBadgeContent: drgElementTypeRef,
-    children: children,
+    children: createChildrenTestScenarioObjects(
+      itemDefinition,
+      allItemDefinitionsMap,
+      [drgElementName],
+      drgElementTypeRef
+    ),
+    className: drgElementTypeRef,
+    customBadgeContent: drgElementTypeRef ?? "<Undefined>",
+    expressionElements: [drgElementName],
   };
 }
 
 function createChildrenTestScenarioObjects(
   itemDefinition: DMN15__tItemDefinition | undefined,
-  drgElementName: string,
-  drgElementTypeRef: string
+  allItemDefinitionsMap: Map<string, DMN15__tItemDefinition>,
+  expressionElements: string[],
+  rootDrgElementTypeRef: string | undefined
 ) {
   const children: TestScenarioDataObject[] = [];
 
   if (itemDefinition?.itemComponent && itemDefinition.itemComponent.length > 
0) {
     const childrenTestScenarioObjects = 
itemDefinition.itemComponent.map((itemComponent) => {
       const nestedChildren: TestScenarioDataObject[] = [];
+      const currentItemDefinition = 
allItemDefinitionsMap.has(itemComponent?.typeRef?.__$$text ?? "")
+        ? allItemDefinitionsMap.get(itemComponent?.typeRef?.__$$text ?? "")
+        : itemComponent;
 
-      if (!itemComponent.typeRef) {
+      if (!currentItemDefinition?.typeRef) {
         const ns = createChildrenTestScenarioObjects(
-          itemComponent,
-          drgElementName.concat(".").concat(itemComponent["@_name"]),
-          "?"
+          currentItemDefinition,
+          allItemDefinitionsMap,
+          [...expressionElements, itemComponent["@_name"]],
+          rootDrgElementTypeRef
         );
         nestedChildren.push(...ns);
       }
 
+      const isCollection = itemComponent["@_isCollection"] ?? false;
+      const name = itemComponent["@_name"];
+      const className = isCollection ? "java.util.List" : 
itemComponent.typeRef?.__$$text;
+
       return {
-        customBadgeContent: itemComponent.typeRef?.__$$text,
+        id: [...expressionElements, name].join("."),
+        hasBadge: !(className === undefined && nestedChildren.length > 0),
+        name: name,
         children: nestedChildren.length > 0 ? nestedChildren : undefined,
-        id: drgElementName.concat(".").concat(itemComponent["@_name"]),
-        isCollection: itemComponent["@_isCollection"],
-        name: itemComponent["@_name"],
+        className: className,
+        collectionGenericType: isCollection ? 
[itemComponent.typeRef!.__$$text] : undefined,
+        customBadgeContent: `${itemComponent.typeRef?.__$$text ?? 
"<Undefined>"}${isCollection ? "[]" : ""}`,
+        expressionElements: [...expressionElements, name],
       };
     });
     children.push(...childrenTestScenarioObjects);
   } else {
+    const isCollection = itemDefinition?.["@_isCollection"] ?? false;
+    const name = "value";
+
     children.push({
-      customBadgeContent: drgElementTypeRef,
-      id: drgElementName.concat("."), //TO BE REVIEWED IN 
https://github.com/apache/incubator-kie-issues/issues/1514
-      //isCollection: itemComponent["@_isCollection"],
-      name: "value",
-      //isSimpleTypeFact: isDrgElementSimpleType, TO DOUBLE CHECK
+      id: [...expressionElements, name].join("."),
+      name: name,
+      className: isCollection ? "java.util.List" : rootDrgElementTypeRef,
+      collectionGenericType: isCollection && rootDrgElementTypeRef ? 
[rootDrgElementTypeRef] : undefined,
+      customBadgeContent: `${rootDrgElementTypeRef ?? 
"<Undefined>"}${isCollection && rootDrgElementTypeRef ? "[]" : ""}`,
+      expressionElements: expressionElements,
     });
   }
 
   return children.sort((childA, childB) => 
childA.name.localeCompare(childB.name));
 }
-
-function isSimpleType(type: string) {
-  return [
-    "Any",
-    "boolean",
-    "context",
-    "date",
-    "date and time",
-    "days and time duration",
-    "number",
-    "string",
-    "time",
-    "years and months duration",
-    "<Undefined>",
-  ].includes(type);
-}
diff --git 
a/packages/scesim-editor/src/store/computed/computeTestScenarioDataObjects.ts 
b/packages/scesim-editor/src/store/computed/computeTestScenarioDataObjects.ts
index 4db465a65a5..456231a4eae 100644
--- 
a/packages/scesim-editor/src/store/computed/computeTestScenarioDataObjects.ts
+++ 
b/packages/scesim-editor/src/store/computed/computeTestScenarioDataObjects.ts
@@ -35,34 +35,50 @@ export function computeTestScenarioDataObjects(
     const factID = 
factsMappings[i].expressionElements!.ExpressionElement![0].step.__$$text;
     const dataObject = dataObjects.find((value) => value.id === factID);
     const isSimpleTypeFact = 
factsMappings[i].expressionElements!.ExpressionElement!.length === 1;
-    const propertyID = isSimpleTypeFact // TO BE REVIEWED IN 
https://github.com/apache/incubator-kie-issues/issues/1514
-      ? 
factsMappings[i].expressionElements!.ExpressionElement![0].step.__$$text.concat(".")
+    const isCollection = (factsMappings[i].genericTypes?.string?.length ?? 0) 
> 0;
+    const propertyID = isSimpleTypeFact
+      ? 
factsMappings[i].expressionElements!.ExpressionElement![0].step.__$$text.concat(".").concat("value")
       : factsMappings[i]
           .expressionElements!.ExpressionElement!.map((expressionElement) => 
expressionElement.step.__$$text)
           .join(".");
     const propertyName = isSimpleTypeFact
       ? "value"
       : 
factsMappings[i].expressionElements!.ExpressionElement!.slice(-1)[0].step.__$$text;
+    const factClassName = factsMappings[i].factIdentifier.className!.__$$text 
?? "<Undefined>";
+    const propertyClassName = factsMappings[i].className!.__$$text ?? 
"<Undefined>";
 
     if (dataObject) {
       if (!dataObject.children?.some((value) => value.id === propertyID)) {
         dataObject.children!.push({
           id: propertyID,
-          customBadgeContent: factsMappings[i].className.__$$text,
-          isSimpleTypeFact: isSimpleTypeFact,
+          className: propertyClassName,
+          customBadgeContent: isCollection
+            ? 
`${factsMappings[i].genericTypes!.string![0].__$$text}${isCollection ? "[]" : 
""}`
+            : propertyClassName,
+          expressionElements: 
factsMappings[i].expressionElements!.ExpressionElement!.map(
+            (element) => element.step.__$$text
+          ),
           name: propertyName,
         });
       }
     } else {
       dataObjects.push({
         id: factID,
+        className: factClassName,
+        customBadgeContent: factClassName,
+        expressionElements: [factID],
         name: factsMappings[i].factAlias!.__$$text,
-        customBadgeContent: 
factsMappings[i].factIdentifier!.className!.__$$text,
         children: [
           {
             id: propertyID,
+            className: propertyClassName,
+            customBadgeContent: isCollection
+              ? 
`${factsMappings[i].genericTypes!.string![0].__$$text}${isCollection ? "[]" : 
""}`
+              : propertyClassName,
+            expressionElements: 
factsMappings[i].expressionElements!.ExpressionElement!.map(
+              (element) => element.step.__$$text
+            ),
             name: propertyName,
-            customBadgeContent: factsMappings[i].className.__$$text,
           },
         ],
       });
diff --git a/packages/scesim-editor/src/table/TestScenarioTable.tsx 
b/packages/scesim-editor/src/table/TestScenarioTable.tsx
index 944856f3341..d9742146e02 100644
--- a/packages/scesim-editor/src/table/TestScenarioTable.tsx
+++ b/packages/scesim-editor/src/table/TestScenarioTable.tsx
@@ -112,11 +112,19 @@ function TestScenarioTable({
      In case of RULE Scenario, the Data Type is a FQCN (eg. java.lang.String). 
So, the label will take the class name only
      In any case, if the Data Type ends with a "Void", that means the type has 
not been assigned, so we show Undefined. */
   const determineDataTypeLabel = useCallback(
-    (dataType: string) => {
+    (dataType: string, genericTypes: string[]) => {
       let dataTypeLabel = dataType;
       if (testScenarioType === "RULE") {
         dataTypeLabel = dataTypeLabel.split(".").pop() ?? dataTypeLabel;
       }
+      /* List Type */
+      if (genericTypes.length == 1) {
+        dataTypeLabel = testScenarioType === "RULE" ? 
`${dataTypeLabel}<${genericTypes[0]}>` : `${genericTypes[0]}[]`;
+      }
+      /* Map Type */
+      if (testScenarioType === "RULE" && genericTypes.length == 2) {
+        dataTypeLabel = 
`${dataTypeLabel}<${genericTypes[0]},${genericTypes[1]}>`;
+      }
       return !dataTypeLabel || dataTypeLabel.endsWith("Void") ? "<Undefined>" 
: dataTypeLabel;
     },
     [testScenarioType]
@@ -153,15 +161,13 @@ function TestScenarioTable({
         dataType:
           isDescriptionColumn || factMapping.factMappingValueType?.__$$text 
=== "EXPRESSION"
             ? undefined
-            : determineDataTypeLabel(factMapping.className.__$$text),
+            : determineDataTypeLabel(
+                factMapping.className.__$$text,
+                factMapping.genericTypes?.string?.map((genericType) => 
genericType.__$$text) ?? []
+              ),
         groupType: 
factMapping.expressionIdentifier.type!.__$$text.toLowerCase(),
         id: factMapping!.expressionIdentifier.name!.__$$text,
         isRowIndexColumn: false,
-        // isInlineEditable: isDescriptionColumn         **TODO NOT SURE IF IT 
MAKES SENSE TO IMPLEMENT IT
-        //   ? false
-        //   : assetType === TestScenarioType[TestScenarioType.RULE]
-        //   ? true
-        //   : false,
         label: isDescriptionColumn ? factMapping.factAlias.__$$text : 
factMapping.expressionAlias!.__$$text,
         minWidth: isDescriptionColumn ? 300 : 100,
         setWidth: setColumnWidth(factMappingIndex),
@@ -183,7 +189,7 @@ function TestScenarioTable({
 
       return {
         accessor: instanceID,
-        dataType: 
determineDataTypeLabel(factMapping.factIdentifier.className!.__$$text),
+        dataType: 
determineDataTypeLabel(factMapping.factIdentifier.className!.__$$text, []),
         groupType: groupType.toLowerCase(),
         id: instanceID,
         isRowIndexColumn: false,
diff --git a/packages/scesim-editor/stories/examples/AvailableDMNModels.ts 
b/packages/scesim-editor/stories/examples/AvailableDMNModels.ts
index db0e3e8c55e..4b135055404 100644
--- a/packages/scesim-editor/stories/examples/AvailableDMNModels.ts
+++ b/packages/scesim-editor/stories/examples/AvailableDMNModels.ts
@@ -20,18 +20,28 @@
 import * as TestScenarioEditor from "../../src/TestScenarioEditor";
 import { getMarshaller } from "@kie-tools/dmn-marshaller";
 import { normalize } from 
"@kie-tools/dmn-marshaller/dist/normalization/normalize";
-import { EMPTY, LOAN_PRE_QUALIFICATION, SIMPLE, TRAFFIC_VIOLATION } from 
"./ExternalDmnModels";
+import { COLLECTION, EMPTY, LOAN_PRE_QUALIFICATION, MIXED, SIMPLE, 
TRAFFIC_VIOLATION } from "./ExternalDmnModels";
 
 export const availableModels: TestScenarioEditor.ExternalDmn[] = [
+  {
+    model: normalize(getMarshaller(COLLECTION, { upgradeTo: "latest" 
}).parser.parse()),
+    svg: "",
+    normalizedPosixPathRelativeToTheOpenFile: 
"dev-webapp/available-dmn-models/collection.dmn",
+  },
+  {
+    model: normalize(getMarshaller(EMPTY, { upgradeTo: "latest" 
}).parser.parse()),
+    svg: "",
+    normalizedPosixPathRelativeToTheOpenFile: 
"dev-webapp/available-dmn-models/empty.dmn",
+  },
   {
     model: normalize(getMarshaller(LOAN_PRE_QUALIFICATION, { upgradeTo: 
"latest" }).parser.parse()),
     svg: "",
     normalizedPosixPathRelativeToTheOpenFile: 
"dev-webapp/available-dmn-models/loan-pre-qualification.dmn",
   },
   {
-    model: normalize(getMarshaller(TRAFFIC_VIOLATION, { upgradeTo: "latest" 
}).parser.parse()),
+    model: normalize(getMarshaller(MIXED, { upgradeTo: "latest" 
}).parser.parse()),
     svg: "",
-    normalizedPosixPathRelativeToTheOpenFile: 
"dev-webapp/available-dmn-models/traffic-violation.dmn",
+    normalizedPosixPathRelativeToTheOpenFile: 
"dev-webapp/available-dmn-models/mixed.dmn",
   },
   {
     model: normalize(getMarshaller(SIMPLE, { upgradeTo: "latest" 
}).parser.parse()),
@@ -39,9 +49,9 @@ export const availableModels: 
TestScenarioEditor.ExternalDmn[] = [
     normalizedPosixPathRelativeToTheOpenFile: 
"dev-webapp/available-dmn-models/simple.dmn",
   },
   {
-    model: normalize(getMarshaller(EMPTY, { upgradeTo: "latest" 
}).parser.parse()),
+    model: normalize(getMarshaller(TRAFFIC_VIOLATION, { upgradeTo: "latest" 
}).parser.parse()),
     svg: "",
-    normalizedPosixPathRelativeToTheOpenFile: 
"dev-webapp/available-dmn-models/empty.dmn",
+    normalizedPosixPathRelativeToTheOpenFile: 
"dev-webapp/available-dmn-models/traffic-violation.dmn",
   },
 ];
 
diff --git a/packages/scesim-editor/stories/examples/ExternalDmnModels.ts 
b/packages/scesim-editor/stories/examples/ExternalDmnModels.ts
index 85859889783..bc0e41b6da5 100644
--- a/packages/scesim-editor/stories/examples/ExternalDmnModels.ts
+++ b/packages/scesim-editor/stories/examples/ExternalDmnModels.ts
@@ -1002,7 +1002,7 @@ export const TRAFFIC_VIOLATION = `<?xml version='1.0' 
encoding='UTF-8'?>
 </dmn:definitions>`;
 
 export const SIMPLE = `<?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/_0457D4F2-02B6-4A3D-957F-8F971A8321BC"; 
id="_DE888083-9CD8-44DC-BE0A-0EC85244DE3B" 
name="DMN_44D5E2A8-EC16-45A8-8797-1437 [...]
+<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/_0457D4F2-02B6-4A3D-957F-8F971A8321BC"; 
id="_DE888083-9CD8-44DC-BE0A-0EC85244DE3B" name="Simple">
   <inputData name="Input" id="_926B9E31-3CEA-4A0E-8A66-97F875EFB428">
     <variable name="Input" id="_9B4713BA-E468-447E-9649-91E108CB2F4F" 
typeRef="number" />
   </inputData>
@@ -1011,6 +1011,9 @@ export const SIMPLE = `<?xml version="1.0" 
encoding="UTF-8" ?>
     <informationRequirement id="_6F72FA6A-A6E8-403D-8AB7-192FB474878E">
       <requiredInput href="#_926B9E31-3CEA-4A0E-8A66-97F875EFB428" />
     </informationRequirement>
+    <literalExpression id="_1E199E0A-2CC3-4EEE-AA8C-B4F5320EE1DE">
+      <text>Input &gt; 18<text>
+    </literalExpression>
   </decision>
   <dmndi:DMNDI>
     <dmndi:DMNDiagram id="_27FA44E1-3CD0-4B6F-A0A4-1D9862D52B87" name="Default 
DRD" useAlternativeInputDataShape="false">
@@ -1036,3 +1039,149 @@ export const SIMPLE = `<?xml version="1.0" 
encoding="UTF-8" ?>
 export const EMPTY = `<?xml version="1.0" encoding="UTF-8" ?>
 <definitions xmlns="https://www.omg.org/spec/DMN/20230324/MODEL/"; 
expressionLanguage="https://www.omg.org/spec/DMN/20230324/FEEL/"; 
namespace="https://kie.org/dmn/_14487CEE-1B30-453E-976D-C11ED911548F"; 
id="_6FEE4554-BE5D-4F30-B523-6DFDA563221A" name="Empty" 
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"; />
 `;
+
+export const COLLECTION = `<?xml version="1.0" encoding="UTF-8"?>
+<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/"; 
xmlns="https://kie.apache.org/dmn/_D1C37750-2078-4CB7-AF77-850947718867"; 
xmlns:feel="http://www.omg.org/spec/DMN/20180521/FEEL/"; 
xmlns:kie="http://www.drools.org/kie/dmn/1.2"; 
xmlns:dmndi="http://www.omg.org/spec/DMN/20180521/DMNDI/"; 
xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/"; 
xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/"; 
id="_DF7B05D2-BB62-417C-B852-48E260429F21" name="Collection" 
typeLanguage="http:// [...]
+  <dmn:extensionElements/>
+  <dmn:itemDefinition id="_C0DF58CA-6097-462D-A0F8-29D8FC870F11" 
name="tNumber" isCollection="true">
+    <dmn:typeRef>number</dmn:typeRef>
+  </dmn:itemDefinition>
+  <dmn:itemDefinition id="_954DFA6D-DC7D-4690-9250-0FB0776B192B" 
name="tComplex" isCollection="false">
+    <dmn:itemComponent id="_33427425-A5EC-4D7A-BAE0-5A16D46D6A11" name="nums" 
isCollection="true">
+      <dmn:typeRef>number</dmn:typeRef>
+    </dmn:itemComponent>
+  </dmn:itemDefinition>
+  <dmn:decision id="_57337DE2-FDB3-448C-BA51-FF7BDFF1E1F9" name="output">
+    <dmn:extensionElements/>
+    <dmn:variable id="_52E699A0-A156-4B6E-9ECC-78285EB99D74" name="output" 
typeRef="boolean"/>
+    <dmn:informationRequirement id="_A22D752E-3277-4976-BCD2-25A7E42C5CA1">
+      <dmn:requiredInput href="#_9E503F9E-B9F2-4B07-82D7-2351BC64D343"/>
+    </dmn:informationRequirement>
+    <dmn:informationRequirement id="_7F7CA568-DF66-43FA-80FF-0A2CC82DA27B">
+      <dmn:requiredInput href="#_83AD1836-45E9-47EE-893A-C252B382AF30"/>
+    </dmn:informationRequirement>
+    <dmn:literalExpression id="_B98A2F29-8885-4D1C-9401-37BAA94F9201">
+      <dmn:text>sum(input) + sum(input2.nums) &gt; 100</dmn:text>
+    </dmn:literalExpression>
+  </dmn:decision>
+  <dmn:inputData id="_9E503F9E-B9F2-4B07-82D7-2351BC64D343" name="input">
+    <dmn:extensionElements/>
+    <dmn:variable id="_F44A9324-0AAC-4020-BABD-B637F51B8A74" name="input" 
typeRef="tNumber"/>
+  </dmn:inputData>
+  <dmn:inputData id="_83AD1836-45E9-47EE-893A-C252B382AF30" name="input2">
+    <dmn:extensionElements/>
+    <dmn:variable id="_9265B616-6D06-4348-A3E0-42A3C2C6C160" name="input2" 
typeRef="tComplex"/>
+  </dmn:inputData>
+  <dmndi:DMNDI>
+    <dmndi:DMNDiagram id="_57229743-5CA8-4A4E-9853-6D080A360DB8" name="DRG">
+      <di:extension>
+        <kie:ComponentsWidthsExtension>
+          <kie:ComponentWidths 
dmnElementRef="_B98A2F29-8885-4D1C-9401-37BAA94F9201">
+            <kie:width>266</kie:width>
+          </kie:ComponentWidths>
+        </kie:ComponentsWidthsExtension>
+      </di:extension>
+      <dmndi:DMNShape id="dmnshape-drg-_57337DE2-FDB3-448C-BA51-FF7BDFF1E1F9" 
dmnElementRef="_57337DE2-FDB3-448C-BA51-FF7BDFF1E1F9" isCollapsed="false">
+        <dmndi:DMNStyle>
+          <dmndi:FillColor red="255" green="255" blue="255"/>
+          <dmndi:StrokeColor red="0" green="0" blue="0"/>
+          <dmndi:FontColor red="0" green="0" blue="0"/>
+        </dmndi:DMNStyle>
+        <dc:Bounds x="198" y="156" width="100" height="50"/>
+        <dmndi:DMNLabel/>
+      </dmndi:DMNShape>
+      <dmndi:DMNShape id="dmnshape-drg-_9E503F9E-B9F2-4B07-82D7-2351BC64D343" 
dmnElementRef="_9E503F9E-B9F2-4B07-82D7-2351BC64D343" isCollapsed="false">
+        <dmndi:DMNStyle>
+          <dmndi:FillColor red="255" green="255" blue="255"/>
+          <dmndi:StrokeColor red="0" green="0" blue="0"/>
+          <dmndi:FontColor red="0" green="0" blue="0"/>
+        </dmndi:DMNStyle>
+        <dc:Bounds x="432" y="156" width="100" height="50"/>
+        <dmndi:DMNLabel/>
+      </dmndi:DMNShape>
+      <dmndi:DMNShape id="dmnshape-drg-_83AD1836-45E9-47EE-893A-C252B382AF30" 
dmnElementRef="_83AD1836-45E9-47EE-893A-C252B382AF30" isCollapsed="false">
+        <dmndi:DMNStyle>
+          <dmndi:FillColor red="255" green="255" blue="255"/>
+          <dmndi:StrokeColor red="0" green="0" blue="0"/>
+          <dmndi:FontColor red="0" green="0" blue="0"/>
+        </dmndi:DMNStyle>
+        <dc:Bounds x="432.29906542056074" y="251" width="100" height="50"/>
+        <dmndi:DMNLabel/>
+      </dmndi:DMNShape>
+      <dmndi:DMNEdge 
id="dmnedge-drg-_A22D752E-3277-4976-BCD2-25A7E42C5CA1-AUTO-TARGET" 
dmnElementRef="_A22D752E-3277-4976-BCD2-25A7E42C5CA1">
+        <di:waypoint x="482" y="181"/>
+        <di:waypoint x="298" y="181"/>
+      </dmndi:DMNEdge>
+      <dmndi:DMNEdge 
id="dmnedge-drg-_7F7CA568-DF66-43FA-80FF-0A2CC82DA27B-AUTO-TARGET" 
dmnElementRef="_7F7CA568-DF66-43FA-80FF-0A2CC82DA27B">
+        <di:waypoint x="482.29906542056074" y="276"/>
+        <di:waypoint x="248" y="206"/>
+      </dmndi:DMNEdge>
+    </dmndi:DMNDiagram>
+  </dmndi:DMNDI>
+</dmn:definitions>`;
+
+export const MIXED = `<?xml version="1.0" encoding="UTF-8"?>
+<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/"; 
xmlns="https://kie.apache.org/dmn/_1931BC43-1301-402C-BC9F-71BB53BCFCE4"; 
xmlns:feel="http://www.omg.org/spec/DMN/20180521/FEEL/"; 
xmlns:kie="http://www.drools.org/kie/dmn/1.2"; 
xmlns:dmndi="http://www.omg.org/spec/DMN/20180521/DMNDI/"; 
xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/"; 
xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/"; 
id="_AFA9A565-A5DD-4E81-BD39-238C9B883861" name="Mixed" 
typeLanguage="http://www.o [...]
+  <dmn:extensionElements/>
+  <dmn:itemDefinition id="_A12C9187-482E-452F-9056-0F0442CBEE12" 
name="tPerson" isCollection="false">
+    <dmn:itemComponent id="_DDDA535A-8B9B-48A4-AAEC-0A6552C205F4" name="pilu" 
isCollection="false">
+      <dmn:typeRef>tPuppa</dmn:typeRef>
+    </dmn:itemComponent>
+    <dmn:itemComponent id="_A809FEBD-76AA-429C-B41F-F788B08F9C3F" name="asd" 
isCollection="false">
+      <dmn:typeRef>boolean</dmn:typeRef>
+    </dmn:itemComponent>
+    <dmn:itemComponent id="_51DDD487-674B-4E83-93A2-E2F3C20BCB6B" name="lol" 
isCollection="false">
+      <dmn:itemComponent id="_227DE176-0E22-494A-AEDE-177B8A6FD5E5" 
name="Insert a name" isCollection="false">
+        <dmn:typeRef>Any</dmn:typeRef>
+      </dmn:itemComponent>
+      <dmn:itemComponent id="_B5C5247B-3761-4B3C-AD63-6EC2916CF058" 
name="mimm" isCollection="false">
+        <dmn:typeRef>string</dmn:typeRef>
+      </dmn:itemComponent>
+    </dmn:itemComponent>
+  </dmn:itemDefinition>
+  <dmn:itemDefinition id="_3788741C-24FC-427E-9D5E-E9C2AFAE89A8" name="tPuppa" 
isCollection="false">
+    <dmn:itemComponent id="_DB77958D-204D-49AE-A1D9-581902C4D775" name="asd2" 
isCollection="false">
+      <dmn:typeRef>time</dmn:typeRef>
+    </dmn:itemComponent>
+  </dmn:itemDefinition>
+  <dmn:decision id="_3CA38BE7-A453-4A80-B148-A076F504C1BA" name="Decision-1">
+    <dmn:extensionElements/>
+    <dmn:variable id="_C876C460-CD7D-4310-803F-169214F65868" name="Decision-1" 
typeRef="tPerson"/>
+    <dmn:informationRequirement id="_A1DAAF90-D88D-4C7F-B501-15794E7D0CE0">
+      <dmn:requiredInput href="#_81F47FD0-58AD-4FEF-86A0-8B40797D5CBC"/>
+    </dmn:informationRequirement>
+  </dmn:decision>
+  <dmn:inputData id="_81F47FD0-58AD-4FEF-86A0-8B40797D5CBC" name="InputData-1">
+    <dmn:extensionElements/>
+    <dmn:variable id="_0D82E685-2D68-4ECA-88F7-280309E432CC" 
name="InputData-1"/>
+  </dmn:inputData>
+  <dmndi:DMNDI>
+    <dmndi:DMNDiagram id="_10C4777A-A4D1-4D5F-BBAF-F36726F86E44" name="DRG">
+      <di:extension>
+        <kie:ComponentsWidthsExtension/>
+      </di:extension>
+      <dmndi:DMNShape id="dmnshape-drg-_3CA38BE7-A453-4A80-B148-A076F504C1BA" 
dmnElementRef="_3CA38BE7-A453-4A80-B148-A076F504C1BA" isCollapsed="false">
+        <dmndi:DMNStyle>
+          <dmndi:FillColor red="255" green="255" blue="255"/>
+          <dmndi:StrokeColor red="0" green="0" blue="0"/>
+          <dmndi:FontColor red="0" green="0" blue="0"/>
+        </dmndi:DMNStyle>
+        <dc:Bounds x="157" y="103" width="100" height="50"/>
+        <dmndi:DMNLabel/>
+      </dmndi:DMNShape>
+      <dmndi:DMNShape id="dmnshape-drg-_81F47FD0-58AD-4FEF-86A0-8B40797D5CBC" 
dmnElementRef="_81F47FD0-58AD-4FEF-86A0-8B40797D5CBC" isCollapsed="false">
+        <dmndi:DMNStyle>
+          <dmndi:FillColor red="255" green="255" blue="255"/>
+          <dmndi:StrokeColor red="0" green="0" blue="0"/>
+          <dmndi:FontColor red="0" green="0" blue="0"/>
+        </dmndi:DMNStyle>
+        <dc:Bounds x="191" y="298" width="100" height="50"/>
+        <dmndi:DMNLabel/>
+      </dmndi:DMNShape>
+      <dmndi:DMNEdge 
id="dmnedge-drg-_A1DAAF90-D88D-4C7F-B501-15794E7D0CE0-AUTO-TARGET" 
dmnElementRef="_A1DAAF90-D88D-4C7F-B501-15794E7D0CE0">
+        <di:waypoint x="241" y="323"/>
+        <di:waypoint x="207" y="153"/>
+      </dmndi:DMNEdge>
+    </dmndi:DMNDiagram>
+  </dmndi:DMNDI>
+</dmn:definitions>`;
diff --git a/packages/scesim-editor/stories/misc/collection/Collection.mdx 
b/packages/scesim-editor/stories/misc/collection/Collection.mdx
new file mode 100644
index 00000000000..b35f7ec5bf0
--- /dev/null
+++ b/packages/scesim-editor/stories/misc/collection/Collection.mdx
@@ -0,0 +1,46 @@
+{/* 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 { Meta, Story } from "@storybook/blocks";
+import * as Collection from "./Collection.stories";
+
+<Meta title="MDX/Collection" of={Collection} />
+
+# Collection
+
+To start off, use contextual menus in the table to insert or edit or delete 
new columns and rows.
+
+Before defining the individual test scenarios, verify the instance and field 
mappings for each column. If any changes are necessary, use the DMN Nodes 
selector to update the mapping.
+
+If the same GIVEN data is shared with the multiple test scenarios, you can use 
the Background tab to define them only once. The way to create a column in the 
Background tab is the same as of the Test Scenario tab.
+
+Now, define the test scenarios. Each cell of the table must contain a valid 
expression.
+
+Values in the GIVEN part of the table are evaluated as literal expressions, 
whereas values in the EXPECT section are evaluated as unary expressions. The 
correctness of these unary tests is verified using the results from a DMN 
evaluation.
+
+DMN-based scenarios use the FEEL expression language. Supported data types are:
+
+- numbers and strings (strings must be delimited by quotation marks), for 
example "John Doe" or ""
+- boolean values (true, false, and null)
+- dates and time, for example date("2019-05-13") or time("14:10:00+02:00")
+- Days and time duration, for example duration("P1DT23H12M30S")
+- Years and months duration, for example duration("P3Y5M")
+- functions
+- contexts, for example \{x : 5, even : false, type : "integer number"\}
+- ranges and lists, for example [1 .. 10] or [2, 3, 4, 5]
+- In EXPECT section the type could also just a boolean with the result of the 
assertion and you can use ? identifier to access value to check.
+- An empty cell is skipped from the evaluation.
diff --git 
a/packages/scesim-editor/stories/misc/collection/Collection.stories.tsx 
b/packages/scesim-editor/stories/misc/collection/Collection.stories.tsx
new file mode 100644
index 00000000000..545a60ac35c
--- /dev/null
+++ b/packages/scesim-editor/stories/misc/collection/Collection.stories.tsx
@@ -0,0 +1,277 @@
+/*
+ * 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 type { Meta, StoryObj } from "@storybook/react";
+import { getMarshaller } from "@kie-tools/scesim-marshaller";
+import { TestScenarioEditor } from "../../../src/TestScenarioEditor";
+import { SceSimEditorWrapper, StorybookTestScenarioEditorProps } from 
"../../scesimEditorStoriesWrapper";
+import { normalize } from 
"@kie-tools/dmn-marshaller/dist/normalization/normalize";
+import { getMarshaller as getDmnMarshaller } from "@kie-tools/dmn-marshaller";
+import { COLLECTION } from "../../examples/ExternalDmnModels";
+
+export const collectionFileName = "collection.scesim";
+export const collectionScesim = `<?xml version="1.0" encoding="UTF-8" ?>
+<ScenarioSimulationModel xmlns="https://kie.org/scesim/1.8"; version="1.8">
+  <simulation>
+    <scesimModelDescriptor>
+      <factMappings>
+        <FactMapping>
+          <expressionElements />
+          <expressionIdentifier>
+            <name>Index</name>
+            <type>OTHER</type>
+          </expressionIdentifier>
+          <factIdentifier>
+            <name>#</name>
+            <className>java.lang.Integer</className>
+          </factIdentifier>
+          <className>java.lang.Integer</className>
+          <factAlias>#</factAlias>
+          <columnWidth>70</columnWidth>
+          <factMappingValueType>NOT_EXPRESSION</factMappingValueType>
+        </FactMapping>
+        <FactMapping>
+          <expressionElements />
+          <expressionIdentifier>
+            <name>Description</name>
+            <type>OTHER</type>
+          </expressionIdentifier>
+          <factIdentifier>
+            <name>Scenario description</name>
+            <className>java.lang.String</className>
+          </factIdentifier>
+          <className>java.lang.String</className>
+          <factAlias>Scenario description</factAlias>
+          <columnWidth>300</columnWidth>
+          <factMappingValueType>NOT_EXPRESSION</factMappingValueType>
+        </FactMapping>
+        <FactMapping>
+          <expressionElements>
+            <ExpressionElement>
+              <step>input</step>
+            </ExpressionElement>
+          </expressionElements>
+          <expressionIdentifier>
+            <name>_33694C8E-C795-435F-B0F0-F1101F9DE403</name>
+            <type>GIVEN</type>
+          </expressionIdentifier>
+          <factIdentifier>
+            <name>input</name>
+            <className>tNumber</className>
+          </factIdentifier>
+          <className>java.util.List</className>
+          <factAlias>input</factAlias>
+          <expressionAlias>value</expressionAlias>
+          <genericTypes>
+            <string>tNumber</string>
+          </genericTypes>
+          <columnWidth>141</columnWidth>
+          <factMappingValueType>NOT_EXPRESSION</factMappingValueType>
+        </FactMapping>
+        <FactMapping>
+          <expressionElements>
+            <ExpressionElement>
+              <step>input2</step>
+            </ExpressionElement>
+            <ExpressionElement>
+              <step>nums</step>
+            </ExpressionElement>
+          </expressionElements>
+          <expressionIdentifier>
+            <name>_11DBB39A-5749-420D-A007-3A0D19A66916</name>
+            <type>GIVEN</type>
+          </expressionIdentifier>
+          <factIdentifier>
+            <name>input2</name>
+            <className>tComplex</className>
+          </factIdentifier>
+          <className>java.util.List</className>
+          <factAlias>input2</factAlias>
+          <expressionAlias>nums</expressionAlias>
+          <genericTypes>
+            <string>number</string>
+          </genericTypes>
+          <columnWidth>157</columnWidth>
+          <factMappingValueType>NOT_EXPRESSION</factMappingValueType>
+        </FactMapping>
+        <FactMapping>
+          <expressionElements>
+            <ExpressionElement>
+              <step>output</step>
+            </ExpressionElement>
+          </expressionElements>
+          <expressionIdentifier>
+            <name>_E38BFF0C-040B-464E-8C18-7BD1C7372EEA</name>
+            <type>EXPECT</type>
+          </expressionIdentifier>
+          <factIdentifier>
+            <name>output</name>
+            <className>boolean</className>
+          </factIdentifier>
+          <className>boolean</className>
+          <factAlias>output</factAlias>
+          <expressionAlias>value</expressionAlias>
+          <columnWidth>100</columnWidth>
+          <factMappingValueType>NOT_EXPRESSION</factMappingValueType>
+        </FactMapping>
+      </factMappings>
+    </scesimModelDescriptor>
+    <scesimData>
+      <Scenario>
+        <factMappingValues>
+          <FactMappingValue>
+            <factIdentifier>
+              <name>#</name>
+              <className>java.lang.Integer</className>
+            </factIdentifier>
+            <expressionIdentifier>
+              <name>Index</name>
+              <type>OTHER</type>
+            </expressionIdentifier>
+            <rawValue class="string">1</rawValue>
+          </FactMappingValue>
+          <FactMappingValue>
+            <factIdentifier>
+              <name>Scenario description</name>
+              <className>java.lang.String</className>
+            </factIdentifier>
+            <expressionIdentifier>
+              <name>Description</name>
+              <type>OTHER</type>
+            </expressionIdentifier>
+          </FactMappingValue>
+          <FactMappingValue>
+            <factIdentifier>
+              <name>input</name>
+              <className>tNumber</className>
+            </factIdentifier>
+            <expressionIdentifier>
+              <name>_33694C8E-C795-435F-B0F0-F1101F9DE403</name>
+              <type>GIVEN</type>
+            </expressionIdentifier>
+            <rawValue class="string">&quot;[10,20,30]&quot;</rawValue>
+          </FactMappingValue>
+          <FactMappingValue>
+            <factIdentifier>
+              <name>input2</name>
+              <className>tComplex</className>
+            </factIdentifier>
+            <expressionIdentifier>
+              <name>_11DBB39A-5749-420D-A007-3A0D19A66916</name>
+              <type>GIVEN</type>
+            </expressionIdentifier>
+            <rawValue class="string">&quot;[40,50,60]&quot;</rawValue>
+          </FactMappingValue>
+          <FactMappingValue>
+            <factIdentifier>
+              <name>output</name>
+              <className>boolean</className>
+            </factIdentifier>
+            <expressionIdentifier>
+              <name>_E38BFF0C-040B-464E-8C18-7BD1C7372EEA</name>
+              <type>EXPECT</type>
+            </expressionIdentifier>
+            <rawValue class="string">true</rawValue>
+          </FactMappingValue>
+        </factMappingValues>
+      </Scenario>
+    </scesimData>
+  </simulation>
+  <background>
+    <scesimModelDescriptor>
+      <factMappings>
+        <FactMapping>
+          <expressionElements />
+          <expressionIdentifier>
+            <name>1|1</name>
+            <type>GIVEN</type>
+          </expressionIdentifier>
+          <factIdentifier>
+            <name>Empty</name>
+            <className>java.lang.Void</className>
+          </factIdentifier>
+          <className>java.lang.Void</className>
+          <factAlias>INSTANCE-1</factAlias>
+          <expressionAlias>PROPERTY-1</expressionAlias>
+          <columnWidth>150</columnWidth>
+          <factMappingValueType>NOT_EXPRESSION</factMappingValueType>
+        </FactMapping>
+      </factMappings>
+    </scesimModelDescriptor>
+    <scesimData>
+      <BackgroundData>
+        <factMappingValues>
+          <FactMappingValue>
+            <factIdentifier>
+              <name>Empty</name>
+              <className>java.lang.Void</className>
+            </factIdentifier>
+            <expressionIdentifier>
+              <name>1|1</name>
+              <type>GIVEN</type>
+            </expressionIdentifier>
+          </FactMappingValue>
+        </factMappingValues>
+      </BackgroundData>
+    </scesimData>
+  </background>
+  <settings>
+    <dmnFilePath>dev-webapp/available-dmn-models/collection.dmn</dmnFilePath>
+    <type>DMN</type>
+    
<dmnNamespace>https://kie.apache.org/dmn/_D1C37750-2078-4CB7-AF77-850947718867</dmnNamespace>
+    <dmnName>Collection</dmnName>
+    <skipFromBuild>false</skipFromBuild>
+  </settings>
+  <imports>
+    <imports />
+  </imports>
+</ScenarioSimulationModel>
+`;
+
+const meta: Meta<{}> = {
+  title: "Misc/Collection",
+  component: TestScenarioEditor,
+  includeStories: /^[A-Z]/,
+};
+
+export default meta;
+type Story = StoryObj<StorybookTestScenarioEditorProps>;
+
+const marshaller = getMarshaller(collectionScesim);
+const currentModel = marshaller.parser.parse();
+const dmnModel = {
+  normalizedPosixPathRelativeToTheOpenFile: 
"dev-webapp/available-dmn-models/collection.dmn",
+  type: "dmn",
+  model: normalize(getDmnMarshaller(COLLECTION ?? "", { upgradeTo: "latest" 
}).parser.parse()),
+  svg: "",
+};
+
+export const Collection: Story = {
+  render: (args) => SceSimEditorWrapper(args),
+  args: {
+    model: marshaller.parser.parse(),
+    openFileNormalizedPosixPathRelativeToTheWorkspaceRoot: collectionFileName,
+    externalModelsByNamespace: new Map([
+      ["https://kie.apache.org/dmn/_D1C37750-2078-4CB7-AF77-850947718867";, 
dmnModel],
+    ]),
+    xml: marshaller.builder.build(currentModel),
+    onRequestExternalModelsAvailableToInclude: () => 
Promise.resolve(["collection.dmn"]),
+    onRequestExternalModelByPath: () => Promise.resolve(dmnModel),
+  },
+};
diff --git a/packages/scesim-editor/stories/misc/expression/Expression.mdx 
b/packages/scesim-editor/stories/misc/expression/Expression.mdx
new file mode 100644
index 00000000000..e4153a4243a
--- /dev/null
+++ b/packages/scesim-editor/stories/misc/expression/Expression.mdx
@@ -0,0 +1,46 @@
+{/* 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 { Meta, Story } from "@storybook/blocks";
+import * as Expression from "./Expression.stories";
+
+<Meta title="MDX/Expression" of={Expression} />
+
+# Expression
+
+To start off, use contextual menus in the table to insert or edit or delete 
new columns and rows.
+
+Before defining the individual test scenarios, verify the instance and field 
mappings for each column. If any changes are necessary, use the DMN Nodes 
selector to update the mapping.
+
+If the same GIVEN data is shared with the multiple test scenarios, you can use 
the Background tab to define them only once. The way to create a column in the 
Background tab is the same as of the Test Scenario tab.
+
+Now, define the test scenarios. Each cell of the table must contain a valid 
expression.
+
+Values in the GIVEN part of the table are evaluated as literal expressions, 
whereas values in the EXPECT section are evaluated as unary expressions. The 
correctness of these unary tests is verified using the results from a DMN 
evaluation.
+
+DMN-based scenarios use the FEEL expression language. Supported data types are:
+
+- numbers and strings (strings must be delimited by quotation marks), for 
example "John Doe" or ""
+- boolean values (true, false, and null)
+- dates and time, for example date("2019-05-13") or time("14:10:00+02:00")
+- Days and time duration, for example duration("P1DT23H12M30S")
+- Years and months duration, for example duration("P3Y5M")
+- functions
+- contexts, for example \{x : 5, even : false, type : "integer number"\}
+- ranges and lists, for example [1 .. 10] or [2, 3, 4, 5]
+- In EXPECT section the type could also just a boolean with the result of the 
assertion and you can use ? identifier to access value to check.
+- An empty cell is skipped from the evaluation.
diff --git 
a/packages/scesim-editor/stories/misc/expression/Expression.stories.tsx 
b/packages/scesim-editor/stories/misc/expression/Expression.stories.tsx
new file mode 100644
index 00000000000..5f1c2a60f2c
--- /dev/null
+++ b/packages/scesim-editor/stories/misc/expression/Expression.stories.tsx
@@ -0,0 +1,234 @@
+/*
+ * 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 type { Meta, StoryObj } from "@storybook/react";
+import { getMarshaller } from "@kie-tools/scesim-marshaller";
+import { TestScenarioEditor } from "../../../src/TestScenarioEditor";
+import { SceSimEditorWrapper, StorybookTestScenarioEditorProps } from 
"../../scesimEditorStoriesWrapper";
+import { normalize } from 
"@kie-tools/dmn-marshaller/dist/normalization/normalize";
+import { getMarshaller as getDmnMarshaller } from "@kie-tools/dmn-marshaller";
+import { SIMPLE } from "../../examples/ExternalDmnModels";
+
+export const expressionFileName = "expression.scesim";
+export const expressionScesim = `<?xml version="1.0" encoding="UTF-8" ?>
+<ScenarioSimulationModel xmlns="https://kie.org/scesim/1.8"; version="1.8">
+  <simulation>
+    <scesimModelDescriptor>
+      <factMappings>
+        <FactMapping>
+          <expressionElements />
+          <expressionIdentifier>
+            <name>Index</name>
+            <type>OTHER</type>
+          </expressionIdentifier>
+          <factIdentifier>
+            <name>#</name>
+            <className>java.lang.Integer</className>
+          </factIdentifier>
+          <className>java.lang.Integer</className>
+          <factAlias>#</factAlias>
+          <columnWidth>70</columnWidth>
+          <factMappingValueType>NOT_EXPRESSION</factMappingValueType>
+        </FactMapping>
+        <FactMapping>
+          <expressionElements />
+          <expressionIdentifier>
+            <name>Description</name>
+            <type>OTHER</type>
+          </expressionIdentifier>
+          <factIdentifier>
+            <name>Scenario description</name>
+            <className>java.lang.String</className>
+          </factIdentifier>
+          <className>java.lang.String</className>
+          <factAlias>Scenario description</factAlias>
+          <columnWidth>300</columnWidth>
+          <factMappingValueType>NOT_EXPRESSION</factMappingValueType>
+        </FactMapping>
+        <FactMapping>
+          <expressionElements>
+            <ExpressionElement>
+              <step>Input</step>
+            </ExpressionElement>
+          </expressionElements>
+          <expressionIdentifier>
+            <name>_EEFE5AF7-5422-4618-8709-474976310EBA</name>
+            <type>GIVEN</type>
+          </expressionIdentifier>
+          <factIdentifier>
+            <name>Input</name>
+            <className>number</className>
+          </factIdentifier>
+          <className>number</className>
+          <factAlias>Input</factAlias>
+          <expressionAlias>expression &lt;/&gt;</expressionAlias>
+          <columnWidth>300</columnWidth>
+          <factMappingValueType>EXPRESSION</factMappingValueType>
+        </FactMapping>
+        <FactMapping>
+          <expressionElements>
+            <ExpressionElement>
+              <step>Decision</step>
+            </ExpressionElement>
+          </expressionElements>
+          <expressionIdentifier>
+            <name>_897A9B62-F79C-48A7-AE65-4B414D1B6EB9</name>
+            <type>EXPECT</type>
+          </expressionIdentifier>
+          <factIdentifier>
+            <name>Decision</name>
+            <className>boolean</className>
+          </factIdentifier>
+          <className>boolean</className>
+          <factAlias>Decision</factAlias>
+          <expressionAlias>expression &lt;/&gt;</expressionAlias>
+          <columnWidth>300</columnWidth>
+          <factMappingValueType>EXPRESSION</factMappingValueType>
+        </FactMapping>
+      </factMappings>
+    </scesimModelDescriptor>
+    <scesimData>
+      <Scenario>
+        <factMappingValues>
+          <FactMappingValue>
+            <factIdentifier>
+              <name>#</name>
+              <className>java.lang.Integer</className>
+            </factIdentifier>
+            <expressionIdentifier>
+              <name>Index</name>
+              <type>OTHER</type>
+            </expressionIdentifier>
+            <rawValue class="string">1</rawValue>
+          </FactMappingValue>
+          <FactMappingValue>
+            <factIdentifier>
+              <name>Scenario description</name>
+              <className>java.lang.String</className>
+            </factIdentifier>
+            <expressionIdentifier>
+              <name>Description</name>
+              <type>OTHER</type>
+            </expressionIdentifier>
+          </FactMappingValue>
+          <FactMappingValue>
+            <factIdentifier>
+              <name>Input</name>
+              <className>number</className>
+            </factIdentifier>
+            <expressionIdentifier>
+              <name>_EEFE5AF7-5422-4618-8709-474976310EBA</name>
+              <type>GIVEN</type>
+            </expressionIdentifier>
+            <rawValue class="string">20</rawValue>
+          </FactMappingValue>
+          <FactMappingValue>
+            <factIdentifier>
+              <name>Decision</name>
+              <className>boolean</className>
+            </factIdentifier>
+            <expressionIdentifier>
+              <name>_897A9B62-F79C-48A7-AE65-4B414D1B6EB9</name>
+              <type>EXPECT</type>
+            </expressionIdentifier>
+            <rawValue class="string">true</rawValue>
+          </FactMappingValue>
+        </factMappingValues>
+      </Scenario>
+    </scesimData>
+  </simulation>
+  <background>
+    <scesimModelDescriptor>
+      <factMappings>
+        <FactMapping>
+          <expressionElements />
+          <expressionIdentifier>
+            <name>1|1</name>
+            <type>GIVEN</type>
+          </expressionIdentifier>
+          <factIdentifier>
+            <name>Empty</name>
+            <className>java.lang.Void</className>
+          </factIdentifier>
+          <className>java.lang.Void</className>
+          <factAlias>INSTANCE-1</factAlias>
+          <expressionAlias>PROPERTY-1</expressionAlias>
+          <columnWidth>150</columnWidth>
+          <factMappingValueType>NOT_EXPRESSION</factMappingValueType>
+        </FactMapping>
+      </factMappings>
+    </scesimModelDescriptor>
+    <scesimData>
+      <BackgroundData>
+        <factMappingValues>
+          <FactMappingValue>
+            <factIdentifier>
+              <name>Empty</name>
+              <className>java.lang.Void</className>
+            </factIdentifier>
+            <expressionIdentifier>
+              <name>1|1</name>
+              <type>GIVEN</type>
+            </expressionIdentifier>
+          </FactMappingValue>
+        </factMappingValues>
+      </BackgroundData>
+    </scesimData>
+  </background>
+  <settings>
+    <dmnFilePath>dev-webapp/available-dmn-models/simple.dmn</dmnFilePath>
+    <type>DMN</type>
+    
<dmnNamespace>https://kie.org/dmn/_0457D4F2-02B6-4A3D-957F-8F971A8321BC</dmnNamespace>
+    <dmnName>Simple</dmnName>
+    <skipFromBuild>false</skipFromBuild>
+  </settings>
+  <imports>
+    <imports />
+  </imports>
+</ScenarioSimulationModel>`;
+
+const meta: Meta<{}> = {
+  title: "Misc/Expression",
+  component: TestScenarioEditor,
+  includeStories: /^[A-Z]/,
+};
+
+export default meta;
+type Story = StoryObj<StorybookTestScenarioEditorProps>;
+
+const marshaller = getMarshaller(expressionScesim);
+const currentModel = marshaller.parser.parse();
+const dmnModel = {
+  normalizedPosixPathRelativeToTheOpenFile: 
"dev-webapp/available-dmn-models/simple.dmn",
+  type: "dmn",
+  model: normalize(getDmnMarshaller(SIMPLE ?? "", { upgradeTo: "latest" 
}).parser.parse()),
+  svg: "",
+};
+
+export const Expression: Story = {
+  render: (args) => SceSimEditorWrapper(args),
+  args: {
+    model: marshaller.parser.parse(),
+    openFileNormalizedPosixPathRelativeToTheWorkspaceRoot: expressionFileName,
+    externalModelsByNamespace: new 
Map([["https://kie.org/dmn/_0457D4F2-02B6-4A3D-957F-8F971A8321BC";, dmnModel]]),
+    xml: marshaller.builder.build(currentModel),
+    onRequestExternalModelsAvailableToInclude: () => 
Promise.resolve(["simple.dmn"]),
+    onRequestExternalModelByPath: () => Promise.resolve(dmnModel),
+  },
+};
diff --git a/packages/scesim-editor/stories/misc/simple/Simple.stories.tsx 
b/packages/scesim-editor/stories/misc/simple/Simple.stories.tsx
index 5ebb2dacfa0..d6d5535ddfd 100644
--- a/packages/scesim-editor/stories/misc/simple/Simple.stories.tsx
+++ b/packages/scesim-editor/stories/misc/simple/Simple.stories.tsx
@@ -20,13 +20,188 @@
 import type { Meta, StoryObj } from "@storybook/react";
 import { getMarshaller } from "@kie-tools/scesim-marshaller";
 import { TestScenarioEditor } from "../../../src/TestScenarioEditor";
-import { EMPTY_ONE_EIGHT } from "../../../src/resources/EmptyScesimFile";
 import { SceSimEditorWrapper, StorybookTestScenarioEditorProps } from 
"../../scesimEditorStoriesWrapper";
 import { normalize } from 
"@kie-tools/dmn-marshaller/dist/normalization/normalize";
 import { getMarshaller as getDmnMarshaller } from "@kie-tools/dmn-marshaller";
 import { SIMPLE } from "../../examples/ExternalDmnModels";
 
 export const simpleFileName = "simple.scesim";
+export const simpleScesim = `<?xml version="1.0" encoding="UTF-8" ?>
+<ScenarioSimulationModel xmlns="https://kie.org/scesim/1.8"; version="1.8">
+  <simulation>
+    <scesimModelDescriptor>
+      <factMappings>
+        <FactMapping>
+          <expressionElements />
+          <expressionIdentifier>
+            <name>Index</name>
+            <type>OTHER</type>
+          </expressionIdentifier>
+          <factIdentifier>
+            <name>#</name>
+            <className>java.lang.Integer</className>
+          </factIdentifier>
+          <className>java.lang.Integer</className>
+          <factAlias>#</factAlias>
+          <columnWidth>70</columnWidth>
+          <factMappingValueType>NOT_EXPRESSION</factMappingValueType>
+        </FactMapping>
+        <FactMapping>
+          <expressionElements />
+          <expressionIdentifier>
+            <name>Description</name>
+            <type>OTHER</type>
+          </expressionIdentifier>
+          <factIdentifier>
+            <name>Scenario description</name>
+            <className>java.lang.String</className>
+          </factIdentifier>
+          <className>java.lang.String</className>
+          <factAlias>Scenario description</factAlias>
+          <columnWidth>300</columnWidth>
+          <factMappingValueType>NOT_EXPRESSION</factMappingValueType>
+        </FactMapping>
+        <FactMapping>
+          <expressionElements>
+            <ExpressionElement>
+              <step>Input</step>
+            </ExpressionElement>
+          </expressionElements>
+          <expressionIdentifier>
+            <name>_4F584C15-5873-426F-8F88-51E2E749967B</name>
+            <type>GIVEN</type>
+          </expressionIdentifier>
+          <factIdentifier>
+            <name>Input</name>
+            <className>number</className>
+          </factIdentifier>
+          <className>number</className>
+          <factAlias>Input</factAlias>
+          <expressionAlias>value</expressionAlias>
+          <columnWidth>100</columnWidth>
+          <factMappingValueType>NOT_EXPRESSION</factMappingValueType>
+        </FactMapping>
+        <FactMapping>
+          <expressionElements>
+            <ExpressionElement>
+              <step>Decision</step>
+            </ExpressionElement>
+          </expressionElements>
+          <expressionIdentifier>
+            <name>_45F692B9-E45C-473F-A4E3-13510250FF19</name>
+            <type>EXPECT</type>
+          </expressionIdentifier>
+          <factIdentifier>
+            <name>Decision</name>
+            <className>boolean</className>
+          </factIdentifier>
+          <className>boolean</className>
+          <factAlias>Decision</factAlias>
+          <expressionAlias>value</expressionAlias>
+          <columnWidth>100</columnWidth>
+          <factMappingValueType>NOT_EXPRESSION</factMappingValueType>
+        </FactMapping>
+      </factMappings>
+    </scesimModelDescriptor>
+    <scesimData>
+      <Scenario>
+        <factMappingValues>
+          <FactMappingValue>
+            <factIdentifier>
+              <name>#</name>
+              <className>java.lang.Integer</className>
+            </factIdentifier>
+            <expressionIdentifier>
+              <name>Index</name>
+              <type>OTHER</type>
+            </expressionIdentifier>
+            <rawValue class="string">1</rawValue>
+          </FactMappingValue>
+          <FactMappingValue>
+            <factIdentifier>
+              <name>Scenario description</name>
+              <className>java.lang.String</className>
+            </factIdentifier>
+            <expressionIdentifier>
+              <name>Description</name>
+              <type>OTHER</type>
+            </expressionIdentifier>
+          </FactMappingValue>
+          <FactMappingValue>
+            <factIdentifier>
+              <name>Input</name>
+              <className>number</className>
+            </factIdentifier>
+            <expressionIdentifier>
+              <name>_4F584C15-5873-426F-8F88-51E2E749967B</name>
+              <type>GIVEN</type>
+            </expressionIdentifier>
+            <rawValue class="string">17</rawValue>
+          </FactMappingValue>
+          <FactMappingValue>
+            <factIdentifier>
+              <name>Decision</name>
+              <className>boolean</className>
+            </factIdentifier>
+            <expressionIdentifier>
+              <name>_45F692B9-E45C-473F-A4E3-13510250FF19</name>
+              <type>EXPECT</type>
+            </expressionIdentifier>
+            <rawValue class="string">false</rawValue>
+          </FactMappingValue>
+        </factMappingValues>
+      </Scenario>
+    </scesimData>
+  </simulation>
+  <background>
+    <scesimModelDescriptor>
+      <factMappings>
+        <FactMapping>
+          <expressionElements />
+          <expressionIdentifier>
+            <name>1|1</name>
+            <type>GIVEN</type>
+          </expressionIdentifier>
+          <factIdentifier>
+            <name>Empty</name>
+            <className>java.lang.Void</className>
+          </factIdentifier>
+          <className>java.lang.Void</className>
+          <factAlias>INSTANCE-1</factAlias>
+          <expressionAlias>PROPERTY-1</expressionAlias>
+          <columnWidth>150</columnWidth>
+          <factMappingValueType>NOT_EXPRESSION</factMappingValueType>
+        </FactMapping>
+      </factMappings>
+    </scesimModelDescriptor>
+    <scesimData>
+      <BackgroundData>
+        <factMappingValues>
+          <FactMappingValue>
+            <factIdentifier>
+              <name>Empty</name>
+              <className>java.lang.Void</className>
+            </factIdentifier>
+            <expressionIdentifier>
+              <name>1|1</name>
+              <type>GIVEN</type>
+            </expressionIdentifier>
+          </FactMappingValue>
+        </factMappingValues>
+      </BackgroundData>
+    </scesimData>
+  </background>
+  <settings>
+    <dmnFilePath>dev-webapp/available-dmn-models/simple.dmn</dmnFilePath>
+    <type>DMN</type>
+    
<dmnNamespace>https://kie.org/dmn/_0457D4F2-02B6-4A3D-957F-8F971A8321BC</dmnNamespace>
+    <dmnName>Simple</dmnName>
+    <skipFromBuild>false</skipFromBuild>
+  </settings>
+  <imports>
+    <imports />
+  </imports>
+</ScenarioSimulationModel>`;
 
 const meta: Meta<{}> = {
   title: "Misc/Simple",
@@ -37,10 +212,10 @@ const meta: Meta<{}> = {
 export default meta;
 type Story = StoryObj<StorybookTestScenarioEditorProps>;
 
-const marshaller = getMarshaller(EMPTY_ONE_EIGHT);
+const marshaller = getMarshaller(simpleScesim);
 const currentModel = marshaller.parser.parse();
 const dmnModel = {
-  normalizedPosixPathRelativeToTheOpenFile: "simple.dmn",
+  normalizedPosixPathRelativeToTheOpenFile: 
"dev-webapp/available-dmn-models/simple.dmn",
   type: "dmn",
   model: normalize(getDmnMarshaller(SIMPLE ?? "", { upgradeTo: "latest" 
}).parser.parse()),
   svg: "",
diff --git 
a/packages/scesim-editor/tests-e2e/features/keyboard/keyboard.spec.ts 
b/packages/scesim-editor/tests-e2e/features/keyboard/keyboard.spec.ts
index b85964978a8..ea9eb5c70d6 100644
--- a/packages/scesim-editor/tests-e2e/features/keyboard/keyboard.spec.ts
+++ b/packages/scesim-editor/tests-e2e/features/keyboard/keyboard.spec.ts
@@ -28,7 +28,7 @@ test.describe("Keyboard", () => {
       table,
       testScenarioTable,
     }) => {
-      await editor.createTestScenario(AssetType.RULE);
+      await editor.createTestScenario(AssetType.DECISION);
       await table.addRow({ targetCellName: "1", position: AddRowPosition.BELOW 
});
       await table.addRow({ targetCellName: "1", position: AddRowPosition.BELOW 
});
       await table.addRow({ targetCellName: "1", position: AddRowPosition.BELOW 
});
diff --git 
a/packages/scesim-editor/tests-e2e/features/selection/contextMenu.spec.ts 
b/packages/scesim-editor/tests-e2e/features/selection/contextMenu.spec.ts
index 0e19b4e52dd..0e7642b26fe 100644
--- a/packages/scesim-editor/tests-e2e/features/selection/contextMenu.spec.ts
+++ b/packages/scesim-editor/tests-e2e/features/selection/contextMenu.spec.ts
@@ -24,7 +24,7 @@ import { AssetType } from "../../__fixtures__/editor";
 test.describe("Selection", () => {
   test.describe("Context menu", () => {
     test.beforeEach(async ({ editor, testScenarioTable }) => {
-      await editor.createTestScenario(AssetType.RULE);
+      await editor.createTestScenario(AssetType.DECISION);
       await testScenarioTable.fill({ content: '"test"', rowLocatorInfo: "1", 
columnNumber: 1 });
     });
 
diff --git 
a/packages/scesim-editor/tests-e2e/scesimEditor/backgroundTable/populate.spec.ts
 
b/packages/scesim-editor/tests-e2e/scesimEditor/backgroundTable/populate.spec.ts
index 36f8486db34..b1fce13d607 100644
--- 
a/packages/scesim-editor/tests-e2e/scesimEditor/backgroundTable/populate.spec.ts
+++ 
b/packages/scesim-editor/tests-e2e/scesimEditor/backgroundTable/populate.spec.ts
@@ -70,6 +70,7 @@ test.describe("Populate decision background table", () => {
 });
 
 test.describe("Populate rule background table", () => {
+  test.skip(true, 
"https://github.com/apache/incubator-kie-issues/issues/1847";);
   test("should correctly populate a rule-based background table", async ({
     editor,
     resizing,
diff --git 
a/packages/scesim-editor/tests-e2e/scesimEditor/backgroundTable/selectorPanel.spec.ts
 
b/packages/scesim-editor/tests-e2e/scesimEditor/backgroundTable/selectorPanel.spec.ts
index 7740ba70f78..a8a203f0fb3 100644
--- 
a/packages/scesim-editor/tests-e2e/scesimEditor/backgroundTable/selectorPanel.spec.ts
+++ 
b/packages/scesim-editor/tests-e2e/scesimEditor/backgroundTable/selectorPanel.spec.ts
@@ -34,7 +34,7 @@ test.describe("Use Selector Panel on background table based 
on traffic violation
   }) => {
     await table.selectColumnHeader({ name: "INSTANCE 1 (<Undefined>)" });
     await selectorPanel.assign({ name: "Driver" });
-    await table.selectColumnHeader({ name: "Expression </>" });
+    await table.selectColumnHeader({ name: "expression </>" });
     await selectorPanel.assign({ name: "Points" });
 
     await table.addInstanceColumn({
@@ -122,12 +122,12 @@ test.describe("Use Selector Panel on background table 
based on traffic violation
     await selectorPanel.assign({ name: "Violation" });
 
     await table.addPropertyColumn({
-      targetCellName: "Expression </>",
+      targetCellName: "expression </>",
       position: AddColumnPosition.RIGHT,
       columnNumber: 0,
     });
 
-    await table.selectColumnHeader({ name: "Expression </>" });
+    await table.selectColumnHeader({ name: "expression </>" });
     await expect(selectorPanel.getAttribute({ name: "Speed Limit" 
})).toBeAttached();
     await selectorPanel.assign({ name: "Speed Limit" });
     await table.selectColumnHeader({ name: "PROPERTY-1 (<Undefined>)" });
diff --git 
a/packages/scesim-editor/tests-e2e/scesimEditor/testScenarioTable/contextMenu.spec.ts
 
b/packages/scesim-editor/tests-e2e/scesimEditor/testScenarioTable/contextMenu.spec.ts
index 6dc86d2df57..0f18691e096 100644
--- 
a/packages/scesim-editor/tests-e2e/scesimEditor/testScenarioTable/contextMenu.spec.ts
+++ 
b/packages/scesim-editor/tests-e2e/scesimEditor/testScenarioTable/contextMenu.spec.ts
@@ -26,7 +26,7 @@ import { AddColumnPosition, AddRowPosition } from 
"../../__fixtures__/table";
 test.describe("Test scenario table context menu", () => {
   test.describe("Context menu checks", () => {
     test.beforeEach(async ({ editor, testScenarioTable, table }) => {
-      await editor.createTestScenario(AssetType.RULE);
+      await editor.createTestScenario(AssetType.DECISION);
       await table.addRow({ targetCellName: "1", position: AddRowPosition.ABOVE 
});
       await testScenarioTable.fill({ content: "test", rowLocatorInfo: "1", 
columnNumber: 1 });
     });
diff --git 
a/packages/scesim-editor/tests-e2e/scesimEditor/testScenarioTable/populate.spec.ts
 
b/packages/scesim-editor/tests-e2e/scesimEditor/testScenarioTable/populate.spec.ts
index 72abbd26f67..a643c776691 100644
--- 
a/packages/scesim-editor/tests-e2e/scesimEditor/testScenarioTable/populate.spec.ts
+++ 
b/packages/scesim-editor/tests-e2e/scesimEditor/testScenarioTable/populate.spec.ts
@@ -104,6 +104,7 @@ test.describe("Populate decision test scenario table", () 
=> {
 });
 
 test.describe("Populate rule test scenario table", () => {
+  test.skip(true, 
"https://github.com/apache/incubator-kie-issues/issues/1847";);
   test("should correctly populate a rule-based test scenario table", async ({
     editor,
     resizing,
diff --git 
a/packages/scesim-editor/tests-e2e/scesimEditor/testScenarioTable/selectorPanel.spec.ts
 
b/packages/scesim-editor/tests-e2e/scesimEditor/testScenarioTable/selectorPanel.spec.ts
index 28028d661f6..8a28657f8fa 100644
--- 
a/packages/scesim-editor/tests-e2e/scesimEditor/testScenarioTable/selectorPanel.spec.ts
+++ 
b/packages/scesim-editor/tests-e2e/scesimEditor/testScenarioTable/selectorPanel.spec.ts
@@ -92,7 +92,7 @@ test.describe("Use Selector Panel on Test Scenario table 
based on are they old e
     await selectorPanel.assign({ name: "LoanApplication" });
 
     await table.addPropertyColumn({
-      targetCellName: "Expression </>",
+      targetCellName: "expression </>",
       position: AddColumnPosition.RIGHT,
       columnNumber: 0,
     });
@@ -100,7 +100,7 @@ test.describe("Use Selector Panel on Test Scenario table 
based on are they old e
     await table.selectColumnHeader({ name: "PROPERTY-4 (<Undefined>)", 
columnNumber: 0 });
     await selectorPanel.assign({ name: "approved" });
 
-    await table.selectColumnHeader({ name: "Expression </>" });
+    await table.selectColumnHeader({ name: "expression </>" });
     await selectorPanel.assign({ name: "explanation" });
 
     await expect(table.getColumnHeader({ name: "approved (Boolean)" 
})).toBeAttached();


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

Reply via email to