Groovy Script task instantiating custom class issue

HI there!

I’ve created a custom class and packaged it with my process deployment WAR. In my model, I referenced the class using the ‘import’ statement, with no results. From a previous thread found online, I was able to finally instantiate the class using ‘Thread.currentThread().getContextClassLoader().loadClass’

Has there been any change since then regarding this issue? Consuming classes in the groovy script will be something I might heavily depend on, and instantiating a class in this way is not very straightforward nor intuitive…
Please advise! :slight_smile:

Environment : Camunda 7.5, Wildfly 10, Shared engine,

Hi @ksinno,

Have a look at https://docs.camunda.org/manual/7.5/user-guide/process-engine/scripting/#reference-process-application-provided-classes and https://docs.camunda.org/manual/7.5/user-guide/process-engine/scripting/#load-script-engine

Cheers,
Thorben

1 Like

Thanks alot! Wasn’t able to find this reference while going through the documentation… weird
Much appreciated!