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