Overview
As of InRule version 4.5.0 and later, several changes to rule applications, file formats, configuration settings, and the InRule SDK were introduced, including changes to some of the core classes and methods to execute rules. Please refer to the following resources for guidance on how to change your applications to be compatible with this new version:
- This “Migration Consideration” section
- Transition Guide, which can be downloaded from the InRule Support website using the following link: https://support.inrule.com/cs/media/p/968.aspx
- Runtime API Examples in this help file
- InRule Samples on GitHub
User Assemblies
As of version 4.5, InRule no longer supports the placement of user assemblies in the irAuthor® folder. You should instead copy user assemblies to the irAuthor\EndPointAssemblies folder. The standard load sequence for user assemblies is:
- The Global Assembly Cache (GAC)
- CurrentAppDomain.BaseDirectory
- Configured EndPointAssemblies directory
Rule Application Changes
The following rule application functions have changed in version 4.5:
- Fire Event Action. The Fire Event Action has been replaced with the Fire Notification action. Existing rule applications will be upgraded automatically.
- Web Service Endpoint. Existing rule applications which contain Web Service endpoints will be automatically upgraded when opened. However, if the web service URI stored in the rule application is invalid at the time of the upgrade, any Execute Web Service Action mapping entries will be lost. If the rule application is opened from the file system, the irAuthor user will be warned about the upgrade; if the rule application is stored in the catalog, this warning will be presented during the catalog upgrade operation.
- XML Schema Endpoint. Existing rule applications which contain XML Schema endpoints will require an authoring user to reload the XSD (unless embedded), then apply to schema (even if embedded).
- Database Schema/XSD DataSet Schema. Existing rule applications using a Database Connection Schema or an XSD Schema where the XSD is a DataSet XSD will work in basic scenarios, such as modify XML-loaded state and get XML. However, automatic constraint and identity-field assignment on Add Collection Member will not work. Please contact InRule for assistance in implementing a custom state provider to directly update a DataSet instance.
- Default Value with Object-Bound State. When using a .NET assembly endpoint, default values authored on the rule application for any bound entity fields are ignored, unless runtime binding is explicitly disabled via the irSDK.
- Default Value with non-Object-Bound State. When not using a .NET assembly endpoint, the default value behavior is similar to version 4.1, with one important distinction. In version 4.5, InRule applies the default value only when an entity is first created, while version 4.1 applies the default value any time the field is null (including if an action sets it to null during rule execution).
- Aggregate Function Syntax. InRule version 4.1 allowed a user to specify a syntax such as Sum(Collection1.Collection2, Collection2Field1, "filterval"). The supported syntax in version 4.5 is Sum(Collection2, Collection2Field1, "filterval"). For example, Sum(Vehicles, Premium, Year=1999).
Configuration Changes
The following configuration file settings have changed.
InRule Repository Configuration
Sub Section |
Setting Name |
Changes |
assemblyEndPoint |
shadowCopyDirectory |
Removed |
shadowCopyEndPointAssemblies |
Removed |
|
licensing |
cryptographyRequired |
Removed |
InRule Runtime Configuration
Sub Section |
Setting Name |
Changes |
dbCommand |
dbCommandTimeout |
Removed |
locale |
culture |
Removed |
ruleEngine |
emptyNodeForValueTypesOutputFormat |
Removed |
nullZeroEquality |
Removed |
|
ruleTimingEnabled |
Removed |
|
webServiceConnections |
disableBindingOverrides |
Removed |
workingMemory |
workingMemoryCacheCleanUpInterval |
Removed |
workingMemoryCacheTimeout |
Removed |
InRule Authoring/Client Configuration
Sub Section |
Setting Name |
Changes |
catalogClient |
maxItemsInObjectGraph |
Removed |
ruleEngineClient |
ruleExecutionTimeout |
Removed |
runawayCycleCount |
Removed |
|
useRuleEngineServiceForIrVerify |
Removed |
|
useRuleEngineServiceRepositoryService |
Removed |
|
tracing |
bufferLogWrites |
Removed |
bufferSize |
Removed |
|
logActivities |
Removed |
|
userInterface |
helpFileDirectoryPath |
Removed |
MRUFileNamesMaxLength |
Removed |
|
ShowDebugForEntityStateViewerinIrVerify |
Removed |
|
udfEditorAutocompletionEnabled |
Removed |
Test Scenario File Changes
Test Scenario files are now stored in a proprietary binary format, rather than the XML format of previous InRule versions. Older Test Scenario files will not work with InRule version 4.5. If you require the use of prior release Test Scenario files, download the Test Scenario file upgrade program from the InRule support site, and follow the instructions on the site.
User Defined Function Changes
Refer to the InRule Authoring Guide for changes to User Defined Functions.
irSDK Changes
The following assemblies have been removed:
- inrule.common.xmlserializers.dll
- inrule.runtime.xmlserializers.dll
- inrule.scripting.dll
The following namespaces have been removed from irSDK:
- InRule.Runtime.Messages
- InRule.Runtime.Metadata
- InRule.Runtime.Statistics
Changes in the Runtime API (InRule.Runtime)
Class |
Member |
Changes |
CachedRuleApp |
|
Removed |
Collection |
AddCollectionMember |
Add() |
AppendCollectionMember |
Add(object) |
|
CollectionDef |
GetDef() |
|
CollectionMember |
GetEntity |
Value.ToEntity() |
CompilerErrorInfo |
|
CompilerError |
ElementValue |
ToDouble |
Removed |
ToElementIdentifier |
Removed |
|
ToEntityIdentifier |
Removed |
|
ToInt16 |
Removed; use ToInt32() |
|
ToString(bool) |
Removed; use ToString() |
|
Entity |
ChildRuleElements |
RuleSets |
CollectionChanged |
Removed |
|
EntityDef |
GetDef() |
|
EntityId |
ElementId |
|
EntityStateLoaded |
Removed |
|
ExecuteRuleSet(string, RuleSetParameter[]) |
ExecuteRuleSet(string, object[]) |
|
GetCollection |
Collections[string] |
|
GetField |
Fields[string] |
|
GetField(XPathExpression) |
Removed |
|
State.GetXml |
WriteXml(XmlWriter)
for example:
StringBuilder sb = new StringBuilder(); XmlWriter writer = XmlWriter.Create(sb); entity.WriteXml(writer);Return sb.ToString(); |
|
State.Load |
ReadXml(string) |
|
State.LoadXml |
ReadXml(XmlReader)
for example:
entity.ReadXml(XmlReader.Create(new StringReader(string xmlString))); |
|
State.Save |
WriteXml(string) |
|
ValidityChanged |
Removed |
|
ValueChanged |
Removed |
|
EntityIdentifier |
|
Removed; use ElementId, which is a string |
Field |
FieldDef |
GetDef() |
GetValueList() |
AssociatedValueList |
|
SetValue |
Value |
|
FileSystemRuleApp |
|
FileSystemRuleApplicationReference |
FixedRevisionRuleApp |
|
Removed |
InMemoryRuleApp |
|
InMemoryRuleApplicationReference |
InProcessConnection |
|
Removed |
ListItemValue |
|
ValueListItem |
ObjectEntityState |
|
Removed; to bind an Entity, use RuleSession.CreateEntity(string, object) |
RepositoryRuleApp |
|
CatalogRuleApplicationReference |
RuleApp |
|
RuleApplicationReference |
RuleCompileErrorsException |
|
CompileException (in InRule.Repository) |
RuleElement |
RuleElementDef |
GetDef() |
RuleRuntimeErrorsException |
|
RuntimeException |
RuleServiceConnection |
|
Removed |
RuleSession |
ActivateRuleSets(string[]) |
ActivateRuleSets(string) |
ActivateRuleSetsByCatagory(string[]) |
ActivateRuleSetsByCategory(string) |
|
AggExecStats |
Removed; use Statistics or assorted new members in the RuleSession class |
|
AggExecStats.AggExecStatInfo.GetHtml() |
LastRuleExecutionLog.GetHtml() |
|
CreateRuleSet |
CreateIndependentRuleSet |
|
DataElementOverrides |
Overrides.Override*() |
|
DeactivateRuleSets(string[]) |
DeactivateRuleSets(string) |
|
EventFired |
Removed; the "fire event" action is no longer supported |
|
LoadState |
Syntax is unchanged, but the RuleSession state file is a proprietary format instead of XML |
|
RuleApplicatonDefInfo |
GetRuleApplicationDef() |
|
RuleApplicationInfo |
Removed |
|
State.GetActiveNotifications |
GetNotifications() |
|
State.GetActiveValidations |
GetValidations() |
|
RuleSessionSettings |
RuleExecutionSettings |
Removed; use assorted new members in the RuleSessionSettings class |
RuleExecutionSettings.CurrentDateOverride |
Now |
|
RuleExecutionSettings.EnableRuleExecutionTracing |
LogOptions; uses the EngineLogOptions enum |
|
RuleExecutionSettings.ExecutionTimeoutOverride |
ExecutionTimeout |
|
RuleExecutionSettings.IncludeAttributeTables |
Removed |
|
RuleExecutionSettings.IncludeDescriptiveDetail |
Removed |
|
RuleExecutionSettings.IncludeRules |
Removed |
|
RuleExecutionSettings.MaxEvaluationCyclesOverride |
MaxCycleCount |
|
RuleExecutionSettings.ReturnDetailStatisticsInfo |
LogOptions; uses the EngineLogOptions enum |
|
MaxDegreeOfParallelism |
Use MaxExecutionCores |
|
RuleSet |
ChildRuleElements |
RuleElements |
RuleSetDef |
(RuleSetDef)GetDef() |
|
RuleSetParameter |
|
Removed |
TransactionMessage |
|
LogMessage |
Validation |
InvalidMessageText |
Message |
WebServiceConnection |
|
Removed |
Changes in the Catalog API (InRule.Repository)
The Evaluation Network (EvalNetwork) and related classes have been replaced by the DefUsageNetwork. See Determine FieldDef Dependencies for a sample of how to use the DefUsageNetwork.
Additional Considerations (from 3.x)
If you are upgrading from InRule version 3, then please note these additional considerations:
- InRule Version 4 requires the Microsoft .NET 4.0 runtime.
- Licensing for InRule version 4 will require a different serial number than the number used to activate version 3. Please contact your sales representative to obtain an InRule version 4 serial number. The InRule.lic file is no longer supported, and licenses must be specifically registered on each machine on which InRule is used.
- WinForm authoring controls have been removed from irSDK. These controls have been replaced with WPF 4.0 controls that are publicly available.
- ASP.NET authoring controls have been removed from irSDK. These controls have been replaced with Silverlight 4.0 controls that are publicly available.
Assembly changes
Assembly |
Change |
Change description |
InRule.Authoring.Editors |
Added |
This DLL is required to consume InRule WPF controls in a custom rule authoring application. |
InRule.Authoring.Windows.dll |
Added |
This DLL is may be required to consume some InRule WPF authoring functionality in a custom rule authoring application.
This DLL may be copied as a dependency if InRule. Authoring.Editors is referenced |
InRule.Authoring.dll |
Added |
This DLL is may be required to consume some InRule WPF authoring functionality in a custom rule authoring application.
This DLL may be copied as a dependency if InRule. Authoring.Editors is referenced |
InRule.Authoring.UI.dll |
Removed
|
This DLL, along with the Windows Forms controls it contained in InRule 3.x are no longer supported. |
Comments
0 comments
Please sign in to leave a comment.