Bug 1322424 - kie-aries-blueprint does not define ksession-ref and kbase-ref elements in XSD
Summary: kie-aries-blueprint does not define ksession-ref and kbase-ref elements in XSD
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Mario Fusco
QA Contact: Marek Winkler
Tomas 'Sheldon' Radej
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-30 13:22 UTC by Marek Winkler
Modified: 2020-03-27 19:08 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
The elements <ksession-ref> and <kbase-ref> can not be used with KIE-Aries-Blueprint for declaring Blueprint beans for KieSession or KieBase from a kJAR with a given ReleaseId, because they are only partially implemented, and are not defined in kie-aries-blueprint.xsd. Their usage results in Blueprint rejecting the given XML. To work around the problem, declare a bean for KieContainer, and use that for creating KieSession or KieBase beans manually as follows: <kie:kcontainer-ref id="kjar-kcontainer" releaseId="kjar-gav" /> <bean id="kieSessionBean" factory-ref="kjar-kcontainer" factory-method="newKieSession" destroy-method="dispose"> <argument value="kieSessionName"/> </bean>
Clone Of:
Environment:
Last Closed: 2020-03-27 19:08:32 UTC
Type: Bug


Attachments (Terms of Use)

Description Marek Winkler 2016-03-30 13:22:34 UTC
Description of problem:

The elements <ksession-ref> and <kbase-ref> are not defined in kie-aries-blueprint.xsd, therefore these elements cannot be used in Blueprint XML, see for instance [1], [2].

There is a workaround to define the KieSession by using <kcontainer-ref>, therefore I am setting severity to medium: 

    <kie:kcontainer-ref id="kjar-kcontainer" releaseId="kjar-gav" />

    <bean id="kieSessionBean"
          factory-ref="kjar-kcontainer"
          factory-method="newKieSession" destroy-method="dispose">
        <argument value="kieSessionName"/>
    </bean>

[1] https://github.com/droolsjbpm/droolsjbpm-integration/blob/6.4.x/kie-aries-blueprint/src/test/filtered-resources/org/kie/aries/blueprint/gav.xml

[2] https://github.com/droolsjbpm/droolsjbpm-integration/blob/6.4.x/kie-aries-blueprint/src/test/java/org/kie/aries/blueprint/tests/KieBlueprintGAVTest.java

Version-Release number of selected component (if applicable):
BRMS 6.3.0 ER2

How reproducible:
always

Steps to Reproduce:
1. see test [2]

Actual results:
Test fails because blueprint XML does not conform with XSD.

Expected results:
Test succeeds.

Comment 3 Marek Winkler 2016-05-11 12:09:28 UTC
Increasing severity, since the fix to BZ 1310039 caused the workaround mentioned in this BZ description not to work.

There is another workaround; however, it is more complicated (and much less intuitive) which makes developer experience unpleasant.

The new workaround:

    <kie:kcontainer-ref id="kjar-kcontainer-resolver" releaseId="kjar-gav" />

    <bean id="kjar-kcontainer"
          factory-ref="kjar-kcontainer-resolver"
          factory-method="call" />

    <bean id="kieSessionBean"
          factory-ref="kjar-kcontainer"
          factory-method="newKieSession" destroy-method="dispose">
        <argument value="kieSessionName"/>
    </bean>


Note You need to log in before you can comment on or make changes to this bug.