cancel
Showing results for 
Search instead for 
Did you mean: 

activiti:executionListener

elghoul
Champ in-the-making
Champ in-the-making
I am trying to use activiti:executionListener ub a service task.
<activiti:executionListener event="start" class="org.activiti.engine.impl.bpmn.listener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>execution.setVariable("test_var","test");</activiti:string>
          </activiti:field>
          <activiti:field name="language">
            <activiti:string>javascript</activiti:string>
          </activiti:field>
        </activiti:executionListener>

I am getting the following error every time I execute my workflow.

org.activiti.engine.ActivitiIllegalArgumentException: org.activiti.engine.impl.bpmn.listener.ScriptTaskListener doesn't implement interface org.activiti.engine.delegate.ExecutionListener nor interface org.activiti.engine.delegate.JavaDelegate
   at org.activiti.engine.impl.bpmn.helper.ClassDelegate.getExecutionListenerInstance(ClassDelegate.java:84)
   at org.activiti.engine.impl.bpmn.helper.ClassDelegate.notify(ClassDelegate.java:70)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:42)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionCreateScope.execute(AtomicOperationTransitionCreate


2 REPLIES 2

elghoul
Champ in-the-making
Champ in-the-making
Updated my sample

<activiti:executionListener event="start" class="org.activiti.engine.impl.bpmn.listener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>execution.setVariable("test_var","test");</activiti:string>
          </activiti:field>
          <activiti:field name="language">
            <activiti:string>javascript</activiti:string>
          </activiti:field>
        </activiti:executionListener>

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,
Could you create jUnit test please?
http://forums.activiti.org/content/sticky-how-write-unit-test

Regards
Martin
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.