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

[role="_abstract"]
You can migrate a KJAR that is implemented using PMML model to a {KOGITO} microservice.

.Procedure
. Create a Maven project for your {KOGITO} microservice.
+
For the procedure about creating a Maven project, see {URL_GETTING_STARTED_KOGITO_MICROSERVICES}#proc-kogito-creating-maven-project_getting-started-kogito-microservices[_Creating a Maven project for a {KOGITO} microservice_].
+
The Maven project creates Kogito artifacts.

. Copy the PMML models from the `src/main/resources` folder of the KJAR to the `src/main/resources` folder of the Kogito artifact.
. Run the following command to execute the {KOGITO} application:
+
--
[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 PMML model KJAR to a {KOGITO} microservice, you need to deploy the microservice using {OPENSHIFT}. For deployment options with Openshift, see {URL_GETTING_STARTED_KOGITO_MICROSERVICES}#con-kogito-operator-deployment-options_deploying-kogito-microservices-on-openshift[_OpenShift deployment options with the RHPAM Kogito Operator_].
