Blog Posts BPMN DMN

Deploy decisions to DMN Developer Sandbox

Blog: Drools & jBPM Blog

In early 2021, Red Hat introduced the Developer Sandbox for Red Hat OpenShift. On top of that, we built the DMN Developer Sandbox, which makes deploying decision services easy for developers, and this is now live at dmn.new as part of the Kogito Tooling 0.12.0 release.

Let’s check out how the DMN Developer Sandbox works in this post!

Photo by NASA on Unsplash

If you are not familiar with the Developer Sandbox for Red Hat OpenShift, here is a quote from the official website that pretty much sums up all its capabilities:

The sandbox provides you with a private OpenShift environment in a shared, multi-tenant OpenShift cluster that is pre-configured with a set of developer tools. You can easily create containers from your source code or Dockerfile, build new applications using the samples and stacks provided, add services such as databases from our templates catalog, deploy Helm charts, and much more. Discover the rich capabilities of the full developer experience on OpenShift with the sandbox.

In addition, I recommend the KIE Live #35, which shows how to stream decisions using both the Developer Sandbox for Red Hat OpenShift and the Red Hat OpenShift Streams for Apache Kafka.

https://www.youtube.com/watch?v=pgj4jmkAl5A&ab_channel=KIE

Now, let’s talk about the DMN Developer Sandbox.

Simply put, the DMN Developer Sandbox allows you to deploy decision models to the Developer Sandbox for Red Hat OpenShift.

Here is what happens behind the scenes when you deploy your DMN:

Important: The DMN Developer Sandbox is intended to be used during development, so users should not use the deployed DMN services in production or for any type of business-critical workloads.

Step by step: How to deploy your decision model

1-) Go to dmn.new

You will notice that the toolbar has slightly changed.

dmn.new

In the highlighted red rectangle, you will find the KIE Tooling Extended Services status icon, the DMN Developer Sandbox dropdown (as Deploy), the DMN Runner button (as Run), and the Save button.

Check out this post to learn more about the DMN Runner.

2-) Install the KIE Tooling Extended Services

Since both DMN Runner and DMN Developer Sandbox features depend on having the KIE Tooling Extended Services running, you need to install it. To do so, click on the Deploy dropdown or on the Run button, and follow the steps that will be presented to you.

Once the KIE Tooling Extended Services is running, the status icon will turn green.

Note: You need to install the 0.12.0 version of the KIE Tooling Extended Services even if you are using an older version.

KIE Tooling Extended Services running.

3-) Setup your Developer Sandbox information

Click on the Deploy dropdown and then Setup.

Since this is the first time we are setting this up, let’s use the guided wizard instead. In the popup, click on the Configure through the guided wizard instead link.

Open the guided wizard to configure the Developer Sandbox information.

In the first step of the wizard, you need to set up your Developer Sandbox for Red Hat OpenShift instance before proceeding with the rest of the steps. As you will be instructed in the wizard, access the Get Started page and create your instance.

Developer Sandbox for Red Hat OpenShift fresh instance.

Once your instance is ready, you can pick up your username in the upper-right corner and place it in the first step of the wizard. This information is necessary for locating your namespaces (or projects).

Note: You receive two namespaces (or projects) when you create your instance, namely username-dev and username-stage. However, we always use the username-dev for the deployments on this first release of the DMN Dev Sandbox.

Fill up the first step with the username.

In the second step of the wizard, you need to provide some more information about your newly created instance. Following the instructions provided in the wizard, you will reach this page in your instance:

Get the host and token information.

On this page, you need to copy the –server and –token information, and paste them in the second step of the wizard. This information is necessary for establishing a connection with your instance.

Note: Do not share your personal token with anyone.

Fill up the second step with host and token.

In the next and last step, you should see that your connection has been successfully established using the three pieces of information that you provided (username, host, and token).

Connection successfully established in the last step of the wizard.

You can then Deploy now or Continue editing. Since our decision model is not ready yet, I will go with Continue editing.

Now that everything is set up, you are able to deploy your decision models and check the other deployments that you have done. You will also notice a blue bar at the bottom of the Deploy dropdown button, indicating that your instance is connected.

DMN Developer Sandbox connected.

4-) Design your decision model

In this tutorial, I will be using the Traffic Violation decision model. The cool thing is that, while authoring my decision model, I can use the DMN Runner to be sure that everything is working as expected.

Traffic Violation decision model.

5-) Deploy your decision model

Once your decision model is ready, you can go ahead and deploy it. Keep in mind that each deployment takes a few minutes (usually) and it is immutable, i.e., you will need to trigger a new deployment if you make changes in your decision model.

Once done, you will find your deployment in your username-dev namespace.

Deploy the model and see the deployment in progress.

You will see a green indicator icon once your deployment is up and running.

The deployment is up and running.

Note: The deployment will fail if your decision model contains errors.

6-) Check out your deployed decision model

Once your deployment is up and running, you can access it through the Deploy dropdown. When you do so, a new page will be open on your browser containing the form associated with your model for you to test and share the URL with others.

Open the form associated with the deployed decision model.
Test the deployed decision model.

You can also access the Swagger UI associated with the deployed decision model and share the URL with others.

Access the Swagger UI associated with the deployed decision model.

Lastly, you can even open your decision model on dmn.new and share the URL with others.

Some things to keep in mind

I would like to recommend the KIE Live #40 if you want to see more details and a full end-to-end demonstration on how to use the DMN Developer Sandbox.

https://www.youtube.com/watch?v=2zY85TXFNuw

And that’s all for today. Thanks for reading! 😃

The post Deploy decisions to DMN Developer Sandbox appeared first on KIE Community.

Leave a Comment

Get the BPI Web Feed

Using the HTML code below, you can display this Business Process Incubator page content with the current filter and sorting inside your web site for FREE.

Copy/Paste this code in your website html code:

<iframe src="https://www.businessprocessincubator.com/content/deploy-decisions-to-dmn-developer-sandbox/?feed=html" frameborder="0" scrolling="auto" width="100%" height="700">

Customizing your BPI Web Feed

You can click on the Get the BPI Web Feed link on any of our page to create the best possible feed for your site. Here are a few tips to customize your BPI Web Feed.

Customizing the Content Filter
On any page, you can add filter criteria using the MORE FILTERS interface:

Customizing the Content Filter

Customizing the Content Sorting
Clicking on the sorting options will also change the way your BPI Web Feed will be ordered on your site:

Get the BPI Web Feed

Some integration examples

BPMN.org

XPDL.org

×