rule engine with xml


Author
Message
Danny Doobay
Danny Doobay
StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)StrataFrame User (132 reputation)
Group: StrataFrame Users
Posts: 40, Visits: 333
I am validating current row using the code below.

 Private Sub CustomersBO_CheckRulesOnCurrentRow(ByVal e As MicroFour.StrataFrame.Business.CheckRulesEventArgs)
        If Me.cust_LastName = "" Then
            Me.AddBrokenRule(CustomersBOFieldNames.cust_LastName, "Required field.")
        End If
End Sub

With every client that we have these rules could be changed. Therefore I am trying to created a rule engine that could pull a xml file like one below and build the rules dynamically.
Does anyone have an idea?

<application>
  <bo name="CustomersBO" >
    <rule>
      <propertyname>cust_LastName</propertyname>
      <argument>cust_LastName = ""</argument>
      <errormessage>Required field.</errormessage>
    </rule>
    <rule>
      <propertyname>cust_FirstName</propertyname>
      <argument>cust_FirstName = ""</argument>
      <errormessage>Required field.</errormessage>
    </rule>
  </bo>
<application>
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Danny Doobay - 12 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search