Task 6: Deploying and running a decision

You share your latest changes. Then, you deploy your decision service, and run it in the runtime environment.

About this task

In this task, you...

  • Share your latest changes.
  • Create a version of your project.
  • Deploy your decision service.
  • Run the service in the runtime environment.

Step 1: Sharing your decision service

About this task

In this step, you share all the changes that were made on your decision service since Task 2.

Procedure

  1. Click the Share changes button "share changes icon" in the upper right toolbar.
  2. Select My Service, Data, and My model to share all the changes .
  3. Click Share, and enter the following comment:
    Changes from tasks 3, 4 and 5.
  4. Click Share to share your changes in your Git repository. Now, you can deploy your decision service.

Step 2: Deploying your project

About this task

In this step, you deploy your project to the decision runtime.

Procedure

  1. Click the Deploy tab in the menu bar on the header. 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.
  2. Click Create version.
  3. Enter the name 1.0.0 and the following description, and then click Create.
    Completed getting started version

    It is recommended to use the major.minor.patch semantic versioning format (see Creating versions).

  4. Expand 1.0.0. You see that it is not deployed.
  5. Click Deploy at the end of the row for My Service.
  6. Click Deploy in the confirmation window, and wait for the deployment to finish.
    You can see the decisionId in the Decision ID row. It has the following format:
    <Your User ID>/my_getting_started/my_service/myServiceDecisionService/1.0.0-<Timestamp>
    Optionally, you can check the logs by clicking the View logs View logs button button in the Deployment status part.
    The decision service appears as Not tested because you did not create unit tests to run at build time. For more information about unit tests, see Unit tests.

Step 3: Running your decision service in the runtime

About this task

In this step, 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 and Decision services from the run service.

Procedure

  1. In the Deploy tab, click "swagger_ui" at the end of the row for the My Service deployment.
    The Swagger UI tool opens the REST API of your decision service archive.
  2. In the My-Getting-Started/My Service part, expand POST /My-Model/execute, and click Try it out.
  3. 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.

Results

You completed the Decision Intelligence Client Managed Software getting started tutorial. You created a decision service, defined its logic, and shared it. Then after you made an input-output operation and deployed the decision service, you used a Swagger UI to run an archive of the decision service in an embedded runtime.

What to do next

To continue learning about the main features, including the business rules, decision tables, diagrams, rule policies, and data and task models, see the Training sample in the library of samples in Decision Designer. For more information about the library, see the section Import a sample in Building decision services. To get hands-on experience with machine learning, external libraries, or decision service execution, see Decision Intelligence Client Managed Software samples External link opens a new window or tab.