Business Rules 10.11 | webMethods Business Rules Web Help | webMethods Business Rules Reference | Services | Summary of REST Services on Integration Server | POST <base URL>/pub.businessrules.restApi.api:businessrules/projects/invoke
 
POST <base URL>/pub.businessrules.restApi.api:businessrules/projects/invoke
Executes a rule set or decision entity and returns the results of execution.
Input Parameters
projectName
String Name of the rule project to be invoked.
invocationTarget
String Type of decision entity and decision entity name.
Specify one of the following:
Specify...
To...
RS/[RuleSetName]
Define a rule set.
DT/[DecisionTableName]
Define a decision table.
D3/[DecisionTreeName]
Define a decision tree.
createMissingInputs
Boolean Optional. Defines whether missing input parameters should be added as empty documents to invoke the call. Set to:
*true if missing inputs should be created.
*false if missing inputs should not be created. This is the default.
inputs
Structured JSON Optional. Defines the input parameter documents with their values.
desiredOutputs
Structured JSON Optional. Defines the filtering of the results according to the respective parameter names.
Output Parameters
Structured JSON
Example
This is an example input for a REST invoke call. This is send via body during the POST request.
{
"projectName": "CustomerOrder",
"invocationTarget": "DT/DetermineDiscountFromOrder",
"createMissingInputs": true,
"inputs": {
"IncomingOrder": {
"orderValue": 5000,
"company": {
"companyName": "ACME Inc"
},
"preferred": "false",
"orderDate": "2020-01-13T11:50:01+01:00"
}
},
"desiredOutputs": [
{
"parameterName": "IncomingOrder"
}
]
}
The output looks like:
{
"outputs": {
"IncomingOrder": {
"preferred": false,
"discount": 14.9,
"orderValue": 5000,
"discountDate": "2020-01-13T11:54:14.024+01:00",
"orderDate": "2020-01-13T11:50:01+01:00",
"company": {
"companyName": "ACME Inc"
}
}
},
"error": null
}
In case of error, the output looks like:
{
"outputs": null,
"error": {
"status": 404,
"code": "0050.8003",
"message": "Can not find project with key [projectName=Project1]"
}
}