Task 6: Deploying and executing a decision
You share your latest changes. Then, you deploy your decision service, and execute it in the runtime environment.
Step 1: Sharing your changes
- Click Share changes
in the upper right toolbar.
- Select My Service, Data, and My model to share all the changes .
- Click Share, and enter the following comment:
Changes from tasks 3, 4 and 5. - Click Share.
Now, you can deploy your decision service.
Step 2: Deploying your automation
- Go to the Deploy tab.
You see that no version exists, and you have a suggestion to create a new version from the changes that you shared in the previous steps.
- Click Create version.
- Enter the name 1.0.0 and the following description, and then click
Create.
Completed getting started versionIt is recommended to use the
major.minor.patchsemantic versioning format (see Creating versions). - Expand
1.0.0. You see that it is not deployed. - Click Deploy at the end of the row for My Service.
- Click Deploy in the confirmation window, and wait for the deployment to finish.
- Click the View logs
icon in the Deployment status part. In the logs, locate the Decision Service ID. It has a format similar to:
<service-id>/<My-Getting-Started>/My Service. Copy this ID, it is used to identify your decision service when configuring monitoring in the next task.
Step 3: Executing your decision service in the runtime
You use the Swagger UI tool to access the REST API that the runtime generates to run your decision service archive. For more information, see Swagger UI.
- In the Deploy tab, click Manage deployment at the
end of the row for the My Service deployment.
The Decision deployments page opens.
- Click the Swagger UI button next to My
Service.
The Swagger UI tool opens the REST API of your decision service archive.
- In the My-Getting-Started/My Service part, expand
POST/My-Model/execute, and click Try it out. - Enter the following schema in the request body:
{ "name": "Jamie", "weather": { "rainForecast": 90, "stormAlert": true, "temperature": "cold" } } - Click Execute. You get the following
response:
Hello Jamie! Stay home! There is a storm alert.