Closed veeraa83 closed 4 years ago
Hi,
The payload is correct. Can you send me a snapshot of your DetermineEquipmentRules decision table? or cross-check if the values entered in the decision table are correct?
Best Regards, Vandana
Hi Thanks for the very quick response.I verified once again but could not find out an issue in the decision table. Attaching a snapshot here. Could you please help me identify the issue?
Thanks in advance.
2) Also, I would like to know if the UI used for maintaing the business rules which we deployed SCP
(https://
Hi,
Do you mind sharing your project zip file with me? You can export the project to your local system using the steps in this link: Export a Project
This is the standard UI that is available in the production scenario too.
When we deploy a rule service, it gets deployed to the SAP Cloud Platform (in this case). You can also deploy it to other systems if you configure it. In short, a rule service should be deployed first before invoking it. In this tutorial, we are invoking the rule service using API Business Hub to automate the decision scenario. In a bigger picture, when Business Rules is embedded as a part of a custom application, the rule service should be deployed to the system (For example, SAP Cloud Platform) and invoked to implement the decision logic in your custom application. You can also refer to the Business Rules documentation for more information on the service: SAP Cloud Platform Business Rules
Hi Thanks for your quick reply. I have uploaded the project here. I have tried another scenario with decision table(ProductDiscountRuleService) and it is working fine.
DetermineEquipment01.zip Thanks for your clarification. I deployed the file businessruleseditor_0.0.1.mtar from web IDE as mentioned in the tutorial. so in my trial version, inside the dev space, I could only see one application deployed with the name businessruleseditor_appRouter.(PFA the screenshot app.JPG) After this even if I create any number of rule services inside the Mange Projects UI, I do not see them in this location. I raise this point, since if the deployment of a rule service is as deploying any application from web IDE to cloud platform, then the business user should also be provided with the same authorizations.
Hello Veera, Here are the answers to your questions:
Your payload to test rules is not according to your data object. In your payload you have used isFullTimeEmployee but in your data object you have used IsFullTimeEmployee attribute. In such case, rule engine does not find any matching condition and it return an empty value. Also, I see that your rule-service Id is not defined in your payload, in that case rule engine does not know which rule service to invoke.
Manage Rule Projects application is a standard pre-delivered app-router based application that one needs to set it up in their respective cloud accounts - trial or factory. Entire life cycle of the business rules projects is maintained and managed from this Manage Rule Project app. Business rules project is the container for all design time artefacts of rules like data objects, rule services, rules and rulesets. Everything you create in manage rules application is persisted in the data base maintained by the business rules provider accounts and consumers do not have access to it. This is pretty much standard for all cloud services.
When you deploy the rule service, it becomes available to consumption only via public REST APIs. There is currently no way to see these deployed rule services. When you deploy the rule service it will not be available in under applications in the CF cockpit coz it is not an CF application instead it's a runtime object that can be consumed only via public APIs. All the APIs (design time and runtime) are available in API Business Hub (https://api.sap.com)
Please read more in the documentation , learning journey or several blogs published by us. It is not possible to explain things in detail in tutorials.
Thank you for your feedback. The issue seems to be resolved, so I am closing the issue.
If you still have questions, feel free to reopen the issue.
Tutorial URL: https://developers.sap.com/tutorials/cp-cf-businessrules09-test-apis.html
in this step - Step 4: Observe the API response
I receive the below response, when I sent the payload as given in step# 3 Response { "Result": [] }
Request Payload: { "RuleServiceId": "",
"Vocabulary": [
{
"Employee": {
"isFullTimeEmployee": true,
"countryofCompany": "USA",
"jobTitle": "Engineer II",
"company": "2000"
}
}
]
}