Hello,
In BacktrackTokenVisitor, you added things like
ArcTokenEvent.newBacktrackedEvent( engine, token );
Shouldn't they be
engine.fireEvent(ArcTokenEvent.newBacktrackedEvent( engine, token ));
? Just creating the event won't do much :-)
If yes, I already made the changes locally, I can commit those if you wish.
Correct me if I'm wrong, but we already have skipped and discarded events, they're sent by BaseEngine#executeNode(), no?
On the other hand, I'd be happy to add an ARC_TOKEN_PROCESSED event, so that I can easily update the pending field in the arc tokens table. I also already did that locally, and if you're okay with it, I can commit it too.
As for your concern of sending several events for one action, to me it's no big deal because I'm not sure many people will actually use this events mechanism. But OTOH, those - like me - who do will probably need to get as many events as they can in order to, say, reflect the execution changes in a DB. Plus, it's not like it kills Sarasvati's performance ;-) So I'd say it's up to you eventually, but my opinion is that it's neither useless nor overkill.
Cheers!