Este conteúdo não está disponível no idioma selecionado.
Chapter 1. Overview
You can develop a decision service in Red Hat Decision Manager using Decision Central. To run a decision service, you need to deploy it onto a Decision Server.
1.1. Packaging decision services Copiar o linkLink copiado para a área de transferência!
A decision service is always packaged into a KJAR file. This file is a version of a Java JAR file. A Decision Server runs the service from its KJAR file. However, you never need to work with KJAR files directly.
Instead, Red Hat Decision Manager stores KJAR files in Maven repositories. Maven is a comprehensive system for automating Java package lifecycle and dependency management. Among other features, Maven supports a repository system where JAR files (including KJAR files) can be uploaded and downloaded.
In Maven, a KJAR file is not identified by its name, but instead using the following three values: group ID, artifact ID, version. Normally, the group ID is the identifier for a project and the artifact identified a particular artifact (for example, a decision service) within the project. The version value must be unique for every new version that might need to be deployed.
To identify an artifact (including a KJAR file) in Maven, you need all three of these variables. This set of information is often named GAV (for Group, Artifact, Version).
When developing a decision service in Decision Central, you can set the GAV in the project settings screen.
1.2. Deploying decision services Copiar o linkLink copiado para a área de transferência!
The deployment process can vary based on the needs of your infrastructure.
In a simple deployment of Red Hat Decision Manager, there is one Decision Central and one Decision Server. You can use the Decision Central to develop your decision services and also to manage the Decision Server. You can simply build your project in Decision Central and it is automatically deployed onto the Decision Server.
To enable automatic deployment, Decision Central includes a built-in Maven repository. You can use Decision Central to manage the Decision Server, deploying, removing, starting, and stopping any of the decision services and their versions that you have built.
You can also connect several Decision Servers to the same Decision Central. You can group them into different server templates. Servers belonging to the same server template run the same decision services. But you can deploy different decision services or different versions of decision services on different templates.
For example, you could have test servers in the Test
template and production servers in a Production
template. When developing a decision service, deploy it on the Test
template. Then, when a version of the service is sufficiently tested, you can deploy it on the Production
template.
In this case, to keep developing the service, change the version in the project settings. Then the new version and the old version are seen as different artifacts in the built-in Maven repository. You can deploy the new version on the Test
template and keep running the old version on the Production
template.
This deployment process is simple but has significant limitations. Notably, there is not enough access control; a developer can deploy a project directly into production.
If you require a proper integration process, you can use an external Maven repository (for example, Nexus). You can configure Decision Central to push decision service files into the external repository instead of the built-in repository.
You can still use Decision Central to deploy decision services on a test Decision Server. However, in this process, other Decision Servers (for example, staging and production) are not connected to Decision Central. Instead, they retrieve the decision service KJAR files and any necessary dependencies from your Maven repository. You can progress the KJAR versions through your repository as necessary, in line with the integration process that you want to implement.
If you deploy a Decision Server on OpenShift, you can configure it to load and start a decision service from a Maven repository automatically. If you deploy a Decision Server on premises, you can configure access to a Maven repository when setting up the server; then you can use the REST API of the server to load and start a decision service from the repository. A Maven project and a Java client library for automating the API calls are available.