How to fetch enumeration from KieBase programmatically?

Solution Verified - Updated -

Issue

What problem/issue/behavior are you having trouble with? What do you expect to see?

    Collection<KiePackage> kPackages = kSession.getKieBase().getKiePackages();
    for (KiePackage nextPackage : kPackages) {
        Collection<Rule> rules = nextPackage.getRules();
        for (Rule nextRule : rules) {
        RuleImpl r = (RuleImpl) nextRule;
        System.out.println(" ------------------ ");
        System.out.println("Package: " + r.getPackageName() + " - Rule Name: " + r.getName() + " - Dialect: " + r.getDialect());
        }
    }

Using above code it is possible to access rules but not an enumeration (created in business-central) inside a package.
How to access the enumeration assets inside a package?

Environment

  • Red Hat JBoss BRMS
    • 6.x
  • Red Hat JBoss BPM Suite
    • 6.x

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.