JBoss Community

Creating and using a process programmatically

created by Affan Dar in jBPM - View the full discussion

The jbpm 5.2 user guide explains how to create a Process using the API here: http://docs.jboss.org/jbpm/v5.2/userguide/ch05.html#d0e783, but it doesn't say how to load this process within a KnowledgeBase. I tried to create my own implementation of a KnowledgePackage and return this process in the call to KnowledgePackage.getProcesses() but when I add this knowledge package to a KnowledgeBase via the addKnowledgePackages method, I get a cast exception. Seems like the method is expecting the implementation to be an instance of KnowledgePackageImpl and nothing else.

 

I.e. line 119 here: http://grepcode.com/file/repository.jboss.org/maven2/org.drools/drools-core/5.1.0.M1/org/drools/impl/KnowledgeBaseImpl.java#KnowledgeBaseImpl.addKnowledgePackage%28org.drools.definition.KnowledgePackage%29

 

How else can I add my programmatically created process to a kbase?

 

Thanks!

Reply to this message by going to Community

Start a new discussion in jBPM at Community