Skip to main content



Migration Considerations

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:

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 SectionSetting NameChanges
assemblyEndPointshadowCopyDirectoryRemoved
shadowCopyEndPointAssembliesRemoved
licensingcryptographyRequiredRemoved

InRule Runtime Configuration

Sub SectionSetting NameChanges
dbCommanddbCommandTimeoutRemoved
localecultureRemoved
ruleEngineemptyNodeForValueTypesOutputFormatRemoved
nullZeroEqualityRemoved
ruleTimingEnabledRemoved
webServiceConnectionsdisableBindingOverridesRemoved
workingMemoryworkingMemoryCacheCleanUpIntervalRemoved
workingMemoryCacheTimeoutRemoved

InRule Authoring/Client Configuration

Sub SectionSetting NameChanges
catalogClientmaxItemsInObjectGraphRemoved
ruleEngineClientruleExecutionTimeoutRemoved
runawayCycleCountRemoved
useRuleEngineServiceForIrVerifyRemoved
useRuleEngineServiceRepositoryServiceRemoved
tracingbufferLogWritesRemoved
bufferSizeRemoved
logActivitiesRemoved
userInterfacehelpFileDirectoryPathRemoved
MRUFileNamesMaxLengthRemoved
ShowDebugForEntityStateViewerinIrVerifyRemoved
udfEditorAutocompletionEnabledRemoved

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)

ClassMemberChanges
CachedRuleApp-Removed
CollectionAddCollectionMemberAdd()
AppendCollectionMemberAdd(object)
CollectionDefGetDef()
CollectionMemberGetEntityValue.ToEntity()
CompilerErrorInfo-CompilerError
ElementValueToDoubleRemoved
ToElementIdentifierRemoved
ToEntityIdentifierRemoved
ToInt16Removed; use ToInt32()
ToString(bool)Removed; use ToString()
EntityChildRuleElementsRuleSets
CollectionChangedRemoved
EntityDefGetDef()
EntityIdElementId
EntityStateLoadedRemoved
ExecuteRuleSet(string, RuleSetParameter[])ExecuteRuleSet(string, object[])
GetCollectionCollections[string]
GetFieldFields[string]
GetField(XPathExpression)Removed
State.GetXmlWriteXml(XmlWriter) for example: StringBuilder sb = new StringBuilder(); XmlWriter writer = XmlWriter.Create(sb); entity.WriteXml(writer);Return sb.ToString();
State.LoadReadXml(string)
State.LoadXmlReadXml(XmlReader) for example: entity.ReadXml(XmlReader.Create(new StringReader(string xmlString)));
State.SaveWriteXml(string)
ValidityChangedRemoved
ValueChangedRemoved
EntityIdentifier-Removed; use ElementId, which is a string
FieldFieldDefGetDef()
GetValueList()AssociatedValueList
SetValueValue
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)
RuleElementRuleElementDefGetDef()
RuleRuntimeErrorsException-RuntimeException
RuleServiceConnection-Removed
RuleSessionActivateRuleSets(string[])ActivateRuleSets(string)
ActivateRuleSetsByCatagory(string[])ActivateRuleSetsByCategory(string)
AggExecStatsRemoved; use Statistics or assorted new members in the RuleSession class
AggExecStats.AggExecStatInfo.GetHtml()LastRuleExecutionLog.GetHtml()
CreateRuleSetCreateIndependentRuleSet
DataElementOverridesOverrides.Override*()
DeactivateRuleSets(string[])DeactivateRuleSets(string)
EventFiredRemoved; the "fire event" action is no longer supported
LoadStateSyntax is unchanged, but the RuleSession state file is a proprietary format instead of XML
RuleApplicatonDefInfoGetRuleApplicationDef()
RuleApplicationInfoRemoved
State.GetActiveNotificationsGetNotifications()
State.GetActiveValidationsGetValidations()
RuleSessionSettingsRuleExecutionSettingsRemoved; use assorted new members in the RuleSessionSettings class
RuleExecutionSettings.CurrentDateOverrideNow
RuleExecutionSettings.EnableRuleExecutionTracingLogOptions; uses the EngineLogOptions enum
RuleExecutionSettings.ExecutionTimeoutOverrideExecutionTimeout
RuleExecutionSettings.IncludeAttributeTablesRemoved
RuleExecutionSettings.IncludeDescriptiveDetailRemoved
RuleExecutionSettings.IncludeRulesRemoved
RuleExecutionSettings.MaxEvaluationCyclesOverrideMaxCycleCount
RuleExecutionSettings.ReturnDetailStatisticsInfoLogOptions; uses the EngineLogOptions enum
MaxDegreeOfParallelismUse MaxExecutionCores
RuleSetChildRuleElementsRuleElements
RuleSetDef(RuleSetDef)GetDef()
RuleSetParameter-Removed
TransactionMessage-LogMessage
ValidationInvalidMessageTextMessage
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

AssemblyChangeChange description
InRule.Authoring.EditorsAddedThis DLL is required to consume InRule WPF controls in a custom rule authoring application.
InRule.Authoring.Windows.dllAddedThis 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.dllAddedThis 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.dllRemovedThis DLL, along with the Windows Forms controls it contained in InRule 3.x are no longer supported.