How to get a KieSession object by specifying the KieSession's name

Solution Verified - Updated -

Issue

How to get a KieSession object by specifying the KieSession's name, if user needs to set KieSessionConfiguration to set a eventProcessingMode?

  • To set an eventProcessingMode, user needs to use either setting system property or setting kieBaseConfiguration
  • If user wants to set kieBaseConfiguration, following API is available
    KieContainer.newKieBase(KieBaseConfiguration conf)
    KieContainer.newKieBase(String kBaseName, KieBaseConfiguration conf)

  • Using KieBase object, user can not instanciate KieSession by specifying the KieSession name
    KieBase.newKieSession()
    KieBase.newKieSession(KieSessionConfiguration conf, Environment environment)

  • Using KieContainer, user can instanciate KieSession by specifying the KieSession name
    KieContainer.newKieSession(String kSessionName)
    KieContainer.newKieSession(String kSessionName, Environment environment)
    KieContainer.newKieSession(String kSessionName, Environment environment, KieSessionConfiguration conf)

Environment

  • Red Hat JBoss BRMS
    • 6.1.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content