oEscal opened a new issue, #4071:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/4071
### Describe the bug
When creating a workflow with a `subFlowRef` whose ID has dashes, the user
gets an error when building it using Quarkus.
For instance, for a workflow with:
```yaml
states:
- name: advertise-listing
type: operation
actions:
- subFlowRef: advertise-listing
end: true
```
I got the error:
```bash
$ kn workflow quarkus build --image=workflow --jib
[ERROR] Failed to execute goal
io.quarkus.platform:quarkus-maven-plugin:3.20.1:build (default) on project
workflow: Failed to build quarkus application:
io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] [error]: Build step
org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor#generateModel
threw an exception: org.kie.memorycompiler.KieMemoryCompilerException:
[org/kie/kogito/serverless/ValveProcess.java (16:109) : ';' expected,
org/kie/kogito/serverless/ValveProcess.java (16:117) : <identifier> expected]
[ERROR] at
org.kie.memorycompiler.KieMemoryCompiler.compileNoLoad(KieMemoryCompiler.java:140)
[ERROR] at
org.kie.memorycompiler.KieMemoryCompiler.compileNoLoad(KieMemoryCompiler.java:108)
[ERROR] at
org.drools.quarkus.util.deployment.DroolsQuarkusResourceUtils.compileGeneratedSources(DroolsQuarkusResourceUtils.java:148)
[ERROR] at
org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor.createGeneratedBeanBuildItemsFromJavaSources(KogitoAssetsProcessor.java:309)
[ERROR] at
org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor.generateModel(KogitoAssetsProcessor.java:189)
[ERROR] at
java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:732)
[ERROR] at
io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:856)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:255)
[ERROR] at
org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR] at
org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2675)
[ERROR] at
org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2654)
[ERROR] at
org.jboss.threads.EnhancedQueueExecutor.runThreadBody(EnhancedQueueExecutor.java:1627)
[ERROR] at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1594)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:840)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:499)
```
The problem seems to be with the process class generation, because this was
what I got (notice that the dash is channelled into the corresponding `Process`
variable name, which in Java is then treated as a minus sign):
```java
@jakarta.enterprise.context.ApplicationScoped()
@jakarta.inject.Named("valve")
@io.quarkus.runtime.Startup()
public class ValveProcess extends
org.kie.kogito.process.impl.AbstractProcess<org.kie.kogito.serverless.workflow.models.JsonNodeModel>
{
@jakarta.inject.Inject()
@jakarta.inject.Named("advertise-listing")
org.kie.kogito.process.Process<org.kie.kogito.serverless.workflow.models.JsonNodeModel>
processadvertise-listing;
[...]
}
```
### Expected behavior
_No response_
### Actual behavior
_No response_
### How to Reproduce?
_No response_
### Output of `uname -a` or `ver`
_No response_
### Output of `java -version`
_No response_
### GraalVM version (if different from Java)
_No response_
### Kogito version or git rev (or at least Quarkus version if you are using
Kogito via Quarkus platform BOM)
_No response_
### Build tool (ie. output of `mvnw --version` or `gradlew --version`)
_No response_
### Additional information
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]