| Summary: | kie-aries-blueprint does not define ksession-ref and kbase-ref elements in XSD | ||
|---|---|---|---|
| Product: | [Retired] JBoss BRMS Platform 6 | Reporter: | Marek Winkler <mwinkler> |
| Component: | BRE | Assignee: | Mario Fusco <mfusco> |
| Status: | CLOSED EOL | QA Contact: | Marek Winkler <mwinkler> |
| Severity: | high | Docs Contact: | Tomas 'Sheldon' Radej <tradej> |
| Priority: | unspecified | ||
| Version: | 6.3.0 | CC: | rrajasek, tradej |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| 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>
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-03-27 19:08:32 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
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> |
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.