[jboss-user] [jBPM] - Creating and using a process programmatically
Affan Dar
do-not-reply at jboss.com
Thu Apr 5 21:31:36 EDT 2012
Affan Dar [https://community.jboss.org/people/affandar] created the discussion
"Creating and using a process programmatically"
To view the discussion, visit: https://community.jboss.org/message/728605#728605
--------------------------------------------------------------
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 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 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
[https://community.jboss.org/message/728605#728605]
Start a new discussion in jBPM at Community
[https://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/20120405/682fb712/attachment.html
More information about the jboss-user
mailing list