Jump to content

How to bulk process events


Remo Fiorentino

Recommended Posts

I have an event ApplyDebit from the FraudDetectionExample, I want now to create an event where I can do it in bulk. The idea is that I send a message containing 1 or more message of ApplyDebit and this bulk event will create instances of ApplyDebit and fire their rules using AssertEvent function.

 

My problem is that I am getting from AssertEvent the same event ApplyDebit instead the reply from the rules.

 

Is there a better way to create event inside the rules, Fire the respective rules, and get the response

Link to comment
Share on other sites

  • 7 months later...

When you create the Event(s) in a Rule and assert it to the working memory, it will trigger the Rules for the new created Events (rebuilds Agenda).

You can create new Events in a Rule using catalog function Event.createEvent() or .().

eg:

Events.ApplyDebit ev=Event.createEvent();

Events.ApplyDebit ev1=Events.ApplyDebit.ApplyDebit(,,,...);

Note:

When assert the Event to working memory, new Events processed in same RTC. To start a new RTC for each Event use catalog function Event.sendEvent(); or Event.routeEvent(); to send the Event to the configured default input destination or to a specific destination.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...