Deploy a release to a virtual environment.
In a Virtual Environment, a Release is deployed directly within the GoRules BRMS system. This setup acts as a self-hosted environment where decision models can be executed and managed natively within the platform.
Once a Release is deployed to a Virtual Environment, the models are immediately available via GoRules' environment evaluation endpoints. This approach is ideal for scenarios where customers don't need complex infrastructure and high performance engines, with minimal external dependencies, offering a straightforward deployment process.
Virtual Environment Setup
Setting Up Virtual Environment
- Open your project.
- Navigate to Settings > Environments.
- Click Create Environment.
- In the dialog, provide a name, choose the type as Virtual, and enter a unique key, such as "staging" or "production".
The Environment KEY must be unique within each project.
Deploying a Release to a Virtual Environment
- Go to Releases.
- Create a new Release if one does not already exist.
- Open the desired Release and click Deploy, or from the list, click the three dots next to the Release and select Deploy.
- In the dialog, select the Environment where you wish to deploy.
- Click Deploy.
- You can check the deployment workflow status under Releases > Runs.
Testing a Release and Environment Evaluation
- From the list of environments, copy the environmentAccessToken.
- Similar to the evaluation endpoint, make a POST request to:
/api/projects/{projectId}/environments/{environmentKey}/evaluate/{documentPath}
- Set the header x-access-token to the token obtained in Step 1.
- In the request body, include a "context" property and proceed with the request.