Open Editions

 View Only

Initial project setup using IBM BAMOE Developer tools for VS Code in Podman

By Raul Mariano posted 24 days ago

  
As described in the main post, I'm publishing some ways to use IBM BAMOE locally with Podman Desktop. In this article, I will present the step-by-step guide for the initial configuration of the project using the BAMOE Developer tools for VS Code, where we will build a Quarkus project using Apache Maven, using an example DMN project for testing.
This article was based on the official documentation for IBM Business Automation Manager Open Edition 9.0.x, which already has a step-by-step guide for the initial configuration of a project using Apache Maven. Even so, I rewrote the necessary steps to add some tips and comments. For more details, click here.

To ensure the success of the deployment, we need to check some prerequisites:
  • Podman Desktop with the machine running
    • To follow the next steps, make sure your Podman Desktop is properly installed as instructed in the main article.
  • Apache Maven
    • Following the guidance in the BAMOE documentation, it is necessary to install Apache Maven 3.8.x. To install, visit the Apache Maven website.
  • IBM BAMOE Developer Tools for Visual Studio Code

With all prerequisites met, we can perform the steps to create and compile the DMN project:

  • Open your operating system console and navigate to your preferred directory.
    • I'm using Windows 10 and I will create the project in c:\.
  • Run the Maven command to create the project folder and dependentes. We will call "quick-kogito".
    • For Windows, I recommend running cmd as administrator, don't use backslash and put everything on the same line.

mvn io.quarkus:quarkus-maven-plugin:2.16.7.Final:create \

    -DprojectGroupId=com.ibm \

    -DprojectArtifactId=quick-kogito \

    -DprojectVersion=1.0.0-SNAPSHOT \

    -DplatformVersion=2.16.7.Final \

    -DplatformGroupId=io.quarkus.platform \

    -DplatformArtifactId=quarkus-bom \

    -Dextensions=kogito-quarkus,dmn,resteasy-reactive-jackson,quarkus-smallrye-openapi,quarkus-smallrye-health

  • Wait a few minutes for the “BUILD SUCCESS” message, and the project created in the directory.

    • In VS Code, open the quick-kogito project folder and select the pom.xml file, as some dependencies must be changed manually.

1 - Add code:

<kogito.bom.group-id>com.ibm.bamoe</kogito.bom.group-id>
<kogito.bom.artifact-id>bamoe-bom</kogito.bom.artifact-id>
<kogito.bom.version>9.0.0.Final</kogito.bom.version>

2 - Delete code:

<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>quarkus-kogito-bom</artifactId>
<version>${quarkus.platform.version}</version>

3 - Add code:

<groupId>${kogito.bom.group-id}</groupId>
<artifactId>${kogito.bom.artifact-id}</artifactId>
<version>${kogito.bom.version}</version>

4 - Add code:

<dependency>
  <groupId>com.ibm.bamoe</groupId>
  <artifactId>bamoe-ilmt-compliance-quarkus-pamoe</artifactId>
</dependency>

  • Back in the console, make sure you are in the quick-kogito project folder and run the command to build the project in the root folder:

mvn clean package

    • Wait again until you receive the “BUILD SUCCESS” message:

  • This project already has an example DMN, you can find it inside the folder: quick-kogito/src/main/resources/pricing.dmn
    • In short, this DMN receives two data as input to decide the price. As my objective is not to go into detail about the construction of the diagrams themselves, we proceed to the next step.

Now that the quick-kogito project has been configured, let's compile the project:

  • Note that your Podman Desktop does not have any images or containers.

 

  • In the console, run the command to build the project:

mvn clean compile quarkus:dev

  • This process may take a while, but you can watch the download of images and then the running containers on your Podman Desktop.
    • Downloaded images:

    • Running container:

  • Once the entire process is completed successfully, a large “QUARKUS” message will be printed on the console.

Very good! Your application has been “containerized” and is running on Podman! Here are some super useful URLs:

From this point on, you can create and test your projects via API. Remember to follow the official IBM Business Manager Open Edition documentation to find out what's new. I hope I contributed to the community. Thanks!

#bamoe#opensource#podman#kogito

0 comments
39 views

Permalink