Business Rule Engine - GUI To Check For Three Rules ?

Mar 30, 2011

I have a simple business rules engine that I need to write. I have looked at both Biztalk and Windows Workflow, but they are to much for what we need to do. This is a process that material will come to an operation, the GUI will check for three rules, one for the operation, one for the steps in the operation, and one for the item coming into the operation. These are the only three checks that will be done. It is possible there will be more than one rule for each check. I have a simple database set up to contain all the operations, steps and products and there is a crosstab table that links all the rules to each item. Here is an example of some rules (these are actual rules from the process):

View 5 Replies


ADVERTISEMENT

.net - Methods For Checking Business Rules?

Mar 20, 2012

I was having a discussion with a colleague about a method used to check business rules. In general there are two conditions:

"If one fails the whole thing fails"

Example 1: "If one fails the whole thing fails"I have used the following technique for condition 1 in several cases. Essentially if one of those conditions is false then the whole thing fails

Dim blnTemp As Boolean = True
If Fail=False Then blnTemp = blnTemp AndAlso False
{code code code}

[code]....

View 3 Replies

Architecture - Apply The Correct Data From The GUI To The Parameters For The Rule And Execute The Rule

Apr 6, 2011

I have a very simple Business Rules Engine that has only three methods. One gets all the rules for the current operation, one will retrieve a list of parameters for the rules, the last applies the rules. The rules are stored in the database as user defined functions using parameters. The client will call the BRE pass in the operation and a Lot Number and the BRE checks for any rules that apply to this operation for this Lot. The client gets a list of rules that apply (the names of the corresponding UDF's in the database) and at which step in the operation the rule applies. When the material gets to a step that has a rule, it calls BRE to get parameters for the UDF for that operation, fills in the parameters with data contained in the GUI and calls the BRE to apply the rule with this lot's specific data. Multiple lots can share the same rule that is why there are parameters for the UDF. This all works well. However, this is assuming we have a set number of rules for each lot at each operation. If the lot needs a new rule applied at this operation we have to add a new rule and corresponding UDF into the BRE database. This is not a problem, the client will now see two rules, however, it only knows how to apply the parameters for the first rule, and there is no code for applying the parameters for the second rule.

For example: Rule 1 states that only the same Lot number items can be put into a carton. So the UDF expects one parameter called LotID and one parameter called Carton ID. It runs the rule (UDF) with these parameters and checks to ensure the lots match. Now the Lot requires a second rule: Only 25 items can be packed in the carton. We create a new rule and corresponding UDF, but this rule has the CartonID and a quantity associated with it.

The GUI can handle Rule 1 because it knows how to apply the correct data from the GUI to the parameters for the Rule and execute the rule, so LotID from the GUI = LotID in the parameter name in the UDF and CartonID from the GUI = CartonID parameter name in the UDF. Now there is a new rule, the GUI sees this new rule, gets the parameters, but has no way to applying the quantity to the new parameter to execute the rule without having to change the GUI. We don't expect there to be many rule changes, however, when they do occur we don't want to have to recompile the GUI every time. Does anyone have any suggestions on how to create a class that could determine the how to apply set the correct parameters? We have thought about a table in a database that maps the parameter names in the UDF with parameter names in the GUI so when we add a new UDF we update the table with the corresponding data from the GUI. That could work but may get cumbersome and would require us to make sure that, that table is kept current. Another suggestion was to name the parameters in the UDF the same as the parameters in the GUI, but this too, would require us to maintain the names in two locations.

View 5 Replies

VS 2010 Check First Rule (not Line) In RTB?

Mar 5, 2011

Let's say I have a rtb with a few lines.

line1: (empty)
line2: (empty)
Line3: "blablablablabla"
Line4: ..... etc

How do I get/read the first, only the first line? ("blablablabla")

View 9 Replies

COM ADD-in - Outlook - ItemSend - Check Some Rules Before Mail Is Send

Jan 24, 2011

I'm trying to write an Office 2007 COM Add-in which will check some rules before mail is send. Below test code works but I have several warnings in VS2010

[Code]...

View 1 Replies

Validate Business Object By Use Of Related Business Objects?

Oct 11, 2010

using an object-binding I have a an object representing "Employee". The employee has an ID-property. The ID of the employee must be unique.

My validation of the entered data is handled in the property set part of the object. In general, I validate criteria belonging to the object to validate only (eg numeric range of the ID, if it's value is not empy, ...). But in this case I need to know all ID's from the other employees. My tried this:

''' <summary>
''' Set EmployeeID
''' </summary>

[Code].....

View 2 Replies

Create New MS Outlook Rule VB

May 5, 2012

I'm trying to write a rule to compensate for laziness caused by program changes. Used to be, case numbers for family law cases where I work were written as follows: 12-DR-012345. Now, you can get away with 12DR12345, and the file management program accepts it.

View 1 Replies

How To Merge Two DataSets On Specified Rule

Apr 13, 2010

I'm trying to merge two datasets based on these rules:
1. With ds1 and ds2, If the Unique Key from ds1 is not found in ds2, copy it to ds2 and move to next row in the table, else, goto the next part
2. If the unique key in ds2 is found in ds1, check the DateLastEdited row.
a. If DateLastEdited in ds2 is greater then in ds1, copy the row from ds2 to ds1, else , do nothing

I'm just having trouble with the loops. Here's what I have:
Dim ds1 As DataSet = fillNetwork() 'this function fills ds1 with the dataset from a table found on a network
Dim ds2 As DataSet = fillLocal() 'this function fills ds1 with the dataset from a table found on local drive
Dim returnRows() As System.Data.DataRow = Nothing
For Each dtDs1 In ds1.Tables
[Code] .....
This bit of code is just trying to segregate the one that are in both tables from the ones that are just in one table.

View 6 Replies

Applying A Rule Set To Different Lines Of Text?

Apr 27, 2012

The general purpose of my application simply reads a line of text for example:

1. I have a printer issue
2. I have a software issue

I have a rule set as follows:

'Define the class 'Printer' with 14 values as a string...
Dim Printer(13) As String
'The string 'Printer' gets assigned a value, this is repeated another 13 times...
Printer(0) = "Printing"

[code]....

The code simply uses a number of keywords to detect if the issue is a 'printer', 'software', 'telephone',. or 'password' problem.I want to apply this rule set to 10 issues within the same rich text box, with the results sent to a text file. The exporting to a text file I can do, however the main issue is, i cannot read the lines individually.

View 5 Replies

Asp.net - Subdirectory URL Automatic Rewrite Rule?

Apr 25, 2012

I'm using ASP.NET 4 / VB.NET / IIS to build a web application. Folks will access the web application via a URL like so: [URL] So, for example, here is the urls for Jane Doe, John Doe, and James Doe respectively: [URL] I need to somehow pass them off (no matter what name is entered) to a default.aspx page which then pulls in the name portion of the url and uses it to perform a lookup against the database which contains info. about this particular person and displays a personalized page based on that information.

[Code]...

View 1 Replies

Do You Follow All The Rules Of FXCop?

May 27, 2010

If we won't know what Exception will be thrown then why cannot we catch a general exception? I just cannot follow this and some more.

View 14 Replies

Making The Rules Of A Text Box?

Jan 15, 2012

So for the important part, right now I'm planning on creating a word detector somehow and there are specific rules I was to set in the textbox in relation with the button.Let's say I wanna set an IF Statement for the text to have 32 characters and letters "abcdefg" and numbers "12345" so that it'll execute a message box when I press the button.

Here's a code example of what I'm saying
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

[code].....

View 5 Replies

Conceptual / Rule Implementation / String Manipulation

Dec 29, 2011

So I'm working on a software in VB.Net where I need to scrape information and process it according to rules. For example, simple string replace rules like making "Det" into "Detached" for a specific field, or a split/join rule, basic string operations. All my scraping rules are RegEx and I store them in a database in rows of rule sets for different situations.What is the best way behind creating/storing rules to manipulate text? I do not want to hardcode the rules into the software, but rather be able to add more as there will be a need for them. I want to store them in a database, but then how do I interpret them?

View 1 Replies

MVC Data Annotation Validation Rule For Collection?

Dec 2, 2010

Is there a dataannotation validate rule for a collection based property? I have the following
<DisplayName("Category")>
<Range(1, Integer.MaxValue, ErrorMessage:="Please select a category")>
Property CategoryId As Integer
<DisplayName("Technical Services")>
Property TechnicalServices As List(Of Integer)
I'm looking for a validator that I can add to the TechnicalServices property to set a minimum for the collection size.

View 1 Replies

Programmatically Modify Access Rule For Directory?

Oct 25, 2011

I want to programmatically change ACL for all the subdirectories into a containing one. Specially when ACL of a particolar user is found I want to duplicate that ACL, change the security identifier and add the rule.

Look at this code:

cDirectoryInfo = New DirectoryInfo(strPath)
cDirectorySecurity = cDirectoryInfo.GetAccessControl()
cAuthorizationRuleCollection = cDirectorySecurity.GetAccessRules(True, True,

[Code]....

View 5 Replies

DataGrid - How To Apply Validation Rules

Dec 20, 2011

Any way to apply some validation rules to the following code?
VB
Private Sub dgOperator_EditingControlShowing(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewEditingControlShowingEventArgs) Handles dgOperator.EditingControlShowing
Const cSUBNAME As String = "dg_EditingControlShowing"
[Code] .....
Another thing should I be applying this validation on the Id Op'rateur column or when I click to the edit the next column in the datagrid i.e. Description?

View 5 Replies

Executing 'rules' In Visual Basic

Feb 16, 2012

I have created a system in Visual Basic 2010, which is to check on the existence of files attached in a access database. However there are different types of records in the database that will have to be checked against a different set of rules than others. For example one type of record will have to be checked to make sure certain named text files are there. However a different type of record will check for another text file with a different name e.t.c.

I have worked out that in order to do this I need a set of rules that the code in visual basic can match against and run that code depending on the choice. For example one type will execute rule 1,3,5 and the other type 2,4,6. I thought that these could be done in an XML document but am not too sure.

View 29 Replies

Store ASP.Net Access Rules On SQL Server?

Aug 8, 2011

So I know it's possible to store Users and Roles on SQL server but I was wondering if it was also possible to store the access rules on SQL Server. I've searched but I can't find anything.

Our auditor requires us to run reports that tell us which users have access to which websites. Currently I am parsing each web.config file to see which users/roles have access, storing that in SQL server and running a report off of that but I am hoping there is a better way.

View 1 Replies

GDI+ Flat File Disposal Rule For Textured Brush?

Dec 8, 2010

I place these 2 questions in this forum simply 'cause those that know GDI+ best are probably .Net vs. VB6 classic users... So here it goes.I'm using GDI+ flat file to generate a textured brush with image attributes. Creating these are no problem, but I can't find documentation that says whether disposing of the brush will dispose the original image & attributes handles I've assigned to the brush or whether I need to destroy those also? I can't locate anything that says whether GDI+ copies the handles or uses the ones I provided. Destroying the handles well before the brush is destroyed does no damage. Thus my assumption is that the handles are copied. But you know what they say about assumptions.

2. Likewise I use a GDI+ function to return the image assigned to a textured brush. Again, I don't know if that returned image handle is to be disposed by me or not. The returned handle changes every time I call the function, so I'm assuming that I should be destroying it. Thanx to all that can shed any light whether from personal experience or pointing me to some black & white documentation.

View 1 Replies

Database Validation Rules And Masked Fields

Jul 16, 2009

i'm doing a project for school which requires me to make a fully functioning database program with validation. I'm done with almost everything except a few things and that includes the database, since i don't really know how to make validation rules and masked fields.It's possible i'm guessing to in forms and such but in datagrid view?

View 1 Replies

Rules/Guildlines For Closing Vs. Hiding Forms

Jul 16, 2009

I was wondering what Rules/Guildlines poeple for Closing vs. Hiding forms?

example:Should i only close a form when i am finished with it?

View 9 Replies

Task: Create And Display New Password Using Rules

Nov 24, 2011

Rules:

Rule 1: Replace all of the vowels (A, E, I, O or U) in the original password with a number as follows: (20 points) Replace the first vowel with the number of 1. Replace the second vowel with the number of 2. Replace all other vowels with the number of 9.

Rule 2: Replace all of the numbers in the original password with the letter Z. (15 points)

Rule 3: Reverse all of the characters in the original password. (10 points)

Rule 4: The enter password should be non case-sensitive. All the letters in new password should be in upper-case. (5 points)

This is what is should look like:

My code:

CODE:

Right now I'm not worried about the efficiency of the code (i.e. simplifying code into fewer lines). The problem I am having is the locating and replacing of the vowels. When running the program the code will replace all of the numbers with "Z", reverse the string, and make all letters uppercase. When it comes to locating the vowels, the program squares the number it goes through the string by the number of letters that it contains. I don't know why it does this.

when the string contains more then 1 vowel the first time it goes through it replaces all vowels with 1, then goes through again and replaces all vowels with 2, and goes through again repalcing all vowels with 9. These are all then combined into one string.

The research I have done has only turned up how to replace vowels with one thing (i.e. all vowels become "*")

View 1 Replies

Enforce Validation Rule In Create Table Statement For A Coloumn

Dec 15, 2011

I want to enforce validation rule in create table statement for a coloumn. im using vb.net as front end and access as back end.

View 2 Replies

Import Or Create An Outlook 2003 Rule (.rwz) With VSTO 2005?

Jul 29, 2009

I would like to automatically create an Outlook rule (move email containing something in subject to folder xyz) but dont know how to achieve this. Of course I can create the rule and export it to a .rwz file. This file can be imported manually, but how can I import it automatically?

Can I import a rule through my VSTO 2005 Outlook (2003) Addin? Or can I create the rule from within this addin?

View 2 Replies

Create A Form That Displays Rules Of Game On Label

May 10, 2011

I am having trouble with my code for Guess my number. I am definitely amatuer. Yes it is a homework assignment. No I am not asking you to do it for me. But I am stuck.Your GUI program is a game to be played by the user. See Screen Shot on Screen Shot Tab..A new employee is working on a classified mission and the program will randomly pick an expected profit to be guessed by the user.The program must randomly select an number within the range of 1 to 900.Do NOT use a 'Start Game' button to generate the rand number. Generate a rand number when the GUI is loaded.

1. Create a form that displays the rules of the game on a label.
2. Create a textbox for the user to input the guess and also a 'guess' button.
3. If the user is outside the given range, provide a proper message (<1 Is not a valid guess or >900 is not a valid guess)and clear the guess.
4. When a user has a valid guess, display a proper message (either too high or too low) and tell the user to guess again.
5. With a correct guess, display a proper message and change the form's background color to red and disable the guess textbox.
6. Create a reset button that allows the user to play the another game with a new random number.
7. Create a show me button that displays the number and does not generate another random number (allow the current game to continue).
8. Create a exit button to exit the program.
9. Ensure that you include error checking to prevent a user guess that is out of the given range and for any non-numeric characters.
10. Create a single Help menu item that launches a message box that displays valuable and meaningful information for the program and usage.
11. Create a label that tracks the guess count per game. Each time a new number is generated, start the guess count at 0.
12. Create a max guess limit set to 5 and use a progress bar to track the progress to approach the limit.
13. After each valid guess (1-900), clear the guess and update a label/textbox that displays all of the previous guesses up to 5 entries.

Here is my code so far. I have been working on one point at a time and then testing it. I have not even made it to numbers 11 - 13. I am not getting actual errors. Instead of my reset button clearing all fields at once I am having to click it more than once. Instead of displaying messages per scenario the message label is staying on either input a number or your number is too low. My Answer is not displaying when Show answer is clicked-perhaps my answer coding is wrong? [code]

View 14 Replies

EntLib Validation Syntax For Optional Field Rules?

Feb 25, 2010

I have an field, Address2, which is optional. Thus if it is null, no validation rules apply. However, if a value exists, its length cannot be greater that 255 characters.

I have been toying with:

<StringLengthValidator(0, RangeBoundaryType.Inclusive, 255, RangeBoundaryType.Inclusive, MessageTemplate:="Address 2 can be between 0 and 255 characters in length.", Ruleset:="MyRules")> _

But if it's not present, I still get an error.

View 2 Replies

Name An Event Handler Of A Private Variable In Following FxCop Rules?

Apr 22, 2010

On one side, in Vb.Net when you add an event handler to an object the created method is named: <NameOfTheObject>_<NameOfTheMethod>.As I like to have consistent syntax I always follow this rule when creating event handlers by hand.On the other side when I create private variables I prefix them with m_ as this is a common thing used by the community, in C# people use to put _ at the beginning of a variable but this is no CLS compliant.

View 1 Replies

Validate Controls Based On Rules Stored In A Table?

Jul 27, 2010

is there a way to validate controls on a form, where the validation rules themselves are stored in a database table?My problem is my application is used to submit forms to mulitple government agenices both local and state level. Every entity seems to have there own rules about what needs to be in what location. i would like to not have to code all of the various rules for all the different fields. My thought was to store them in a database table and then perform validation based on rule table lookups...however I would like to use the .NET validation controls.

View 2 Replies

Regex - Tokenizing A Complex String (a Snort Rule) With Regular Expressions (.NET)

May 21, 2011

I need help from the Regex wizards out there. I am trying to write a simple parser that can tokenize the options list of a Snort rule (Snort, the IDS/IPS software). Problem is, I can't seem to find a workable formula that breaks apart the individual rule options based on their terminating semi-colon. The formulas that I have cooked up grab all options between parenthesis into a single capture group.

I am using the excellent RegExr tool at the GSkinner site with some of the below sample rule options from Emerging Threats (I parsed off the rule header -- that's easy to tokenize):

[Code]...

I had to play with a few example regex's that work with quoted strings. Finally realized that I am staring at negative look-behinds that avoid quotes that are escaped. This seems to solve any other escaped character, too, because escaped characters only appear inside unescaped quotes.

View 1 Replies

Create A Set Of Grammar Rules For Speech Recognition Program With An Array

Jun 15, 2012

I have been trying to create a set of grammar rules for a speech recognition program with an array, but cannot seem to accomplish this task. Here is the general idea:[code]But this did not work, because I cannot convert strings into srgsoneof.

View 18 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved