GopikaReghunath opened a new pull request, #4297: URL: https://github.com/apache/incubator-kie-kogito-runtimes/pull/4297
closes: https://github.com/apache/incubator-kie-issues/issues/2317 Code generation fails for Task Name containing hyphen as well as other special characters Valid Java identifier characters include: (should not be replaced in method name) * ✅ Letters (a-z, A-Z) * ✅ Digits (0-9) * ✅ Underscore (_) * ✅ Dollar sign ($) ← This is valid! Invalid characters that get replaced: * ❌ Hyphen (-) * ❌ Space ( ) * ❌ Dot (.) * ❌ At sign (@) * ❌ Most special characters Steps for testing Update the taskname / create a bpmn with taskname containing a hyphen Try to run the business service with the bpmn file The code should be generated successfully without failure The {process}Resource.java file genertaed should not have any compilation issues and methods like below will be present (The hyphen in method name should be replaced) ``` @GET @Path("/{id}/hr-interview/{taskId}/schema") @Produces(MediaType.APPLICATION_JSON) @jakarta.transaction.Transactional() @org.eclipse.microprofile.faulttolerance.Retry() public Map<String, Object> getSchemaAndPhases_hr_interview_1(@PathParam("id") final String id, @PathParam("taskId") final String taskId, @QueryParam("user") final String user, @QueryParam("group") final List<String> groups) { return processService.getWorkItemSchemaAndPhases(process, id, taskId, "hr-interview", SecurityPolicy.of(identityProviderFactory.getOrImpersonateIdentity(user, groups))); } ``` The url will still remain `/{id}/hr-interview/{taskId}/schema` -- 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]
