Provide external javascript in Execution Listener


I am trying to provide external javascipt file in an execution listener like below :-

<camunda:executionListener event=“take”>
<camunda:script scriptFormat=“javascript” resource=“deployment://com/testapp/bpmn/ConstructMessage.js” />

But at run time it gives me following exceptions:-

org.camunda.bpm.engine.exception.NotFoundException: ENGINE-09024 Unable to find resource at path deployment://com/testapp/bpmn/ConstructMessage.js

Please provide suggestions if i am doing anything wrong here?



Does your deployment (read: Camunda deployment that is persisted in the database) contain a resource with name com/testapp/bpmn/ConstructMessage.js? You need to deploy those scripts along with your processes.



Thanks for replying, in my war this path is located in folder under “WEB-INF/classes” folder. So i am finding out a way that how can i provide this external script in bpmn?


Check out this docs section:

And in particular this example: <scriptTask scriptFormat="groovy" camunda:resource="classpath://org/camunda/bpm/task.groovy"/>