in reply to rules : action processing like firewall

MacFurax:

Visiting cpan and searching for "rules processing" turned up FSA::Rules which appears like it might be a good tool for your purpose. From what I've heard, POE sounds like a good tool for event-driven systems like you want. Finally, the Prolog language was created to handle those sorts of problems, so you may want to check out AI::Prolog.

I've never used any of the three, though, so you may want to do some more digging.

I *have* created several workflow systems, and their structure is pretty simple, though. Basically you have a list of queues, and a list of rules for each queue. Periodically, your application wakes up and evaluates the rules for each queue. Each rule scans a set of input queues, and for each item that matches the rule, you move the item to the specified queue. Then, of course, you have all the frills, bells and whistles to turn it into an application.

Toy example:

Queues: Q1: "START": Initial bucket for all applications. Q2: "Incomplete": Applications still needing information wait here. Q3: "Complete": Applications ready to process wait here. Q4: "Credit Approval": Applications needing credit approval wait he +re. Q5: "Fulfillment": Tasks awaiting fulfillment wait here. Q6: "DONE": Completed tasks sit here until deleted/archived/etc. Rules: R1: "?Form completed?" Input queues (Q1) Move item to Q2 if missing any of: (Name, Phone, Address, Product Selected) R2: "?Big order?" Input queues (Q3) Move item to Q4 if value_of(Product Selected) > $500 R3: "?Form completed?" Input queues (Q1, Q2) Move item to Q3 unless missing any of: (Name, Phone, Address, Product Selected) R4: "?Approved?" Input queues (Q4) Move item to Q5 if approved R5: "?Rejected?" Input queues (Q4) Move item to Q6 if !approved ... etc. ...

...roboticus

Replies are listed 'Best First'.
Re^2: rules : action processing like firewall
by james2vegas (Chaplain) on Mar 26, 2010 at 12:44 UTC
    or Workflow, which seems quite extensive. That may be a good or a bad thing, depending.