Sometimes a rule author will want to access data from external websites that have exposed data through REST-based services. Typically web websites will use REST when they want to have as broad a reach as possible, allowing people to use simple HTTP verbs to manage data.
InRule supports being able to retrieve data through the use of a REST Operation.
This example will use the freely available test OData endpoint at http://services.odata.org/V4/OData/ OData.svc. The test OData endpoint exposes the following EntitySets:
For this scenario, we will walk through setting up a connection to this OData endpoint and consume it via business rules.
Adding a REST Service
Adding a REST Operation that will query products by rating
Calling a REST Service using the Execute REST Action function
- Select "Execute REST Service" from the Right Click "Add" -> "Actions" menu on a ruleset
- Provide an Expression for each input to the REST Operation and assign the result of the call to either a text variable or a text field
Looking up a specific value from the Execute REST Action response
Comments
0 comments
Please sign in to leave a comment.