public ProcessInfo parseProcess(Process process,
IResource resource,
KnowledgeBuilderConfigurationImpl config) {
KnowledgeBuilderImpl packageBuilder = new KnowledgeBuilderImpl( config );
ProcessBuilderImpl processBuilder = new ProcessBuilderImpl( packageBuilder );
processBuilder.buildProcess( process, ResourceFactory.newUrlResource(
"file://" + resource.getLocation().toString() ) );
ProcessInfo processInfo = new ProcessInfo( process.getId(),
process );
List<BaseKnowledgeBuilderResultImpl> errors = new ArrayList<BaseKnowledgeBuilderResultImpl>();
errors.addAll( processBuilder.getErrors() );