1 Reply Latest reply on Jan 5, 2010 4:25 PM by Denis Golovin

    CBR not working for me

    Billy Buzzard Newbie

      I'm trying to create a Content Based Router that validates fields on an object and it's not working.  I started off with a very simply Drools Rules file that only tests for the existence of the Message object.  Once I get that to work then I want to test some of the fields on that object.  For example I might want to make sure that field 1 contains all numeric characters and has a certain length.


      I'm going to include my sample code.  The first service will monitor a file folder and input the records when the file appears. That service will split the file into single records and send them one at a time to the validator service.  If the record is valid ( for now just exists ) then we should jump to the GoodService.  I've tested this with a static router and the routing works, but I now need to get the code to conditional route the messages.


      I plan on expanding the validator to test multiple fields and conditions, but this initial code for just so I understand what I need to do.  The key is that I will pass in one object at a time for validation.


      The attached esb include the source code and a sample test.csv file to use for input testing.