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

Cannot reference process application provided classes inside a Groovy Script

    • Icon: Bug Report Bug Report
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 7.4.0, 7.3.3, 7.2.7, 7.4.0-alpha2
    • None
    • engine
    • None

      Reproduce steps:
      Simple Servlet or EJB process application bundled as WAR file with a dependent JAR bundled in the WAR with the application (maven-managed dependencies). JavaDelegate can refer to classes in bundled JAR but groovy script task can not find classes in bundled JAR.

      Problem:

      Script task throws exception as it can not find referenced class in dependent JAR

      Expected behavior:

      Script task should be able to refer to classes in dependent library JAR, as the JavaDelegate does

      Hints (optional):
      I began this exploration on the camunda-bpm-users google group and have had several exchanges with Daniel Meyer already. Link here: https://groups.google.com/forum/#!topic/camunda-bpm-users/TrZas5rtRco

      Two workarounds for this issue are to either put the dependent JAR in the lib/ext directory of my WAS app server, or to explicitly load the required class from my groovy script. Neither of these solutions is ideal and Daniel suggested filing a bug report

        This is the controller panel for Smart Panels app

            [CAM-2857] Cannot reference process application provided classes inside a Groovy Script

            Bryan Evans created issue -
            Matthijs made changes -
            Assignee Original: Matthijs [ matthijs.burke ] New: Sebastian Menski [ sebastian.menski ]

            Sebastian Menski added a comment - - edited

            Hi Bryan,

            Thanks for pointing out this issue. We are currently not aware of a way to fix this issue of the groovy script engine or if we can actually even fix this on our side.

            I want to ask you how important this issue is for you?

            Cheers,
            Sebastian

            Sebastian Menski added a comment - - edited Hi Bryan, Thanks for pointing out this issue. We are currently not aware of a way to fix this issue of the groovy script engine or if we can actually even fix this on our side. I want to ask you how important this issue is for you? Cheers, Sebastian
            Sebastian Menski made changes -
            Status Original: Open [ 1 ] New: Waiting for customer [ 10001 ]

            Bryan Evans added a comment -

            Hi Sebastian

            This issue is not critical for me. It was critical to have my library application-scoped as opposed to globally shared in lib/ext in my application server, but loading the class explicitly from my groovy script is an acceptable workaround.

            When I execute the process in an embedded-engine scenario, the groovy script is able to find the required class so it seems that the groovy engine does not have access to the application context when run in a shared-engine scenario.

            Anyhow, I just created this ticket at Daniel's suggestion so the issue can be tracked. It is not critical.
            Thank you.

            Bryan Evans added a comment - Hi Sebastian This issue is not critical for me. It was critical to have my library application-scoped as opposed to globally shared in lib/ext in my application server, but loading the class explicitly from my groovy script is an acceptable workaround. When I execute the process in an embedded-engine scenario, the groovy script is able to find the required class so it seems that the groovy engine does not have access to the application context when run in a shared-engine scenario. Anyhow, I just created this ticket at Daniel's suggestion so the issue can be tracked. It is not critical. Thank you.
            Bryan Evans made changes -
            Status Original: Waiting for customer [ 10001 ] New: Open [ 1 ]
            Matthijs made changes -
            Authorized support contacts Original: Bryan Evans, Egan Done, Fred Fiene [ bryan_evans@otpp.com, egan_done@otpp.com, fred_fiene@otpp.com ]
            cid Original: ontario_teachers_pension_plan
            Component/s New: engine [ 11656 ]
            Component/s Original: engine [ 12052 ]
            Environment Original: Camunda BPM ibm-was-7.2.0-alpha5-ee
            IBM Websphere Application Server 8.5.5.2
            RHEL 6.5
            MySQL 5.6
            Key Original: SUPPORT-1277 New: CAM-2857
            Project Original: Support [ 10111 ] New: camunda BPM [ 10230 ]
            Security Original: Private Support Case [ 10110 ]
            Workflow Original: Support [ 27855 ] New: camunda BPM [ 27863 ]

            Matthijs added a comment -

            Hi Bryan,

            Thanks for your response.

            I have converted this SUPPORT- issue into a CAM- issue for tracking reasons.

            Do let us know if anything changes regarding the urgency.

            Please don't hesitate to contact us in case you have any further questions or remarks.

            Thank you and best regards,

            Mat

            Matthijs added a comment - Hi Bryan, Thanks for your response. I have converted this SUPPORT- issue into a CAM- issue for tracking reasons. Do let us know if anything changes regarding the urgency. Please don't hesitate to contact us in case you have any further questions or remarks. Thank you and best regards, Mat
            Sebastian Menski made changes -
            Assignee Original: Sebastian Menski [ sebastian.menski ]
            Issue Type Original: Bug Report [ 1 ] New: Feature Request [ 2 ]
            Summary Original: Unable to reference application-scoped library from script task New: I can reference process application provided classes inside a Groovy Script
            Sebastian Menski made changes -
            Fix Version/s New: 7.3.0 [ 13391 ]

              thorben.lindhauer Thorben Lindhauer
              bryan_evans@otpp.com Bryan Evans
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: