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

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


The following commit(s) were added to refs/heads/main by this push:
     new 9f2a206077 [incubator-kie-issues#2221] REST Endpoints that return the 
workflow/task json schema not working when the process id has a . as separator 
(#4187)
9f2a206077 is described below

commit 9f2a20607729f664b17292bf457bfd7ca34ac3ca
Author: Deepak Joseph <[email protected]>
AuthorDate: Sat Feb 7 20:11:30 2026 +0530

    [incubator-kie-issues#2221] REST Endpoints that return the workflow/task 
json schema not working when the process id has a . as separator (#4187)
    
    * Json Schema Generation Fix
    
    * update
---
 .../main/java/org/jbpm/util/JsonSchemaUtil.java    |  2 +-
 .../codegen/json/JsonSchemaGeneratorTest.java      | 36 ++++++++++++++++++++++
 2 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/jbpm/jbpm-flow/src/main/java/org/jbpm/util/JsonSchemaUtil.java 
b/jbpm/jbpm-flow/src/main/java/org/jbpm/util/JsonSchemaUtil.java
index f280aaa714..b8480f69c7 100644
--- a/jbpm/jbpm-flow/src/main/java/org/jbpm/util/JsonSchemaUtil.java
+++ b/jbpm/jbpm-flow/src/main/java/org/jbpm/util/JsonSchemaUtil.java
@@ -59,7 +59,7 @@ public class JsonSchemaUtil {
     }
 
     public static Map<String, Object> load(ClassLoader cl, String processId) {
-        return loadSchema(cl, processId);
+        return loadSchema(cl, getJsonSchemaName(processId));
     }
 
     public static Map<String, Object> load(ClassLoader cl, String processId, 
String taskName) {
diff --git 
a/kogito-codegen-modules/kogito-codegen-processes/src/test/java/org/kie/kogito/codegen/json/JsonSchemaGeneratorTest.java
 
b/kogito-codegen-modules/kogito-codegen-processes/src/test/java/org/kie/kogito/codegen/json/JsonSchemaGeneratorTest.java
index 2c5159c331..2e9bdc0776 100644
--- 
a/kogito-codegen-modules/kogito-codegen-processes/src/test/java/org/kie/kogito/codegen/json/JsonSchemaGeneratorTest.java
+++ 
b/kogito-codegen-modules/kogito-codegen-processes/src/test/java/org/kie/kogito/codegen/json/JsonSchemaGeneratorTest.java
@@ -113,6 +113,26 @@ public class JsonSchemaGeneratorTest {
         private String name;
     }
 
+    @UserTask(taskName = "manager approval", processName = 
"com.example.process")
+    private static class TaskWithDotsInProcessName {
+
+        @UserTaskParam(UserTaskParam.ParamType.INPUT)
+        private String requestId;
+
+        @UserTaskParam(UserTaskParam.ParamType.OUTPUT)
+        private boolean approved;
+    }
+
+    @ProcessInput(processName = "com.example.workflow")
+    private static class ProcessWithDotsInName {
+
+        @VariableInfo
+        private String workflowId;
+
+        @VariableInfo
+        private int priority;
+    }
+
     @ProcessInput(processName = "processName")
     private static class ProcessInputModel {
 
@@ -218,6 +238,22 @@ public class JsonSchemaGeneratorTest {
         assertThat(files).isEmpty();
     }
 
+    @Test
+    public void testJsonSchemaGenerationWithDotsInProcessName() throws 
IOException {
+        Collection<GeneratedFile> files = new 
JsonSchemaGenerator.ClassBuilder(Stream.of(ProcessWithDotsInName.class)).build().generate();
+        assertThat(files).hasSize(1);
+        GeneratedFile file = files.iterator().next();
+        
assertThat(file.relativePath()).isEqualTo(JsonSchemaUtil.getJsonDir().resolve("com#example#workflow.json").toString());
+    }
+
+    @Test
+    public void testJsonSchemaGenerationForTaskWithDotsInProcessName() throws 
IOException {
+        Collection<GeneratedFile> files = new 
JsonSchemaGenerator.ClassBuilder(Stream.of(TaskWithDotsInProcessName.class)).build().generate();
+        assertThat(files).hasSize(1);
+        GeneratedFile file = files.iterator().next();
+        
assertThat(file.relativePath()).isEqualTo(JsonSchemaUtil.getJsonDir().resolve("com#example#process_manager_approval.json").toString());
+    }
+
     @Test
     public void testJsonSchemaGenerationForProcess() throws IOException {
         Collection<GeneratedFile> files = new 
JsonSchemaGenerator.ClassBuilder(Stream.of(ProcessInputModel.class)).build().generate();


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

Reply via email to