camunda / camunda-bpm-platform

Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Quarkus, Spring, Spring Boot, CDI.
https://camunda.com/
Apache License 2.0
4.07k stars 1.54k forks source link

Provide a code start for Quarkus extension #2669

Open ThorbenLindhauer opened 2 years ago

ThorbenLindhauer commented 2 years ago

This issue was imported from JIRA:

Field Value
JIRA Link CAM-14282
Reporter kE4r6j7
What is this name? This pseudonym name was generated based on the user name in JIRA to protect the personal data of our JIRA users. You can use this identifier to search for issues by the same reporter.
Has restricted visibility comments true

Acceptance Criteria (Required on creation):

Hints (optional):

Links:

ThorbenLindhauer commented 2 years ago

This comment was imported from JIRA and written by user @tmetzke


Hi kE4r6j7,

thanks for creating this issue. We'll have a look as soon as we can and get back to you with any insights we gained.

Best, Tobias

ThorbenLindhauer commented 2 years ago

This comment was imported from JIRA and written by user @tmetzke


Hi kE4r6j7,

the application registered in the catalog serves as a starting point for scaffolding projects easily via io.quarkus.platform:quarkus-maven-plugin or https://code.quarkus.io/d using query parameters. For example, we use the catalog entry to generate a working example with the following command:

$ mvn io.quarkus.platform:quarkus-maven-plugin:2.3.0.Final:create \
    -DprojectGroupId=org.camunda.platform.example \
    -DprojectArtifactId=camunda-k8s-example \
    -Dextensions="camunda,kubernetes,jdbc-postgresql,jib,resteasy" \
    -DplatformVersion="2.1.2.Final" \
    -DnoCode=true \
    -DbuildTool=gradle 

The necessary JDBC dependency is defined as an additional module.

With https://code.quarkus.io we also add the JDBC dependency by customizing the URL parameters: https://code.quarkus.io/d?g=org.camunda.platform.example&a=camunda-k8s-example&b=GRADLE&nc=true&e=kubernetes&e=jdbc-postgresql&e=container-image-jib&e=resteasy&e=org.camunda.bpm.quarkus%3Acamunda-bpm-quarkus-engine

Every project chooses the necessary JDBC dependency itself. We do not rely on a specific dependency by default and would also like to avoid that. Is the general expectation that the generated ZIP file from https://code.quarkus.io/ runs out of the box without adjustments? I believe that many if not all of the catalog entries require a certain custom configuration to run properly.

If it's possible to define default dependencies for the catalog entry in case the ZIP is simply generated from the page, we're happy to add the H2 dependency there. Let us know if you are aware of such a feature or have the resources to add such a feature to the catalog.

Best, Tobias

ThorbenLindhauer commented 2 years ago

This comment was imported from JIRA and written by user kE4r6j7

What is this name? This pseudonym name was generated based on the user name in JIRA to protect the personal data of our JIRA users. You can use this identifier to search for issues by the same reporter.


Hi. Atm there could be a way using codestarts aka sample code applications - check https://code.quarkus.io/?extension-search=origin:platform%20CODE

Trying to findout more how external contributors can provide their codestart. Codestarts I'm aware of are located in https://github.com/quarkusio/quarkus/tree/main/devtools/project-core-extension-codestarts but they are for core Quarkus.

Another option will be available in the (near) future when support for “required capabilities” is added. That should be in the plans, but no eta was provided to me.

ThorbenLindhauer commented 2 years ago

This comment was imported from JIRA and written by user kE4r6j7

What is this name? This pseudonym name was generated based on the user name in JIRA to protect the personal data of our JIRA users. You can use this identifier to search for issues by the same reporter.


Update for codestarts: you will need to adjust https://github.com/camunda/camunda-bpm-platform/blob/master/quarkus-extension/engine/runtime/src/main/resources/META-INF/quarkus-extension.yaml to define codestart

gRPC (core) example:

Kogito (external) example:

ThorbenLindhauer commented 2 years ago

This comment was imported from JIRA and written by user @tmetzke


Thanks kE4r6j7, we'll have a look and adjust our configuration if possible. (y)

Best, Tobias

ThorbenLindhauer commented 2 years ago

This comment was imported from JIRA and written by user @tmetzke


Hi kE4r6j7,

sorry for the late reply. We have added this to our backlog to potentially tackle this in the future. This doesn't yet mean we're going to work on this anytime soon, however. We'll consider this in the next scheduling meetings.

Let me know if the new description fits what you had in mind with the hints to code starts in your previous comments or if we should pay attention to anything else. Thanks again for making us aware of this!

Best, Tobias