rules

VSTO: process mail using newmailex before outlook rules move mail

I am creating an addon for Outlook 2007 that reads a mail item when it is received, and then rewrites it. The addon works great, and rewrites the mail for items that do not have an Outlook rule that moves them into another folder. If there is a rule, it is still fine about 50% of the time. The other 50% of the time, the rule moves the ma...

Form object question

Does anyone have any hard and fast rules about what kind of code the form object should handle as opposed to letting the object itself handle it? For example, if there is a race, should the object that is racing say, horses, handle the race as part of being a horse, or is it better to place that inside the form object? I guess what I'm a...

Insert another entity in partial insert,update method of an entity

I use LinqDataSource in my web pages and I want to handle Business rules in Changed event of properties and also OnValidate method of an entity. I can delete other entities in partial delete also, I can upload other entities in partial Insert and Update methos but I can't Insert entites in partial update or delete methods. Example : I ha...

Java Object Question

Not quite sure how to word this question. I am wondering if there is a method to check certain parts of a custom java class to see if it matches a certain criteria. Such as this public Name(String forename, String middlename, String surname) And then when an array of instances of that class are created say, Name[] applicants = new N...

Client and Server Side rules engines?

I'm looking for Java rules engine options that will allow me to use the same rules in a server side backend, a GWT frontend, and JavaME apps. I'd also love to hear about the pitfalls of attempting to do such. The motivation is a push to use a rules engine in a server side code base that I am concerned may cause a schism between validati...

rules precedence in bison

Hi Here is the grammar rules: ProcessExpression : EventExpression "->" ProcessExpression | ProcessName ; Please can you tell me how can I tell to bison that the first rule has the highest precedence than the second one? I have tried: %nonassoc PROC %right "->" ProcessExpression : EventExpression "->" Proces...

xslt import/include 2 files with the same template

Hello guys, I've got an interesting question on XSLT import/include. I have 2 XSLT files with the same rule. Receipt XSLT: (is run by itself) <xsl:template match="Booking" mode="extraStyle"> <link rel="stylesheet" href="../css/receipt.css" type="text/css" media="screen"/> </xsl:template> EmailCommon XSLT: (serves as template libra...

EntLib Validation Rules Order of Operations?

What determines the order of execution of an EntLib validation rule: Given the following: <ValidatorComposition(CompositionType.And, Ruleset:="Default")> _ <NotNullValidator(MessageTemplate:="Transaction ID is required.", Ruleset:="Default")> _ <TypeConversionValidator(GetType(Int64), MessageTemplate:="Transaction ID must be numeric.",...

About sql server rules

How can I correct this syntax , create rule r1 as @ f <1000 ? ...

Capitalization of Person names in programming

Hey all, Is anyone aware of some code/rules on how to capitalize the names of people correctly? John Smith Johan van Rensburg Derrick von Gogh Ruby de La Fuente Peter Maclaurin Garry McDonald (these may not be correct, just some sample names and how the capitalization could be/work) This seems like a losing battle... If anyone has...

Drools Rules: How can I use a method on "when" section?

Hi, I need to execute a method on "when" section of a DSLR file and I´m not sure if it´s possible. Example: rule "WNPRules_10" when $reminder:Reminder(source == "HMI") $user:User(isInAgeRange("30-100")==true) Reminder(clickPercentual >= 10) User(haveAtLeastOptIns("1,2,3,4") == true) then $reminder.setPriority(1);...

Unit Testing Custom Code Analysis Rules in 2010 - Any Hope

In the past it has been a real PITA to unit test custom Code Analysis rules. I haven't found anything out there that shows the situation to be any different in 2010, but I'm not giving up. If anyone knows if this is "possible" in 2010 please respond - thanks! ...

Can I enforce code style policy in eclipse IDE for c++ code??

I want that whatever code style i defined in eclipse editor ..should be followed by coders, so can i enforce it as program will not even build without satisfying all the rules??? ...

Logging SELECT statements in PostgreSQL 8.4

Hi All I've got a table which contains sensitive data and according to data protection policy we have to keep a record of every read/write of the data including a row identifier and the user who accessed the table. The writing is no issue using triggers but triggers aren't supported for SELECT statements. What's the best method of doin...

What Data structure for Reputation Rules in C# (like stackoverflow)

I am currently building a system which will have entities that will have scores like reputation etc.. I will have a service that will check for certain rules having been triggered, and will perform certain logic if they are triggered. Previously I have used say an Enum for doing this when I have only had to store an id and a descriptio...

drupal rules module - add fields to email

I am looking for the syntax to add node fields to the body of an email. Examples I looked at indicate the the format is: [content_type:content_type_title] However my email arrives with just the string : [content_type:content_type_title] Even better would be a PHP snippet that loads the node and dumps filed title and filed value int...

Very basic running of drools 5, basic setup and quickstart

Is there a more comprehensive quick start for drools 5. I was attempting to run the simple Hello World .drl rule but I wanted to do it through an ant script, possibly with just javac/java: I get the following error: Note: I don't am running completely without Eclipse or any other IDE: Is there a more comprehensive quick start for d...

How to strip out a -D for just one file in a gnu makefile?

I have '-Wredundant-decls' in my CXXFLAGS but for one file, I want it removed. In my GNU makefile, how can I structure a rule to remove just that part of the CXXFLAGS. I know how to add only for that file, I would do something like this: $O/just_one_file.o: CXXFLAGS += -Wredundant-decls So, ideally I'd do something like this (which ...

Store Business Rules in XML Document, Validate afterwards in Java, how?

Example XML Rules document: <user> <username> <not-null/> <capitals value="false"/> <max-length value="15"/> </username> <email> <not-null/> <isEmail/> <max-length value="40"/> </email> </user> How do I implement this? I'm starting from scratch, what I currently have is a User-class, and a UserCon...

Drools rules import with wildcard

Hello everyone, I am working with Drools rules. Some developers have created rules which I have to put on Guvnor (rules repository) and build packages. In these rules they have import statements with wildcards, for example: import org.drools.runtime.rule.*; When I upload this on Guvnor and try to build, it tells me: Unable to introspe...