-
1. Re: How to validate process definitions , before creating the Knowledge base object
tsurdilovic Feb 20, 2012 6:00 PM (in response to arunvg)The jBPM Designer has a visual validation feature that could help you with that (http://docs.jboss.org/jbpm/v5.2/userguide/ch10.html#d0e3284).
Hope this helps.
-
2. Re: How to validate process definitions , before creating the Knowledge base object
arunvg Feb 20, 2012 11:58 PM (in response to tsurdilovic)Thanks for the reply .
This surely helps when the process definition is done using the web designer.
Suppose the process definition is done manually ( more a developers way though) , Can I validate each process definition using a core engine API.
Surely it is doing it now on
kbuilder.newKnowledgeBase()
I wanted to do the validation individually. Is there any API exposed for this purpose.
Cheers
-
3. Re: How to validate process definitions , before creating the Knowledge base object
liliana.iovanovici Feb 21, 2012 2:32 AM (in response to arunvg)1 of 1 people found this helpfulI thing from API you can verify using kbuilder.hasErrors() or kbuilder.getErrors().
Try it.
-
4. Re: How to validate process definitions , before creating the Knowledge base object
arunvg Feb 21, 2012 4:37 AM (in response to liliana.iovanovici)In the latest source available in github the KnowledgeBuilder interface have a method undo
So that it looks like I can implement my use case as below
kbuilder.add(ResourceFactory.newByteArrayResource(processFile), ResourceType.BPMN2);
if(kbuilder.hasErrors()){
kbuilder.undo();
}
Comment given on undo method in the code :
/**
* 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.
*/
void 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