Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-2358

Determine how to use external library inside a script task

XMLWordPrintable

      Determine how an external script library can be used in a script task. Possible
      scopes would be:

      • global for process engine
      • local to deployment
      • local to process definition
      • local to activity

      Python:

      • in a shared process engine scenario the default python path is apache-tomcat-$VERSION/lib/Lib resp. jboss-as-$VERSION/modules/org/python/jython/lib/Lib
      • in a embedded process engine scenario the default python path is /src/main/resources of the project
      • the environment variable JYTHONPATH can contain multiple paths separated by colons which are added to the python path in the scripting engine

      Groovy:

      • in a shared process engine scenario for Tomcat /apache-tomcat-VERSION/lib/.jar and /src/main/resources/.groovy but non in JBoss
      • in a embedded process engine scenario /src/main/resources/*.groovy for Tomcat and JBoss

      Ruby:

      • in a shared process engine scenario has to be added to jruby-complete-VERSION.jar:
      • jruby-complete-1.7.12.jar!/META-INF/jruby.home/lib/ruby/1.9/site_ruby
      • jruby-complete-1.7.12.jar!/META-INF/jruby.home/lib/ruby/shared
      • jruby-complete-1.7.12.jar!/META-INF/jruby.home/lib/ruby/1.9
      • in an embedded process engine scenario /src/main/resources/ :
      • classpath:/META-INF/jruby.home/lib/ruby/1.9/site_ruby
      • classpath:/META-INF/jruby.home/lib/ruby/shared
      • classpath:/META-INF/jruby.home/lib/ruby/1.9

      Javascript:

      • jdk < 1.8 (rhino js engine) only supports a load function in the shell but not in the embedded scripting engine (maybe possible to provide function which reads files from classpath)
      • jdk 1.8 (nashorn engine) unable to identify classpath for load function but with http it works, e.g. load("http://localhost:9000/test.js");

        This is the controller panel for Smart Panels app

              meyer Daniel Meyer
              sebastian.menski Sebastian Menski
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: