[jboss-user] [jBPM] - Re: How to validate process definitions , before creating the Knowledge base object
Arun V G
do-not-reply at jboss.com
Tue Feb 21 04:32:22 EST 2012
Arun V G [https://community.jboss.org/people/arunvg] created the discussion
"Re: How to validate process definitions , before creating the Knowledge base object"
To view the discussion, visit: https://community.jboss.org/message/718210#718210
--------------------------------------------------------------
In the latest source available in github the KnowledgeBuilder interface have a method undo
{ https://github.com/droolsjbpm/droolsjbpm-knowledge/blob/master/knowledge-api/src/main/java/org/drools/builder/KnowledgeBuilder.java https://github.com/droolsjbpm/droolsjbpm-knowledge/blob/master/knowledge-api/src/main/java/org/drools/builder/KnowledgeBuilder.java}
So that it looks like I can implement my use case as below
kbuilder.add(ResourceFactory.newByteArrayResource(processFile), ResourceType.BPMN2);
if(kbuilder.hasErrors()){
/**
* Remove the last added Resource.
* Can be useful in case this last addition generated some compilation problem.
* If multiple Resources have been added in batch using a CompositeKnowledgeBuilder,
* it removes all of them.
*/
kbuilder.undo();
}
But unfortunately I think the version included with JBPM5.2 doesn't have this method ( knowledge-api-5.3.1.Final.jar ) .
In my work environment I am not allowed to work with an unreleased (latest) version :(( .Does anyone know a workaround.
Cheers :)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/718210#718210]
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/20120221/b60fc4fe/attachment.html
More information about the jboss-user
mailing list