Hi,
U can access assets from two different packages using one ChangeSet definition in Guvnor.
Multiple "<resource>" tags can be defined in an add
"<add>" tag. Following will be the configuration in ChangeSet
Note : "<ChangeSet>" tag can have only one tag and that tag will occur
only once. Tags allowed in changeset.xsd are following,
1. "<add>" tag
2. "<remove>" tag
Change Set XSD :
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/...
[change set]
<add>
<resource
source='http://server:8080/guvnor-tomcat/rest/packages/com.pkg1/source'
type='DRL' basicAuthentication="enabled" username="admin"
password="admin"
/>
<resource
source='http://server:8080/guvnor-tomcat/rest/packages/com.pkg2/source'
type='DRL' basicAuthentication="enabled" username="admin"
password="admin"
/>
</add>
[/changeset]
Now u will have to call "applyChangeSet" once, as u will be having one change
Set referring more than one packages
kagent.applyChangeSet(ResourceFactory.newClassPathResource("guvnor-tomcat-single-changeset.xml"));
Hope that answers your questions.
Regards,
Zahid Ahmed
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On
Behalf Of rganesh84
Sent: 27 August 2013 12:22
To: rules-users(a)lists.jboss.org
Subject: [rules-users] Guvnor - more than one resource in changeset.xml
I have 2 packages in Guvnor UI having different set of rule assets in it.
pkg1 -> UI rules
pkg2 -> Business rules
In the java application code base, is it mandatory to have 2 change set xmls with
different package contents?
[Java] // for UI rules
kagent.applyChangeSet(ResourceFactory.newClassPathResource("guvnor-tomcat-pkg1-changeset.xml"));
[/Java]
[Java] // for business rules
kagent.applyChangeSet(ResourceFactory.newClassPathResource("guvnor-tomcat-pkg2-changeset.xml"));
[/Java]
Can this be achieved having only one changeset holding multiple packaged rules?
[change set]
<add>
<resource
source='http://server:8080/guvnor-tomcat/rest/packages/com.pkg1/source'
type='DRL' basicAuthentication="enabled" username="admin"
password="admin"
/>
</add>
[/changeset]
If i add a resource to add tag, how do I call it in Java code?
--
View this message in context:
http://drools.46999.n3.nabble.com/Guvnor-more-than-one-resource-in-change...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users