Hi,
the user guide says:
Delegation classes are loaded with the process class loader of their respective process definition. The process class loader is a class loader that has the jBPM classloader as a parent. The process class loader adds all the classes of one perticular process definition. You can add classes to a process definition by putting them in the /classes folder in the process archive. Note that this is only useful when you want to version the classes that you add to the process definition. If versioning is not necessary, it is much more efficient to make the classes available to the jBPM class loader.
public Class findClass(String name) throws ClassNotFoundException { try { return super.findClass(name); } catch (ClassNotFoundException cnfe) { /* Parent class loader failed to load the class. */ } Class clazz = null; FileDefinition fileDefinition = processDefinition.getFileDefinition(); if (fileDefinition!=null) { String fileName = "classes/" + name.replace( '.', '/' ) + ".class"; byte[] classBytes = fileDefinition.getBytes(fileName); clazz = defineClass(name, classBytes, 0, classBytes.length); } if (clazz==null) { throw new ClassNotFoundException("class '"+name+"' could not be found by the process classloader"); } return clazz; }
Sorry, I messed up loadClass (which actually implements delegation) and findClass. There is no bug in ProcessClassLoader.