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

Determine how to use external library inside a script task

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: L3 - Default
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.2.0, 7.2.0-alpha3
    • Component/s: engine
    • Labels:

      Description

      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");

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: