<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Re: Get assets from Guvnor application?
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/tropigeek">Kiran A</a> in <i>jBPM</i> - <a href="http://community.jboss.org/message/631820#631820">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Not sure if you have already found this out. This is what I did: </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>1. Define a change-set.xml in your classpath and define your assets - either from guvnor or files or classpath .... </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p class="p1"><span class="s1">&lt;</span><span class="s2">change-set</span><span class="s3"> </span><span class="s4">xmlns</span><span class="s3">=</span><span>'</span><a class="jive-link-external-small" href="http://drools.org/drools-5.0/change-set" target="_blank">http://drools.org/drools-5.0/change-set</a><span>'</span><span class="s3"> </span><span class="s4">xmlns:xs</span><span class="s3">=</span><span>'</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a><span>'</span></p><p class="p1"><span class="s3">&#160; </span><span class="s4">xs:schemaLocation</span><span class="s3">=</span><span>'</span><a class="jive-link-external-small" href="http://drools.org/drools-5.0/change-set" target="_blank">http://drools.org/drools-5.0/change-set</a></p><p class="p1"><span>&#160;&#160;&#160; </span><a class="jive-link-external-small" href="http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd" target="_blank">http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd</a><span>'</span><span class="s1">&gt;</span></p><p class="p2"><span class="s3">&#160; </span><span class="s1">&lt;</span>add<span class="s1">&gt;</span></p><p class="p3"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&lt;resource source='</span><a class="jive-link-external-small" href="http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/webdav/packages/com.mycompany/myProcess.bpmn2" target="_blank">http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/webdav/packages/com.mycompany/myProcess.bpmn2</a><span>' type='BPMN2'/&gt;</span></p><p class="p3"> <span class="s3">&#160; </span></p><p class="p1"><span class="s3">&#160; </span><span class="s1">&lt;</span><span class="s2">resource</span><span class="s3"> </span><span class="s4">source</span><span class="s3">=</span>"classpath:com/mycompany/process/myOtherProcess.bpmn2"<span class="s3"> </span><span class="s4">type</span><span class="s3">=</span>"BPMN2"<span class="s3"> </span><span class="s1">/&gt;</span></p><p class="p2"><span class="s3"> </span><span class="s1">&lt;/</span>add<span class="s1">&gt;</span></p><p class="p2"><span class="s1">&lt;/</span>change-set<span class="s1">&gt;</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>2. Build your knowledge base as a regular classpath resource to your change-set.xml </p><p class="p1">&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160; KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();</p><p class="p1">&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160; kbuilder.add(ResourceFactory.newClassPathResource(<span class="s1">"com/mycompany/change-set.xml"</span>), <strong>ResourceType.<span class="s2">CHANGE_SET</span></strong>); </p><p class="p1">&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160; <span class="s2">kbase</span> = kbuilder.newKnowledgeBase();</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Alternately, you can go to your guvnor package - build the package, and add the ChangeSet.xml as a URL resource and avoid step (1). Hope this helps.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/631820#631820">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>