Task 2: Building a decision service in the REST API tool

In this task, you create a RuleApp and a snapshot of the decision service.

About this task

To build a decision service in the REST API tool, you first get its deployment ID. You use the Explorer Controller to find the deployment ID of the Loan Validation Service decision service. Then, you use the ID in the Deployment Controller to build a RuleApp and create a snapshot of the decision service.

Step 1: Finding the deployment ID

In this step, you use the Explore Controller to get the deployment ID of the Loan Validation Service decision service.

Procedure

  1. Click Explore to open the controller. It lists operations for exploring Decision Center.
  2. Do a search for decisionservices in your browser to find the decisionservices operation.
  3. Click Get/<version>/decisionservices to get the list of decision services in Decision Center.
  4. Click the Try it out! button at the bottom of the operation window.
    A login dialog opens. You must sign in to Decision Center to access its contents.
  5. Enter Paul as the user name and password, and click OK to authenticate your credentials.
  6. Check the Response Code. If it shows 200, the operation has run successfully.
    The controller displays a list of the decision services in Decision Center. You use the Loan Validation Service decision service:
    Image shows the decision services.
  7. Copy the ID of the decision service to an external file for later use.
  8. Do a search for deployments in your browser to find the deployments operation.
  9. Click Get/<version>/decisionservices/{decisionServiceId}/deployments to expand the operation, which shows deployment configurations for a given decision service.
  10. Paste the ID of the decision service into the decisionServiceId field:
    Image shows the deployment ID field.
  11. Click the Try it out! button at the bottom of the operation window.
  12. Check the Response Code. If it shows 200, the operation has run successfully.
    The Response Body shows two deployment configurations for the decision service. Look at the test deployment configuration:
    Image shows the test deployment data.
  13. Copy the ID of the test deployment deployment to an external file for later use.
  14. Click List Operations at the top of the Explorer Controller to close the operations, and then click Show/Hide to close the controller.

Step 2: Building the decision service

In this step, you build the decision service and create a snapshot by using the Build Controller. You check the results in the Business console.

Procedure

  1. Click Build to expand the controller.
  2. Click Post/<version>/deployments/{deploymentId}/build to open the operation.
  3. Paste the ID of the test deployment deployment into the deploymentId field:
    Image shows the deployment ID.

    Do not enter a name for the snapshot in deploymentSnapshotName. The REST API tool creates a snapshot and gives it a unique name as part of the operation.

  4. Click Try it out!
  5. Check the Response Code. If it shows 200, the operation has run successfully.
    The Response Body shows the results of the build:
    Image shows the information for the build.
  6. Copy the name of the snapshot to an external file for later use.
  7. Click List Operations at the top of the Build Controller to close the operations, and then click Show/Hide to close the controller.

Step 3: Checking the snapshot in the Business console

In this step, you look for the snapshot in the Business console.

Procedure

  1. Open the Business console (see Opening Decision Center on the sample server).
    Because you are already signed in to Decision Center through the REST API tool, the Business console opens without asking for your credentials. It displays the home page for Paul's account.
  2. Open the Library tab, click in the Loan Validation Service box, and then click main to open the branch.
  3. Open the Snapshots tab.
    The tab shows the tutorial snapshot that you created in the REST API tool, further confirming the build:
    Image shows the snapshot in the Business console.

What to do next

In the next task, you test the decision service.