[id="proc-kogito-migrate-dmn-model-kjar_{context}"]
= Migrating a DMN model KJAR to a {KOGITO} microservice

[role="_abstract"]
After migrating your external application, you need to migrate a KJAR that is specific to a DMN model to a {KOGITO} microservice.

.Procedure
. Create a Maven project for your {KOGITO} microservice.
+
For additional information about the procedure about creating a Maven project, you can reference https://blog.kie.org/2021/03/modeling-and-development-of-decision-services-dmn-with-kogito.html[_Modeling and development of decision services: DMN with Kogito_ blog post].
+
The Maven project creates Kogito artifacts.

. Copy the DMN models from the `src/main/resources` folder of the KJAR to the `src/main/resources` folder of the Kogito artifact.
. Copy the test scenarios from the `src/test/resources` folder of the KJAR to the `src/test/resources` folder of the Kogito artifact.
+
IMPORTANT: You need to import the {KOGITO} dependency of test scenarios in the `pom.xml` file of your project and create a JUnit activator using the {KIE_SERVER} REST API.

. Run the following command and ensure that the test scenario is running for the specified non-regression tests.
+
--
[source]
----
mvn clean install
----

After running the {KOGITO} application, you can retrieve the Swagger or OAS specification file. The Swagger or OAS specifications provide the same information as the REST endpoint along with the following implementation details:

* Base URL of the server where the API is available
* References Schemas names

You can use the provided implementation details when your external application is re-routed to the new URL.
--

After migrating a DMN model KJAR to a {KOGITO} microservice, you can deploy the microservice using {OPENSHIFT}. 
