Skip to main content



Execute Rule Set

URL:

e.g. http://servername/InRuleRuleEngineService/HttpService.svc/ExecuteRuleSetHTTP

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)
  • Optional Rule Set Parameters specified

Sample JSON Requests

Sample JSON Request: Filesystem Rule Application

{ 
"RuleApp":{
"FileName":"Ruleapp1.ruleapp"
},
"EntityState":"{\\"Field1\\":\\"1\\"}", "EntityName":"Entity1",
"RuleSetName":"Ruleset1"
}

Sample JSON Request: Catalog Rule Application: Latest Revision by Name

{ 
"RuleApp":{
"Password":"CatPassword",
"RepositoryRuleAppRevisionSpec":{
"RuleApplicationName":"Ruleapp1"
},
"RepositoryServiceUri":" **http:\\/\\/localhost\\/InRuleCatalogService\\/service.svc**",
"UserName":"CatUsername"
},
"EntityState":"{\\"Field1\\":\\"1\\"}", "EntityName":"Entity1",
"RuleSetName":"Ruleset1"
}

Sample JSON Request: Catalog Rule Application: Latest Revision by GUID

{ 
"RuleApp":{
"Password":"CatPassword",
"RepositoryRuleAppRevisionSpec":{
"Guid":" **5f11d845-bda1-4f79-ba67-e8cd12d065f7**"
},
"RepositoryServiceUri":" **http:\\/\\/localhost\\/InRuleCatalogService\\/service.svc**",
"UserName":"CatUsername"
},
"EntityState":"{\\"Field1\\":\\"1\\"}",
"EntityName":"Entity1", "RuleSetName":"Ruleset1"
}

Sample JSON Request: Catalog Rule Application: Labeled Revision by Name

{ 
"RuleApp":{
"Password":"CatPassword",
"RepositoryRuleAppRevisionSpec":{
"Label":"Label1", "RuleApplicationName":"Ruleapp1"
},
"RepositoryServiceUri":" **http:\\/\\/localhost\\/InRuleCatalogService\\/service.svc**",
"UserName":"CatUsername"
},
"EntityState":"{\\"Field1\\":\\"1\\"}", "EntityName":"Entity1",
"RuleSetName":"Ruleset1"
}

Sample JSON Request: Catalog Rule Application: Specific Revision by Name

{ 
"RuleApp":{
"Password":"CatPassword",
"RepositoryRuleAppRevisionSpec":{
"Revision":3, "RuleApplicationName":"Ruleapp1"
},
"RepositoryServiceUri":" **http:\\/\\/localhost\\/InRuleCatalogService\\/service.svc**",
"UserName":"CatUsername"
},
"EntityState":"{\\"Field1\\":\\"1\\"}",
"EntityName":"Entity1", "RuleSetName":"Ruleset1"
}

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
},
"EntityState":"{\\"Field1\\":\\"1\\"}", "EntityName":"Entity1",
"RuleSetName":"Ruleset1"
}

Sample JSON Request: Catalog Rule Application: irServer config-specified credentials Authentication

{ 
"RuleApp":{
"RepositoryRuleAppRevisionSpec":{
"RuleApplicationName":"Ruleapp1"
},
"RepositoryServiceUri":" **http:\\/\\/localhost\\/InRuleCatalogService\\/service.svc**"
},
"EntityState":"{\\"Field1\\":\\"1\\"}", "EntityName":"Entity1",
"RuleSetName":"Ruleset1"
}

Sample JSON Request: Catalog Rule Application: RequestId, CacheTimeout, ConnTimeout, Overrides, Output Options, Rule Set Parameters specified

{ 
"RequestId":"1627aea5-8e0a-4371-9022-9b504344e724",
"RuleApp":{
"CacheTimeout":"120",
"ConnTimeout":"100",
"Password":"CatPassword",
"RepositoryRuleAppRevisionSpec":{
"RuleApplicationName":"Ruleapp1"
},
"RepositoryServiceUri":" **http:\\/\\/localhost\\/InRuleCatalogService\\/service.svc**",
"UseIntegratedSecurity": **true**,
"UserName":"CatPassword"
},
"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** },
"EntityState":"{\\"Field1\\":\\"1\\"}", "EntityName":"Entity1",
"Parameters": [ {"Name":"Parameter1","Value":"Value1"}, {"Name":"Parameter2","Value":"Value2"} ], "RuleSetName":"Ruleset1"
}

Sample JSON Request: Catalog Rule Application: RequestId, CacheTimeout, ConnTimeout, Overrides, Output Options, Entity Rule Set Parameters specified

