O'Reilly logo

Drools JBoss Rules 5.X Developer's Guide by Michal Bali

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Working with Stateful Session

In this chapter we'll look at using stateful knowledge sessions for executing validation rules from Chapter 3, Validating. We'll discuss the advantages and disadvantages that this brings. Since a stateful session maintains state, we'll go through various serialization modes that are supported. We'll also cover logical assertions, fact handles, and a new rule conditional element called collect.

StatefulKnowledgeSession

Drools supports two kinds of knowledge sessions for executing rules: stateful and stateless. The names might be a bit misleading at first, because both sessions maintain state. The difference is that a stateful session also maintains its state between session invocations (calls to the fireAllRules ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required