rules

ETL , Esper or Drools?

Hello, The question environment relates to JavaEE, Spring I am developing a system which can start and stop arbitrary TCP (or other) listeners for incoming messages. There could be a need to authenticate these messages. These messages need to be parsed and stored in some other entities. These entities model which fields they store. ...

Classifying captured data in unknown format?

I've got a large set of captured data (potentially hundreds of thousands of records), and I need to be able to break it down so I can both classify it and also produce "typical" data myself. Let me explain further... If I have the following strings of data: 132T339G1P112S 164T897F5A498S 144T989B9B223T 155T928X9Z554T ... you might sta...

Inference engine to calculate matching set according to internal rules

I have a set of objects with attributes and a bunch of rules that, when applied to the set of objects, provides a subset of those objects. To make this easier to understand I'll provide a concrete example. My objects are persons and each has three attributes: country of origin, gender and age group (all attributes are discrete). I have ...

Temporarily disable constraints (Sybase)

Is there the way to temporarily disable checking of foreign keys, check constraints and rules for some table in Sybase? ...

Apache mod rewrite rules to Zeus rewrite rules

Hi, This morning I wanted to move my development website online (in a protected folder), but I figured out that our host (on a shared server) does not use apache mod_rewrite but Zeus rules. I've never heard about that before but it seems that apache rules could be automatically converted via a command line, but as you can guess I have no...

Translations/Rule pattern

I have some code which translates one domain object to a second domain object. One of the field values in the second object is translated via a long function containing a lot of “If then else” and return statements (100 lines of code). You can say, that several of the fields from the first object is used to determined the value of 1 fiel...

Default rules in Make

Is there a mechanism in make to allow for default global implicit rules that are available anywhere, similar to the built-in rules? Make provides some built-inimplicit rules for compiling C/C++/Fortran files, without even requiring a Makefile for simple cases. However, when compiling other languages (e.g. Go programming language files)...

how to check an ANTLR token is only used once or less in the parser

In Antlr, if I have a rule for example: someRule : TOKENA TOKENB; it would accept : "tokena tokenb" if I would like TOKENA to be optional, I can say, someRule : TOKENA* TOKENB; then I can have : "tokena tokenb" or "tokenb" or "tokena tokena tokenb" but this also means it can be repeated more that once. Is there anyway I can say t...

How do i create my own Token?

I use Rules-Module. I want to add 1 to a cck integer field on an action. Someone told me to create custom token doing this addition. So, I installed tokenSTARTER module. Now, how do i access the content profile (I load it in the rules chain) where needed cck field is in? ...

How to send email using rules with pdf attachment

Hi, I am using drupal6 and i installed the rules module configured it. I need to send email to user with an attachment.. Thanks ...

I need my Debian rules file to simply copy files to it's target

I have a large project where we have the following files: A few 3rd party pre-compiled binaries Our own in-house binaries A collection of Ruby scripts A sizable Ruby on Rails project This product will be installed on appliance hardware that my employer has already selected, using Ubuntu Linux (Lucid) as the target O.S., with ...

Drools retraction is causing rule not to fire

Hi, I'm coming across some weird behavior in Drools 4.0.7, but maybe it's just cause I don't understand I how Drools works. Assume, there's a class "A" that has a property called "property". As facts, I have the following list of A's: A1, property = 123 A2, property = 345 A3, property = 123 I have two rules as follows: rule "Rule 1 ...

Learning JBoss drools: what should be my model.

Hi all, I'm learning JBoss Drools and I'm playing with the genetics data from the hapmap project: ( http://hapmap.ncbi.nlm.nih.gov/genotypes/latest/forward/non-redundant/ ) . Each file in this directory is a table with the individuals at the top, the positions on the genome on the left , and the observed mutations for each individual/po...

In Drupal, how do you create more events in the events dropdown of the Triggered Rules?

In Drupal, how do you create more events in the events dropdown of the Triggered Rules? I'm not sure if I'm supposed to create a new trigger, a new action, or something else. ...

converting htaccess to nginx, some help wanted

Anyone can help me fix below code? I did an auto convertion but many essentials were not converted RewriteEngine On RewriteCond %{REQUEST_METHOD} ^GET RewriteCond %{DOCUMENT_ROOT}/website/var/assets%{REQUEST_URI} -f RewriteRule ^(.*)$ /website/var/assets%{REQUEST_URI} [PT,L] RewriteRule ^website/var/tmp.* - [PT,L] RewriteRule ^website...

Coupons and discounts in e-commerce application

Hey! I've developed an e-commerce application, and now I'm adding support for coupons and discounts. I want your opinions on this one though, since it's trickier than I first expected. Where should I keep my logic for all different kinds of coupons? Say I have a coupon code giving me the offer "Buy 3 and get the cheapest for free" alo...

PHP preg_replace multiple rules

Hello my second family, :) I'm just wondering how to apply several rules for a preg_replace without executing them in the first run. Its a bit complicated let me explain based on an example. Input: $string = 'The quick brown fox jumps over the lazy freaky dog'; Rules: Replace a, i, o with u (if not at the beginning of a word & ...

How can I use an SQL statement stored in a table as part of another statement?

In our Oracle datbase we have a table called RULES, with a field called SQLQUERY. This field is a varchar with an SQL statement stored. The PK is DM_PROJECT. A typical statement that is stored could be select ACCOUNTNUMBER from CUSTOMERS where ACCUMULATED_SALES > 500000 I want to do something like this: select * from customer...

Rules engine approach for decision making

I need some design help with this. Customer places orders on the system. Each order has a status and based on the status, certain activities need to be performed. The entire process is fairly new so the activities that should be performed and their order are subject to change. Instead of coding the entire logic in the business object...

How to create custom static analysis rule that checks a specific property value

Hi, I would like to use the FXCop introspection API to create a custom rule that verifies the following: in MethodA, the code sets a property B on a static class C to value D : void MethodA() { C.B=D; } how can I write this? also how can I debug through a rule? ...