{ 
"RequestId":"1627aea5-8e0a-4371-9022-9b504344e724",
"RuleApp":{
"CacheTimeout":"120",
"ConnTimeout":"100",
"Password":"CatPassword",
"RepositoryRuleAppRevisionSpec":{
"RuleApplicationName":"Ruleapp1"
},
"RepositoryServiceUri":" **http:\\/\\/localhost\\/InRuleCatalogService\\/service.svc**",
"UseIntegratedSecurity": **true**,
"UserName":"CatPassword"
},
"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** },
"EntityState":"{\\"Field1\\":\\"1\\"}", "EntityName":"Entity1",
"Parameters": [ {"Name":"Parameter1","Value":"Value1"}, {"Name":"EntityParameter2","Value":"{\\"Field1\\":\\"1\\"}"} ], "RuleSetName":"Ruleset1"
}

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"
}]
}],
"EntityState":"String content",
"HasRuntimeErrors": **false**,
"Overrides":[{
"Name":"String content",
"OverrideType":0,
"Value":"String content"
}],
"RequestId":"1627aea5-8e0a-4371-9022-9b504344e724",
"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
},
"RuleSessionState":"String content",
"SessionId":"1627aea5-8e0a-4371-9022-9b504344e724"
}

Sample XML Requests

note

In all XML request examples below, elements must be ordered exactly as specified.

Sample XML Request: Filesystem Rule Application

<ExecuteRuleSetRequest xmlns\="http://www.inrule.com/XmlSchema/Schema"> 
<RuleApp>
<FileName>Ruleapp1.ruleapp</FileName>
</RuleApp>
<EntityState><?xml version='1.0' encoding='utf-8'?><Entity1 ><Field1>1</Field1></Entity1></EntityState>
<EntityName>Entity1</EntityName>
<RuleSetName>Ruleset1</RuleSetName>
</ExecuteRuleSetRequest>

Sample XML Request: Catalog Rule Application: Latest Revision by Name

<ExecuteRuleSetRequest 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>
<EntityState><?xml version='1.0' encoding='utf-8'?><Entity1 ><Field1>1</Field1></Entity1></EntityState>
<EntityName>Entity1</EntityName>
<RuleSetName>Ruleset1</RuleSetName>
</ExecuteRuleSetRequest>

Sample XML Request: Catalog Rule Application: Latest Revision by GUID

<ExecuteRuleSetRequest 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>
<EntityState><?xml version='1.0' encoding='utf-8'?><Entity1
><Field1>1</Field1></Entity1></EntityState>
<EntityName>Entity1</EntityName>
<RuleSetName>Ruleset1</RuleSetName>
</ExecuteRuleSetRequest>

Sample XML Request: Catalog Rule Application: Labeled Revision by Name

<ExecuteRuleSetRequest 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>
<EntityState><?xml version='1.0' encoding='utf-8'?><Entity1 ><Field1>1</Field1></Entity1></EntityState>
<EntityName>Entity1</EntityName>
<RuleSetName>Ruleset1</RuleSetName>
</ExecuteRuleSetRequest>

Sample XML Request: Catalog Rule Application: Specific Revision by Name

<ExecuteRuleSetRequest 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>
<EntityState><?xml version='1.0' encoding='utf-8'?><Entity1 ><Field1>1</Field1></Entity1></EntityState>
<EntityName>Entity1</EntityName>
<RuleSetName>Ruleset1</RuleSetName>
</ExecuteRuleSetRequest>

Sample XML Request: Catalog Rule Application: SSO Authentication (using service host account credential)

<ExecuteRuleSetRequest xmlns\="http://www.inrule.com/XmlSchema/Schema"> 
<RuleApp>
<RepositoryRuleAppRevisionSpec>
<RuleApplicationName>RuleApp1</RuleApplicationName>
</RepositoryRuleAppRevisionSpec>
<RepositoryServiceUri>http://localhost/InRuleCatalogService/service.svc</RepositoryServiceUri>
<UseIntegratedSecurity>true</UseIntegratedSecurity>
</RuleApp>
<EntityState><?xml version='1.0' encoding='utf-8'?><Entity1 ><Field1>1</Field1></Entity1></EntityState>
<EntityName>Entity1</EntityName>
<RuleSetName>Ruleset1</RuleSetName>
</ExecuteRuleSetRequest>

Sample XML Request: Catalog Rule Application: irServer config-specified credentials Authentication

