[jboss-user] [jBPM] - Re: Get assets from Guvnor application?

Kiran A do-not-reply at jboss.com
Fri Oct 14 10:21:45 EDT 2011


Kiran A [http://community.jboss.org/people/tropigeek] created the discussion

"Re: Get assets from Guvnor application?"

To view the discussion, visit: http://community.jboss.org/message/631820#631820

--------------------------------------------------------------
Not sure if you have already found this out. This is what I did: 

1. Define a change-set.xml in your classpath and define your assets - either from guvnor or files or classpath .... 

<change-set xmlns=' http://drools.org/drools-5.0/change-set http://drools.org/drools-5.0/change-set' xmlns:xs=' http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance'
  xs:schemaLocation=' http://drools.org/drools-5.0/change-set http://drools.org/drools-5.0/change-set
     http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd'>
  <add>
                         <resource source=' http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/webdav/packages/com.mycompany/myProcess.bpmn2 http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/webdav/packages/com.mycompany/myProcess.bpmn2' type='BPMN2'/>
   
  <resource source="classpath:com/mycompany/process/myOtherProcess.bpmn2" type="BPMN2" />
 </add>
</change-set>


2. Build your knowledge base as a regular classpath resource to your change-set.xml 
                     KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
                     kbuilder.add(ResourceFactory.newClassPathResource("com/mycompany/change-set.xml"), *ResourceType.CHANGE_SET*); 
kbase = kbuilder.newKnowledgeBase();

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.
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/631820#631820]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111014/c6ddc90e/attachment.html 


More information about the jboss-user mailing list