Step 2: Defining and Publishing the Vocabulary for Contoso
In this scenario, Contoso implements a business policy that makes sure that inventory is always on hand if an emergency occurs. You create business policies using the Business Rule Composer in BizTalk Server. In this step, you create the vocabulary to use when you define the business policy.
To add a new vocabulary
Click Start, point to All Programs, point to MicrosoftBizTalk Server, and then click Business Rule Composer.
In the Open Rule Store dialog box, click OK.
In the Facts Explorer pane, on the Vocabularies tab, right-click Vocabularies, and then click Add New Vocabulary.
Name the vocabulary 3A2PriceAvailabilityVocabulary, and then press Enter.
To define a constant vocabulary value
In Business Rule Composer, click 3A2PriceAvailabilityVocabulary, right-click Version 1.0(not saved), and then click Add New Definition.
On the Vocabulary Definition Wizard page, select Constant Value, Range of Values, or Set of Values, and then click Next.
On the Constant Value, Range of Values, or Set of Values page, in the Definition name box, type Emergency Quantity Needed, and then click Next.
On the Define a Constant Value page, in the Value box, type 800, and then click Finish.
To define an XML document 'Get' element
In Business Rule Composer, in the Facts Explorer pane, right-click Version 1.0 (not saved) under 3A2PriceAvailabilityVocabulary, and then click Add New Definition.
On the VocabularyDefinition Wizard page, select XML Document Element or Attribute, and then click Next.
On the XML Document Element or Attribute page, in the Definition Name box, type Quantity Available.
Click Browse (next to the Schema field), move to the ContosoPriceAndAvailability project in your solution folder, select the ContosoPriceAndAvailability.xsd schema, and then click Open.
In the Select Binding dialog box, expand rootPriceResponse, expand Products, select the NumberAvailable element, and then click OK.
On the XML Document Element or Attribute page, in the Document Type box, ensure that the value is ContosoPriceAndAvailability.ContosoPriceSchema.rootPriceResponse.
In the Select operation section, select Perform "Get" Operation, and then click Finish.
To define an XML document 'Set' element
In Business Rule Composer, in the Facts Explorer pane, right-click Version 1.0 (not saved) under 3A2PriceAvailabilityVocabulary, and then click Add New Definition.
On the VocabularyDefinition Wizard page, select XML Document Element or Attribute, and then click Next.
On the XML Document Element or Attribute page, in the Definition Name box, type Final Quantity Available.
Click Browse (next to the Schema field), move to the ContosoPriceAndAvailability project in your solution folder, select the ContosoPriceAndAvailability.xsd schema, and then click Open.
In the Select Binding dialog box, expand rootPriceResponse, expand Products, and then select the NumberAvailable element. Click OK.
On the XML Document Element or Attribute page, in the Document Type box, ensure that the value is ContosoPriceAndAvailability.ContosoPriceSchema.rootPriceResponse.
In the Select operation section, select Perform "Set" Operation, and then click Next.
In the Specify the Display Name page, click Finish.
To save and publish the vocabulary
In Business Rule Composer, in the Facts Explorer pane, right-click Version 1.0 (not saved) under 3A2PriceAvailabilityVocabulary, and then click Save.
Right-click that same Version 1.0 node and then click Publish.
Note
Leave the Business Rule Composer open for the next step in the tutorial.
See Also
Step 3: Defining, Publishing, and Deploying the Business Policy for Contoso