<ExecuteRuleSetRequest xmlns\="http://www.inrule.com/XmlSchema/Schema"> 
<RuleApp>
<RepositoryRuleAppRevisionSpec>
<RuleApplicationName>RuleApp1</RuleApplicationName>
</RepositoryRuleAppRevisionSpec>
<RepositoryServiceUri>http://localhost/InRuleCatalogService/service.svc</RepositoryServiceUri>
</RuleApp>
<EntityState><?xml version='1.0' encoding='utf-8'?><Entity1 ><Field1>1</Field1></Entity1></EntityState>
<EntityName>Entity1</EntityName>
<RuleSetName>Ruleset1</RuleSetName>
</ExecuteRuleSetRequest>

Sample XML Request: Catalog Rule Application: RequestId, CacheTimeout, ConnTimeout, Overrides, Output Options, Rule Set Parameters specified

<ExecuteRuleSetRequest xmlns\="http://www.inrule.com/XmlSchema/Schema"> 
<RequestId>1627aea5-8e0a-4371-9022-9b504344e724</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>
<EntityState><?xml version='1.0' encoding='utf-8'?><Entity1
><Field1>1</Field1></Entity1></EntityState>
<EntityName>Entity1</EntityName>
<Parameters>
<Parameter>
<Name>Parameter1</Name>
<Value>Value1</Value>
</Parameter>
<Parameter>
<Name>Parameter2</Name>
<Value>Value2</Value>
</Parameter>
</Parameters>
<RuleSetName>Ruleset1</RuleSetName>
</ExecuteRuleSetRequest>

Sample XML Request: Catalog Rule Application: RequestId, CacheTimeout, ConnTimeout, Overrides, Output Options, Entity Rule Set Parameters specified

<ExecuteRuleSetRequest xmlns\="http://www.inrule.com/XmlSchema/Schema"> 
<RequestId>1627aea5-8e0a-4371-9022-9b504344e724</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>
<EntityState><?xml version='1.0' encoding='utf-8'?><Entity1 ><Field1>1</Field1></Entity1></EntityState>
<EntityName>Entity1</EntityName>
<Parameters>
<Parameter>
<Name>Parameter1</Name>
<Value>Value1</Value>
</Parameter>
<Parameter>
<Name>EntityParameter2</Name>
<Value><?xml version='1.0' encoding='utf-8'?><Entity2 ><Field1>1</Field1></Entity1></Value>
</Parameter>
</Parameters>
<RuleSetName>Ruleset1</RuleSetName>
</ExecuteRuleSetRequest>

Sample XML Response

<RuleEngineHttpServiceResponse 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>
<EntityState>String content</EntityState>
<HasRuntimeErrors>false</HasRuntimeErrors>
<Overrides>
<ConfiguredOverride>
<Name>String content</Name>
<OverrideType>DatabaseConnection</OverrideType>
<Value>String content</Value>
</ConfiguredOverride>
</Overrides>
<RequestId>1627aea5-8e0a-4371-9022-9b504344e724</RequestId>
<RuleExecutionLog>
<CalcsEvaluatedCount>9223372036854775807</CalcsEvaluatedCount>
<Messages>
<!--Valid elements of type: CollectionChangedMessage, ErrorMessage, NotificationChangeMessage, RuleSetActivationChangeMessage, RuleValueChangeMessage, TextFeedbackMessage, ValidationChangeMessage, ValueChangeMessage\-->
<RuleExecutionLogMessage i:type\="CollectionChangedMessage" xmlns:i\="http://www.w3.org/2001/XMLSchema-instance">
<Description>String content</Description>
<ChangeType>Added</ChangeType>
<CollectionCount>2147483647</CollectionCount>
<CollectionId>String content</CollectionId>
<MemberId>String content</MemberId>
<MemberIndex>2147483647</MemberIndex>
</RuleExecutionLogMessage>
</Messages>
<PerformedIncrementalEvaluation>true</PerformedIncrementalEvaluation>
<RulesEvaluatedCount>9223372036854775807</RulesEvaluatedCount>
<RulesEvaluatedTrueCount>9223372036854775807</RulesEvaluatedTrueCount>
<TotalEvaluationCycles>9223372036854775807</TotalEvaluationCycles>
<TotalExecutionTime>P428DT10H30M12.3S</TotalExecutionTime>
<TotalTraceFrames>2147483647</TotalTraceFrames>
</RuleExecutionLog>
<RuleSessionState>String content</RuleSessionState>
<SessionId>1627aea5-8e0a-4371-9022-9b504344e724</SessionId>
</RuleEngineHttpServiceResponse>