In the Tutorial's Cargo.ert, click on the Input column and then choose the most strict format, SOAP, Export SOAP to file. Open the file in a text editor:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
			 xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
			 xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <SOAP-ENV:Body>
    <CorticonRequest xmlns="urn:Corticon" 
				xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   
				decisionServiceName="InsertDecisionServiceName">
     <WorkDocuments>
        <Cargo id="Cargo_id_1">
          <weight>1000</weight>
          <volume>10</volume>
          <container xsi:nil="true" />
        </Cargo>
        <Cargo id="Cargo_id_2">
          <weight>1000</weight>
          <volume>40</volume>
          <container xsi:nil="true" />
        </Cargo>
        <Cargo id="Cargo_id_3">
          <weight>30000</weight>
          <volume>20</volume>
          <container xsi:nil="true" />
        </Cargo>
        <Cargo id="Cargo_id_4">
          <weight>1000</weight>
          <volume>10</volume>
          <container xsi:nil="true" />
          <needsRefrigeration>true</needsRefrigeration>
        </Cargo>
      </WorkDocuments>
    </CorticonRequest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>			
Notice that the decisionServiceName says Insert Decision service Name.


Change it to Cargo:


That will be the decision service when it is deployed.

Packaging the Decision Service

Open the Tutorial Ruleflow namedtutorial_example.erf, and then start the packaging process by choosing the Project menu item Package and Deploy Decision Services:

Rename it to Cargo:

The names do not need to match in the Ruletest, but the are integral part of the Decision Service you deploy.

The name is not required to be the project name or the source file name. You could name the Decision Service Freight, and then package it as Freight. Two different Decision Services.

When you use the Web Console, you can see how various names and versions match up for comprehensive testing.

Root Entities

Another aspect of creating decision services is easing the burden in the algorithm that determines the root of the request data.

This has two effects:
  1. If the Vocabulary has a large number of entities, and especially if there are large number of attributes that are common, the algorithm that determines that right match can be more efficient
  2. When the request is in native JSON, the absence of entity IDs and even metadata can make the match arbitrary and possibly cause errors.