From caaa4ded5bf2a98574729b0e0a8246b22be31624 Mon Sep 17 00:00:00 2001
From: Abhiram Gundala <164050036+Abhitocode@users.noreply.github.com>
Date: Mon, 13 Jan 2025 02:00:36 -0500
Subject: [PATCH] [kie-issues#1723] Allow dot character in metadata attributes
 (#2828)

---
 .../fields/metaDataEditor/MetaDataListItemWidgetViewImpl.java   | 2 +-
 .../common/stunner/bpmn/client/forms/util/StringUtils.java      | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/packages/stunner-editors/kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-client/src/main/java/org/kie/workbench/common/stunner/bpmn/client/forms/fields/metaDataEditor/MetaDataListItemWidgetViewImpl.java b/packages/stunner-editors/kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-client/src/main/java/org/kie/workbench/common/stunner/bpmn/client/forms/fields/metaDataEditor/MetaDataListItemWidgetViewImpl.java
index 10ef0fe857a..7a0dc89cd9d 100644
--- a/packages/stunner-editors/kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-client/src/main/java/org/kie/workbench/common/stunner/bpmn/client/forms/fields/metaDataEditor/MetaDataListItemWidgetViewImpl.java
+++ b/packages/stunner-editors/kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-client/src/main/java/org/kie/workbench/common/stunner/bpmn/client/forms/fields/metaDataEditor/MetaDataListItemWidgetViewImpl.java
@@ -74,7 +74,7 @@ public void setParentWidget(final MetaDataEditorWidgetView.Presenter parentWidge
 
     @PostConstruct
     public void init() {
-        attribute.setRegExp(StringUtils.ALPHA_NUM_REGEXP,
+        attribute.setRegExp(StringUtils.ALPHA_NUM_HYPHEN_UNDERSCORE_DOT_REGEXP,
                             StunnerFormsClientFieldsConstants.CONSTANTS.Removed_invalid_characters_from_name(),
                             StunnerFormsClientFieldsConstants.CONSTANTS.Invalid_character_in_name());
 
diff --git a/packages/stunner-editors/kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-client/src/main/java/org/kie/workbench/common/stunner/bpmn/client/forms/util/StringUtils.java b/packages/stunner-editors/kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-client/src/main/java/org/kie/workbench/common/stunner/bpmn/client/forms/util/StringUtils.java
index 8301a133c71..c97d7eff1d8 100644
--- a/packages/stunner-editors/kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-client/src/main/java/org/kie/workbench/common/stunner/bpmn/client/forms/util/StringUtils.java
+++ b/packages/stunner-editors/kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-client/src/main/java/org/kie/workbench/common/stunner/bpmn/client/forms/util/StringUtils.java
@@ -36,6 +36,7 @@
 public class StringUtils {
 
     public static final String ALPHA_NUM_REGEXP = "^[a-zA-Z0-9\\-\\_]*$";
+    public static final String ALPHA_NUM_HYPHEN_UNDERSCORE_DOT_REGEXP = "^[a-zA-Z0-9\\-\\_\\.]*$";
     public static final String ALPHA_NUM_UNDERSCORE_DOT_GT_LT_REGEXP = "^[a-zA-Z0-9<>,\\_\\.]*$";
     public static final String ALPHA_NUM_SPACE_REGEXP = "^[a-zA-Z0-9\\-\\_\\ ]*$";
     public static final RegExp EXPRESSION = RegExp.compile(Patterns.EXPRESSION);