cancel
Showing results for 
Search instead for 
Did you mean: 

Groovy Engine Missing

awamser
Champ in-the-making
Champ in-the-making
I read in one of the tutorials that the Groovy engine was included by default.  I have installed the plugin in  Classic Helios on Mac.

1. Create a diagram with a start, end and script process.
2. In the properties set the engine to Groovy
3. In Script: outSmiley Tonguerint "hello" + name


org.activiti.engine.ActivitiException: Can't find scripting engine for 'Groovy'
   at org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(ScriptingEngines.java:63)
   at org.activiti.engine.impl.bpmn.ScriptTaskActivity.execute(ScriptTaskActivity.java:45)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:40)
   at org.activiti.engine.impl.runtime.ExecutionEntity.performOperation(ExecutionEntity.java:489)
   at org.activiti.engine.impl.runtime.ExecutionEntity.start(ExecutionEntity.java:285)
   at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:66)
   at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:29)
   at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:22)
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:37)
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
   at org.activiti.engine.impl.RuntimeServiceImpl.startProcessInstanceByKey(RuntimeServiceImpl.java:49)
   at org.activiti.designer.test.ProcessTest.testProcess(ProcessTest.java:29)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
   at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
   at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
   at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
   at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
   at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
   at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
   at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
   at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
6 REPLIES 6

trademak
Star Contributor
Star Contributor
Hi,

Did you use the Maven pom.xml to get all the necessary dependencies for the project.
So with m2eclipse or mvn eclipse:eclipse from the command line?
The pom.xml includes the groovy dependency so you should get it in that way.

Best regards,

awamser
Champ in-the-making
Champ in-the-making
I do have m2eclipse installed and did the update dependencies but i don't see anywhere in the pom.xml an entry for groovy.

Thanks for your help!

jcosano
Champ in-the-making
Champ in-the-making

duderk
Champ in-the-making
Champ in-the-making
I looked at the posted link and I don't have the asm jar older version in the listed folder yet I get an error

org.activiti.engine.ActivitiException: Can't find scripting engine for 'groovy'
at org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(ScriptingEngines.java:71)
at org.activiti.engine.impl.bpmn.behavior.ScriptTaskActivityBehavior.execute(ScriptTaskActivityBehavior.java:43)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:44)

Do I need to manually add the dependency to pom.xml for groovy? I'm following the Book "Activiti In Action" to run the unit test listed in Chapter 2 Page 17, there was no mention of updating pom so I assumed the dependency will be pulled by activiti but that does not seem to be the case, I used m2eclipse to get the activiti project started and my pom currently is as follows

<artifactId>bpmn-examples</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>bpmn-examples</name>
  <url>http://maven.apache.org</url>
  <properties>
    <activiti-version>5.8</activiti-version>
  </properties> 
  <dependencies>
   <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-engine</artifactId>
      <version>${activiti-version}</version>
   </dependency>
   <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <version>1.2.132</version>
      <scope>test</scope>
   </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.8.1</version>
      <scope>test</scope>
    </dependency>
<dependency>
   <groupId>org.slf4j</groupId>
   <artifactId>slf4j-api</artifactId>
   <version>1.6.4</version>
</dependency>   
  <dependency>
     <groupId>org.slf4j</groupId>
     <artifactId>jul-to-slf4j</artifactId>
     <version>1.6.1</version>
  </dependency>
  </dependencies>
  <repositories>
    <repository>
      <id>Activiti</id>
      <url>http://maven.alfresco.com/nexus/content/repositories/activiti</url>
    </repository>
</repositories>

duderk
Champ in-the-making
Champ in-the-making
fixed it by manually editing pom and adding the following dependency

   <dependency>
      <groupId>org.codehaus.groovy</groupId>
      <artifactId>groovy</artifactId>
      <version>1.7.5</version>
   </dependency> 

Following the book to start the bmpn-examples from scratch had this missing element, this may help others who are following the book and getting started like me Smiley Happy

elf073
Champ in-the-making
Champ in-the-making
I did not see the groovy reference in the book so adding it manually allowed me to run the Example for the BookOrder.