[rules-users] firing rules dynamically
hanumesh.m
hanumesh.m at gmail.com
Thu Mar 20 05:36:47 EDT 2008
Anstis, Michael (M.) wrote:
>
> If I understand correctly a set of rules needs to be ran depending upon
> the
> file mask?
>
> Would the use of agenda groups not provide the solution?
>
> 1) One rulebase with all rules for all partners in it
> 2) When a file appears the filename mask is extracted and the
> corresponding
> agenda group ran
> 3) The result (say a new Fact created by one of the rules, say QueuedFile)
> is retrieved from WM.
> 4) The file assigned to the queue.
>
> As new partners are added the rulebase simply has the new rules in their
> respective agenda group added.
>
> My 50c's worth.
>
> Mike
>
>
> -----Original Message-----
> From: rules-users-bounces at lists.jboss.org
> [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of hanumesh.m
> Sent: 19 March 2008 10:01
> To: rules-users at lists.jboss.org
> Subject: [rules-users] firing rules dynamically
>
>
> Hi,
>
> I am working with an application, where in it does polls a directory
> regularly. When ever it finds a file in the directory, it reads the file
> name ( which contains some mask say ABC-834-xxxx ), which my application
> sets the ABC-834 to bean of rules. Based on this mask, the targetQ for
> this
> file-content will be decided.
>
> I am able to do that using .drl file. But as partners increase new files
> with their masks will be placed in the source folder. So I have an admin
> module which creates partners with the details of mask, sourceQueue and
> destinationQ which will act as my rules.
>
> I need to get all the rules from the database as soon as I found a file
> in
> the source folder, so that I can fire all the rules and decide on the
> target
> queue.(Assuming, partner details will be upadted using admin module)
>
> Any help for this situation will be very helpful.
>
> Thanks in Advance,
> Hanumesh M
> --
> View this message in context:
> http://www.nabble.com/firing-rules-dynamically-tp16142265p16142265.html
> Sent from the drools - user mailing list archive at Nabble.com.
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
> Hi Mike,
>
> Thanks for the reply.
> I am not still clear on the creation and firing rules. Let me explain
> in detail
>
> There say 3 trading partners who share files with my application.
> Say ABC(FileMask: ABC-834, and tagetQ is q834)
> DEF(FileMask: DEF-850, and targetQ is q835)
> ...
> Through my admin module, I will insert guidelines for each trading
> partner (fileMask, targetQueue).
> In my database there are 3 rows in a table x which acts as rules for
> the files they place.
> Here I am not using .drl file so that I can build the PackageBuilder.
>
> Any partner can place the file on the source folder. I need to pick the
> file and then I need to fetch the row(targetQueue) relating to the file
> and then fire rules accordingly.
>
> Now how to create package from the data contained in database, so that
> I can obtain the rulebase.
> The reason of not using .drl is at run time from admin module I can add
> new partner and their rules. and my application should handle the new
> partner added there on.
>
> Please guide me and share me if you have any sample/documentation as
> such.
>
> Thanks for your support.
> Hanumesh
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
--
View this message in context: http://www.nabble.com/firing-rules-dynamically-tp16142265p16175100.html
Sent from the drools - user mailing list archive at Nabble.com.
More information about the rules-users
mailing list