Create Rule Services and Rulesets
Create a rule service interface for an application to invoke the decision logic by associating the rule to a ruleset of the rule service.
Overview
You will learn
- How to create a rule service as an interface
- How to create a rule set and associate rules to a rule service
Prerequisites
Steps
Intro
A rule service is an interface or an end point that enables an application to invoke a decision logic. A rule set is a collection of rules related to a scenario, for example, assigning equipment to an employee in this tutorial. A rule set can be linked to a rule service so that the set of rules in the rule set gets executed when the rule service is deployed.
In this tutorial, we will create the rule services and rule sets required to deploy the decision logic.
Navigate to the Rule Service tab, then choose + to create a new rule service.

Create rule service In the New Rule Service page, enter the following details:
Name Label Description DetermineEquipmentRuleserviceDetermineEquipmentRuleserviceService to determine equipment for the new hire.
Rule service details In the Vocabulary tab, choose + and select the following options:
Name Usage EmployeeInputSimilarly, choose + to add a new row and select the following options:
Name Usage EquipmentInfoResultThen, choose Activate.

Activate rule service Navigate to the Rule Service tab and create and activate another rule service with the following details:
| Name | Label | Description | :————- | :————- |
EquipmentApprovalRuleservice|EquipmentApprovalRuleservice|Rule service to determine if the approval is needed for the equipment or not.Vocabulary:
Name Usage EquipmentInputEquipmentApprovalResultThen, choose Activate.

New rule service Navigate to the Rule Service tab to view the list of rule services.

List of rule services
Navigate to the
Rulesettab, then choose +.
Create a ruleset In the
New Rulesetpage, enter the following details:Name Label Description Rule Service DetermineRuleEquipmentRulesetDetermineRuleEquipmentRulesetRuleset that contain the rules needed to determine the equipment required for a new hire.DetermineEquipmentRuleserviceYou can leave the Priority and Policy fields and Vocabulary section as it is.

Ruleset details Choose the Rules tab, choose Add Rule > Insert First.

Insert Rules Select
DetermineEquipmentRulesfrom the dropdown list. Then, choose Activate to activate the rule set.
Select rules for the ruleset Similarly, create and activate a rule set with the following details:
Name Label Description Rule Service EquipmentApprovalRulesetEquipmentApprovalRulesetRuleset to contain rules that determine if the approval is needed for the list of equipment order or not.EquipmentApprovalRuleserviceYou can leave the Priority and Policy fields and Vocabulary section as it is.
In the Rules tab, choose
EquipmentApprovalRulesfrom the dropdown list and then choose Activate.
New ruleset Navigate to the
Rulesettab to view the list of rule sets as shown:
List of rulesets
Resources
Discussion
Share feedback on this tutorial or join the conversation in SAP Community.