I am trying to add support for Groovy Objects in my project.
In a Groovy script of mine, I am facing a GroovyCastException.
Script1.groovy
Foo f = new Foo() // <--- Foo is a Groovy class of mine
execution.setVariable('foo', f);
Up to here, it works fine, but later on, in another script I try to assign this value.
Script2.groovy
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 ?
Thanks
Louis
Also, I have one constraint which is that I have different kinds of classloaders that are resolved at runtime. So I can't just rely on that static SpringProcessEngineConfiguration.
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.