Provide external javascript in Execution Listener


#1

Hi,
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” />
</camunda:executionListener>

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?
Thanks


#2

Hi,

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.

Cheers,
Thorben


#3

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?


#4

Check out this docs section: https://docs.camunda.org/manual/7.9/user-guide/process-engine/scripting/#script-source

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


#5

The external part where it will be going to need to chngwes that wil bebhaving the particular part where thsui will be going to have it around teh external script where thehp australia support will carry forward the process.