Executing the last semantic version
Semantic versioning for decision services
Semantic versioning is a versioning format that is used in a number of open source projects. This
format is a formal convention to determine the version number of a new software release and the
severity of changes in each new release. For more information about the semantic versioning, see
https://semver.org/
.
You can use the semantic versioning format to version decision services for the decision runtime. You specify versions for your decision services before they are deployed. For more information, see Creating versions.
[major].[minor].[patch]-[pre-release]+[build metadata]| Version | Supported in decision runtime | Mandatory or optional | Supported type | Description |
|---|---|---|---|---|
| Major | Yes | Mandatory |
Number |
It indicates that you make incompatible API changes. |
| Minor | Yes | Mandatory |
Number |
It indicates that you make changes that are compatible with an earlier version. |
| Patch | Yes | Mandatory |
Number |
It indicates that you make bug fixes compatible with an earlier version. |
| Pre-release | Yes | Optional |
String If you try to deploy a decision service with a per-release value that is numerical and not a string, you have an HTTP Bad Request return code, and the decision service cannot be deployed. |
It indicates the state of a release. For example, you can set a string A semantic version with a release value is sorted after a version that does not have a
pre-release version. For example, version |
| Build metadata | No | - | - |
If your decision service has a version with build metadata, the information about the build metadata is not taken into account. The decision service is deployed without any error or warning. |
The semantic versioning allows you to keep track of changes and evolutions of your decision services; therefore, you can create several releases of a decision services.
When you try to deploy a decision service that does not have a version in semantic versioning format, the decision service is deployed but a warning is returned after its deployment.
When you use the decision runtime REST API for executing a decision service that contains any version in nonsemantic versioning format, a warning is returned for the first nonsemantic version of this decision service.
Using the semantic versioning for execution
The latest deployment version is determined based on the value in the metadata
decisionServiceVersion.
For more information about the endpoint to execute the last semantic version of a decision service, see the Last semantic version execution section in the Decision runtime REST API reference in Reference.
The semantic versioning selector selects the latest semantic version of a specific deployment service for the REST API requests. The major, minor, and patch numbers are compared numerically.
- Version
2.2.1is greater than version2.2.0 - Version
2.3.0is greater than version2.2.1 - Version
3.0.0is greater than version2.3.0
You can also indicate the major and minor numbers to select a specific version of a decision service in the REST API operations.
4.0.0, 3.0.0, 2.2.1, 2.2.0, and
2.1.0:- If you set the major number to
2and the minor number to2, then the semantic versioning selector selects version2.2.1. - If you set only the major number to
3, version3.0.0is selected for the decision service. - If you set neither the major nor the minor numbers, the last semantic version is selected, which
is version
4.0.0.