[jboss-user] [jBPM] - Re: Extract bpm2 xml flow from guvnor package

xantrax do-not-reply at jboss.com
Tue Dec 20 07:44:38 EST 2011


xantrax [http://community.jboss.org/people/xantrax] created the discussion

"Re: Extract bpm2 xml flow from guvnor package"

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

--------------------------------------------------------------
for those interested

*Properties properties = new Properties();*
*PackageBuilderConfiguration cfg = new PackageBuilderConfiguration(properties);*
*KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(cfg);*
*kbuilder.add(ResourceFactory.newFileResource("PATH_OF_YOUR_PKG"), ResourceType.PKG);*
*Collection<KnowledgePackage> pkgs = kbuilder.getKnowledgePackages();*

*for(KnowledgePackage pkg : pkgs){*
*     for(org.drools.definition.process.Process proc:pkg.getProcesses()){*
*                    InputStream in = ((org.jbpm.process.core.Process) proc).getResource().getInputStream());*
*                    // Now you can serialize to a Dom element for example*
*          }*
*}*
--------------------------------------------------------------

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

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/20111220/231f1aeb/attachment.html 


More information about the jboss-user mailing list