not very easy as far as I know. You'd have to dig into the sourcecode and see how .class files are stored in the DB and then create something yourself. Or.... deploy in a test server and see what db record is used and copy that over.
I did some research and i figured (not sure..) that jbpm uses the FileDefinition object to load the class byte array from the a database, and then with a specialize class, subclass of ClassLoader, loads the class from the byte array.
But i still don't know where the binary class data is stored, i checked out the jbpm database and there is nothing stored besides the jbpm_byte_block table that is used to stored some object variables or something like that.
Also i cheked the size of jbpm/server folder and when i do the deploy the size doesn't change, so i guess it's not using some embeded database.
Any suggestion / comment / whatever... ??
Binary data are effectively stored in the table jbpm_byte_block.
but when i extracted it just have 1024 bytes and my node class is larger than that, but well i'm gonna try again.
For some reason, jBPM stores bytes in block of 1024. Hence if your class file size is greater than 1024 bytes than it will break it in to multiple of 1024 and save it.
It seems you have just extracted 1 block only.
To fetch all the blocks of particular class file(if size is greater than 1024) you have to first fetch the ID_ of your class from the BYTEARRAY table and then use following query to get all the byte blocks of your class by putting the value of ID_ fetched earlier
select * from jbpm_byteblock where processfile_ = ?
I am just wondering tha there is another way to load class by using JBPM classloader(parent of process class loader) i.e by putting class file in WEB-INF/classes folder. I am not sure if it can do trick for you.
You can put the classes in WEB-INF/classes, but they are not versioned then.
Thanks you guys,