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-...
https://github.com/droolsjbpm/droolsjbpm-knowledge/blob/master/knowledge-...
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&...]