How can I use my own classloaders instead of the default one within the ProcessEngine ?
I am trying to add support for Groovy Objects in my project.
In a Groovy script of mine, I am facing a GroovyCastException.
Foo f = new Foo() // <--- Foo is a Groovy class of mine
Up to here, it works fine, but later on, in another script I try to assign this value.
Foo f = foo // <-- Assigning the in-memory variable 'foo' to my new variable 'f'
The GroovyCastException happens here. This is because in Script1, I call VariableScope#setVariable() which loads the class with Activiti classloader, but in Script2 it is a custom classloader of mine that loads the class.
Hence my question, is it possible to override Activiti classloader with my own classloader ? If yes, which guidelines should I follow ?