diff --git a/kogito-serverless-workflow/kogito-serverless-workflow-builder/src/main/java/org/kie/kogito/serverless/workflow/parser/ServerlessWorkflowParser.java b/kogito-serverless-workflow/kogito-serverless-workflow-builder/src/main/java/org/kie/kogito/serverless/workflow/parser/ServerlessWorkflowParser.java index 49e16462cc3..5e4c075e69d 100644 --- a/kogito-serverless-workflow/kogito-serverless-workflow-builder/src/main/java/org/kie/kogito/serverless/workflow/parser/ServerlessWorkflowParser.java +++ b/kogito-serverless-workflow/kogito-serverless-workflow-builder/src/main/java/org/kie/kogito/serverless/workflow/parser/ServerlessWorkflowParser.java @@ -68,7 +68,6 @@ public class ServerlessWorkflowParser { public static final String NODE_START_NAME = "Start"; public static final String NODE_END_NAME = "End"; - public static final String DEFAULT_NAME = "workflow"; public static final String DEFAULT_PACKAGE = "org.kie.kogito.serverless"; public static final String DEFAULT_VERSION = "1.0"; @@ -127,7 +126,7 @@ private ServerlessWorkflowParser(Workflow workflow, KogitoBuildContext context) private GeneratedInfo parseProcess() { RuleFlowProcessFactory factory = RuleFlowProcessFactory.createProcess(workflow.getId(), !workflow.isKeepActive()) - .name(workflow.getName() == null ? DEFAULT_NAME : workflow.getName()) + .name(workflow.getName() == null ? workflow.getId() : workflow.getName()) .version(workflow.getVersion() == null ? DEFAULT_VERSION : workflow.getVersion()) .packageName(workflow.getMetadata() != null ? workflow.getMetadata().getOrDefault("package", DEFAULT_PACKAGE) : DEFAULT_PACKAGE) diff --git a/kogito-serverless-workflow/kogito-serverless-workflow-builder/src/test/java/org/kie/kogito/serverless/workflow/ServerlessWorkflowParsingTest.java b/kogito-serverless-workflow/kogito-serverless-workflow-builder/src/test/java/org/kie/kogito/serverless/workflow/ServerlessWorkflowParsingTest.java index e140cb54b87..6041dbbdf99 100644 --- a/kogito-serverless-workflow/kogito-serverless-workflow-builder/src/test/java/org/kie/kogito/serverless/workflow/ServerlessWorkflowParsingTest.java +++ b/kogito-serverless-workflow/kogito-serverless-workflow-builder/src/test/java/org/kie/kogito/serverless/workflow/ServerlessWorkflowParsingTest.java @@ -642,7 +642,7 @@ public void testMinimumWorkflow() { ServerlessWorkflowParser parser = ServerlessWorkflowParser.of(workflow, JavaKogitoBuildContext.builder().build()); Process process = parser.getProcessInfo().info(); assertThat(parser.getProcessInfo().info()).isSameAs(process); - assertThat(process.getName()).isEqualTo(ServerlessWorkflowParser.DEFAULT_NAME); + assertThat(process.getName()).isEqualTo(workflow.getId()); assertThat(process.getVersion()).isEqualTo(ServerlessWorkflowParser.DEFAULT_VERSION); assertThat(process.getPackageName()).isEqualTo(ServerlessWorkflowParser.DEFAULT_PACKAGE); }