URL:
e.g. http://servername/InRuleRuleEngineService/HttpService.svc/ExecuteDecision
Method:
POST
See below for examples of requests and responses in both JSON and XML formats. The variations shown are:
- File-based Rule Application (deployed on irServer)
- Catalog Rule Application
- Rule Application specified by either Name or GUID
- Revision specified as Latest, Label, or Revision
- Authentication using specified Username / Password, Single Sign-On, or using irServer config-specified credentials
- Optional RequestId specified
- Optional CacheTimeout specified
- Optional ConnTimeout specified
- Optional Overrides specified
- Optional Output Options specified (overriding defaults)
Sample JSON Requests
Sample JSON Request: Filesystem Rule Application
{
"RuleApp": {
"FileName": "RuleApp1.ruleappx"
},
"DecisionName": "CalculateArea",
"InputState": "{\"height\":10,\"width\":2}"
}
Sample JSON Request: Catalog Rule Application: Latest Revision by Name
{
"RuleApp": {
"RepositoryRuleAppRevisionSpec": {
"RuleApplicationName": "RuleApp1"
},
"RepositoryServiceUri": "http://localhost/InRuleCatalogService/service.svc",
"UserName": "CatUsername",
"Password": "CatPassword"
},
"DecisionName": "CalculateArea",
"InputState": "{\"height\":10,\"width\":2}"
}
Sample JSON Request: Catalog Rule Application: Latest Revision by GUID
{
"RuleApp": {
"RepositoryRuleAppRevisionSpec": {
"Guid": "5f11d845-bda1-4f79-ba67-e8cd12d065f7"
},
"RepositoryServiceUri": "http://localhost/InRuleCatalogService/service.svc",
"UserName": "CatUsername",
"Password": "CatPassword"
},
"DecisionName": "CalculateArea",
"InputState": "{\"height\":10,\"width\":2}"
}
Sample JSON Request: Catalog Rule Application: Labeled Revision by Name
{
"RuleApp": {
"RepositoryRuleAppRevisionSpec": {
"Label": "Label1",
"RuleApplicationName": "RuleApp1"
},
"RepositoryServiceUri": "http://localhost/InRuleCatalogService/service.svc",
"UserName": "CatUsername",
"Password": "CatPassword"
},
"DecisionName": "CalculateArea",
"InputState": "{\"height\":10,\"width\":2}"
}
Sample JSON Request: Catalog Rule Application: Specific Revision by Name
{
"RuleApp": {
"RepositoryRuleAppRevisionSpec": {
"Revision": 3,
"RuleApplicationName": "RuleApp1"
},
"RepositoryServiceUri": "http://localhost/InRuleCatalogService/service.svc",
"UserName": "CatUsername",
"Password": "CatPassword"
},
"DecisionName": "CalculateArea",
"InputState": "{\"height\":10,\"width\":2}"
}
Sample JSON Request: Catalog Rule Application: SSO Authentication (using service host account credential)
{
"RuleApp": {
"RepositoryRuleAppRevisionSpec": {
"RuleApplicationName": "RuleApp1"
},
"RepositoryServiceUri": "http://localhost/InRuleCatalogService/service.svc",
"UseIntegratedSecurity": true,
"UserName": "CatUsername"
},
"DecisionName": "CalculateArea",
"InputState": "{\"height\":10,\"width\":2}"
}
Sample JSON Request: Catalog Rule Application: irServer config-specified credentials Authentication
{
"RuleApp": {
"RepositoryRuleAppRevisionSpec": {
"RuleApplicationName": "RuleApp1"
},
"RepositoryServiceUri": "http://localhost/InRuleCatalogService/service.svc"
},
"DecisionName": "CalculateArea",
"InputState": "{\"height\":10,\"width\":2}"
}
Sample JSON Request: Catalog Rule Application: RequestId, CacheTimeout, ConnTimeout, Overrides, Output Options specified
{
"RequestId": "A1E9BB89-7B46-4F62-B9AA-62FB03D73F03",
"RuleApp": {
"CacheTimeout": 120,
"ConnTimeout": 100,
"RepositoryRuleAppRevisionSpec": {
"Revision": 3,
"RuleApplicationName": "RuleApp1"
},
"RepositoryServiceUri": "http://localhost/InRuleCatalogService/service.svc",
"UserName": "CatUsername",
"UseIntegratedSecurity":true,
},
"RuleEngineServiceOptions": {
"Overrides": [
// see Overrides for example.
],
"RuleSessionOverrides": {
"ExecutionTimeout": "PT40S",
"MaxCycleCount": 200000,
"Now": "/Date(928167600000-0500)/",
},
},
"RuleEngineServiceOutputTypes": {
"ActiveNotifications": true,
"ActiveValidations": true,
"EntityState": true,
"Overrides": true,
"RuleExecutionLog": true
},
"DecisionName": "CalculateArea",
"InputState": "{\"height\":10,\"width\":2}"
}
Sample JSON Response
{
"ActiveNotifications": [{
"Changed": true,
"ElementId": "String content",
"FiredBy": ["String content"],
"IsActive": true,
"ManagedByRuleEngine": true,
"MarkedForRemoval": true,
"Message": "String content",
"NoteUniqueKey": "String content",
"NotificationType": "String content"
}],
"ActiveValidations":[{
"ElementIdentifier": "String content",
"InvalidMessageText": "String content",
"IsValid": true,
"Reasons": [{
"FiringRuleId": "String content",
"ManagedByRuleEngine": true,
"MarkedForRemoval": true,
"MessageText": "String content",
"OwningRuleId": "String content"
}]
}],
"HasRuntimeErrors": false,
"OutputState": "{\"area\":20}",
"RequestId": "a1e9bb89-7b46-4f62-b9aa-62fb03d73f03",
"RuleExecutionLog": {
"CalcsEvaluatedCount": 9223372036854775807,
"Messages": [{
"Description": "String content",
"ChangeType": 0,
"CollectionCount": 2147483647,
"CollectionId": "String content",
"MemberId": "String content",
"MemberIndex": 2147483647
}],
"PerformedIncrementalEvaluation": true,
"RulesEvaluatedCount": 9223372036854775807,
"RulesEvaluatedTrueCount": 9223372036854775807,
"TotalEvaluationCycles": 9223372036854775807,
"TotalExecutionTime": "P428DT10H30M12.3S",
"TotalTraceFrames": 2147483647
},
"SessionId":"1627aea5-8e0a-4371-9022-9b504344e724"
}
Sample XML Requests
In all XML request examples below, elements must be ordered exactly as specified.
Sample XML Request: Filesystem Rule Application
<ExecuteDecisionRequest xmlns="http://www.inrule.com/XmlSchema/Schema">
<RuleApp>
<FileName>RuleApp1.ruleappx</FileName>
</RuleApp>
<DecisionName>CalculateArea</DecisionName>
<InputState>{ "height": 10, "width": 2 }</InputState>
</ExecuteDecisionRequest>
Sample XML Request: Catalog Rule Application: Latest Revision by Name
<ExecuteDecisionRequest xmlns="http://www.inrule.com/XmlSchema/Schema">
<RuleApp>
<Password>CatPassword</Password>
<RepositoryRuleAppRevisionSpec>
<RuleApplicationName>RuleApp1</RuleApplicationName>
</RepositoryRuleAppRevisionSpec>
<RepositoryServiceUri>http://localhost/InRuleCatalogService/service.svc</RepositoryServiceUri>
<UserName>CatUsername</UserName>
</RuleApp>
<DecisionName>CalculateArea</DecisionName>
<InputState>{ "height": 10, "width": 2 }</InputState>
</ExecuteDecisionRequest>
Sample XML Request: Catalog Rule Application: Latest Revision by GUID
<ExecuteDecisionRequest xmlns="http://www.inrule.com/XmlSchema/Schema">
<RuleApp>
<Password>CatPassword</Password>
<RepositoryRuleAppRevisionSpec>
<Guid>5f11d845-bda1-4f79-ba67-e8cd12d065f7</Guid>
</RepositoryRuleAppRevisionSpec>
<RepositoryServiceUri>http://localhost/InRuleCatalogService/service.svc</RepositoryServiceUri>
<UserName>CatUsername</UserName>
</RuleApp>
<DecisionName>CalculateArea</DecisionName>
<InputState>{ "height": 10, "width": 2 }</InputState>
</ExecuteDecisionRequest>
Sample XML Request: Catalog Rule Application: Labeled Revision by Name
<ExecuteDecisionRequest xmlns="http://www.inrule.com/XmlSchema/Schema">
<RuleApp>
<Password>CatPassword</Password>
<RepositoryRuleAppRevisionSpec>
<Label>Label1</Label>
<RuleApplicationName>RuleApp1</RuleApplicationName>
</RepositoryRuleAppRevisionSpec>
<RepositoryServiceUri>http://localhost/InRuleCatalogService/service.svc</RepositoryServiceUri>
<UserName>CatUsername</UserName>
</RuleApp>
<DecisionName>CalculateArea</DecisionName>
<InputState>{ "height": 10, "width": 2 }</InputState>
</ExecuteDecisionRequest>
Sample XML Request: Catalog Rule Application: Specific Revision by Name
<ExecuteDecisionRequest xmlns="http://www.inrule.com/XmlSchema/Schema">
<RuleApp>
<Password>CatPassword</Password>
<RepositoryRuleAppRevisionSpec>
<Revision>3</Revision>
<RuleApplicationName>RuleApp1</RuleApplicationName>
</RepositoryRuleAppRevisionSpec>
<RepositoryServiceUri>http://localhost/InRuleCatalogService/service.svc</RepositoryServiceUri>
<UserName>CatUsername</UserName>
</RuleApp>
<DecisionName>CalculateArea</DecisionName>
<InputState>{ "height": 10, "width": 2 }</InputState>
</ExecuteDecisionRequest>
Sample XML Request: Catalog Rule Application: SSO Authentication (using service host account credential)
<ExecuteDecisionRequest xmlns="http://www.inrule.com/XmlSchema/Schema">
<RuleApp>
<RepositoryRuleAppRevisionSpec>
<RuleApplicationName>RuleApp1</RuleApplicationName>
</RepositoryRuleAppRevisionSpec>
<RepositoryServiceUri>http://localhost/InRuleCatalogService/service.svc</RepositoryServiceUri>
<UseIntegratedSecurity>true</UseIntegratedSecurity>
<UserName>CatUsername</UserName>
</RuleApp>
<DecisionName>CalculateArea</DecisionName>
<InputState>{ "height": 10, "width": 2 }</InputState>
</ExecuteDecisionRequest>
Sample XML Request: Catalog Rule Application: irServer config-specified credentials Authentication
<ExecuteDecisionRequest xmlns="http://www.inrule.com/XmlSchema/Schema">
<RuleApp>
<RepositoryRuleAppRevisionSpec>
<RuleApplicationName>RuleApp1</RuleApplicationName>
</RepositoryRuleAppRevisionSpec>
<RepositoryServiceUri>http://localhost/InRuleCatalogService/service.svc</RepositoryServiceUri>
</RuleApp>
<DecisionName>CalculateArea</DecisionName>
<InputState>{ "height": 10, "width": 2 }</InputState>
</ExecuteDecisionRequest>
Sample XML Request: Catalog Rule Application: RequestId, CacheTimeout, ConnTimeout, Overrides, Output Options specified
<ExecuteDecisionRequest xmlns="http://www.inrule.com/XmlSchema/Schema">
<RequestId>A1E9BB89-7B46-4F62-B9AA-62FB03D73F03</RequestId>
<RuleApp>
<CacheTimeout>100</CacheTimeout>
<ConnTimeout>120</ConnTimeout>
<Password>CatPassword</Password>
<RepositoryRuleAppRevisionSpec>
<RuleApplicationName>RuleApp1</RuleApplicationName>
</RepositoryRuleAppRevisionSpec>
<RepositoryServiceUri>http://localhost/InRuleCatalogService/service.svc</RepositoryServiceUri>
<UserName>CatUsername</UserName>
</RuleApp>
<RuleEngineServiceOptions>
<Overrides>
<Override>
<!-- see Overrides for examples -->
</Override>
</Overrides>
<RuleSessionOverrides>
<ExecutionTimeout>PT40S</ExecutionTimeout>
<MaxCycleCount>200000</MaxCycleCount>
<Now>1999-05-31T11:20:00</Now>
</RuleSessionOverrides>
</RuleEngineServiceOptions>
<RuleEngineServiceOutputTypes>
<ActiveNotifications>true</ActiveNotifications>
<ActiveValidations>true</ActiveValidations>
<EntityState>true</EntityState>
<Overrides>true</Overrides>
<RuleExecutionLog>true</RuleExecutionLog>
</RuleEngineServiceOutputTypes>
<DecisionName>CalculateArea</DecisionName>
<InputState>{ "height": 10, "width": 2 }</InputState>
</ExecuteDecisionRequest>
Sample XML Response
<ExecuteDecisionResponse xmlns="http://www.inrule.com/XmlSchema/Schema">
<ActiveNotifications>
<Notification>
<Changed>true</Changed>
<ElementId>String content</ElementId>
<FiredBy>
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">String content</string>
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">String content</string>
</FiredBy>
<IsActive>true</IsActive>
<ManagedByRuleEngine>true</ManagedByRuleEngine>
<MarkedForRemoval>true</MarkedForRemoval>
<Message>String content</Message>
<NoteUniqueKey>String content</NoteUniqueKey>
<NotificationType>String content</NotificationType>
</Notification>
</ActiveNotifications>
<ActiveValidations>
<Validation>
<ElementIdentifier>String content</ElementIdentifier>
<InvalidMessageText>String content</InvalidMessageText>
<IsValid>true</IsValid>
<Reasons>
<ValidationReason>
<FiringRuleId>String content</FiringRuleId>
<ManagedByRuleEngine>true</ManagedByRuleEngine>
<MarkedForRemoval>true</MarkedForRemoval>
<MessageText>String content</MessageText>
<OwningRuleId>String content</OwningRuleId>
</ValidationReason>
</Reasons>
</Validation>
</ActiveValidations>
<HasRuntimeErrors>false</HasRuntimeErrors>
<OutputState>{"area":20}</OutputState>
<RequestId>a1e9bb89-7b46-4f62-b9aa-62fb03d73f03</RequestId>
<RuleExecutionLog>
<CalcsEvaluatedCount>9223372036854775807</CalcsEvaluatedCount>
<Messages>
<!--Valid elements of type: CollectionChangedMessage, ErrorMessage, NotificationChangeMessage, RuleSetActivationChangeMessage, RuleValueChangeMessage, TextFeedbackMessage, ValidationChangeMessage, ValueChangeMessage-->
</Messages>
<PerformedIncrementalEvaluation>true</PerformedIncrementalEvaluation>
<RulesEvaluatedCount>9223372036854775807</RulesEvaluatedCount>
<RulesEvaluatedTrueCount>9223372036854775807</RulesEvaluatedTrueCount>
<TotalEvaluationCycles>9223372036854775807</TotalEvaluationCycles>
<TotalExecutionTime>P428DT10H30M12.3S</TotalExecutionTime>
<TotalTraceFrames>2147483647</TotalTraceFrames>
</RuleExecutionLog>
<SessionId>1627aea5-8e0a-4371-9022-9b504344e724</SessionId>
</ExecuteDecisionResponse>
Sample JSON Response
{
"ActiveNotifications": [{
"Changed": true,
"ElementId": "String content",
"FiredBy": ["String content"],
"IsActive": true,
"ManagedByRuleEngine": true,
"MarkedForRemoval": true,
"Message": "String content",
"NoteUniqueKey": "String content",
"NotificationType": "String content"
}],
"ActiveValidations":[{
"ElementIdentifier": "String content",
"InvalidMessageText": "String content",
"IsValid": true,
"Reasons": [{
"FiringRuleId": "String content",
"ManagedByRuleEngine": true,
"MarkedForRemoval": true,
"MessageText": "String content",
"OwningRuleId": "String content"
}]
}],
"HasRuntimeErrors": false,
"OutputState": "{\"area\":20}",
"RequestId": "a1e9bb89-7b46-4f62-b9aa-62fb03d73f03",
"RuleExecutionLog": {
"CalcsEvaluatedCount": 9223372036854775807,
"Messages": [{
"Description": "String content",
"ChangeType": 0,
"CollectionCount": 2147483647,
"CollectionId": "String content",
"MemberId": "String content",
"MemberIndex": 2147483647
}],
"PerformedIncrementalEvaluation": true,
"RulesEvaluatedCount": 9223372036854775807,
"RulesEvaluatedTrueCount": 9223372036854775807,
"TotalEvaluationCycles": 9223372036854775807,
"TotalExecutionTime": "P428DT10H30M12.3S",
"TotalTraceFrames": 2147483647
},
"SessionId":"1627aea5-8e0a-4371-9022-9b504344e724"
}
Comments
0 comments
Please sign in to leave a comment.