How to get the currently used KieSession object in rule consequence (i.e. RHS) ?

Solution Unverified - Updated -

Issue

  • The requirement is to get a reference of current KieSession from the rule consequence (i.e. RHS). Basically, user would want to invoke a separate class's method from within the then part of the rule (i.e. RHS) and there in the method's parameter they need to pass the currently used KieSession type of instance which is executing the rule.
  • This requirement might be commonly used where users deal with multiple KieSession and need the specific KieSession type instance which executed the rule consequence. How to achieve this requirement?

Environment

  • Red Hat JBoss BRMS (BRMS)
    • 6.1.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.