AnsweredAssumed Answered

Exception: ScriptTaskListener doesn't implement interface

Question asked by ungawunga on Apr 11, 2013
Latest reply on Apr 16, 2013 by ungawunga
Alfresco 4.2c Community, Activiti workflow…

This is the exception I'm getting:


Apr 11, 2013 11:15:45 AM org.activiti.engine.impl.interceptor.CommandContext close
SEVERE: Error while closing command context
org.activiti.engine.ActivitiException: org.alfresco.repo.workflow.activiti.tasklistener.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:82)
   at org.activiti.engine.impl.bpmn.helper.ClassDelegate.notify(ClassDelegate.java:68)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:42)



I'll post the whole stacktrace if anyone is interested…

Here's the Activiti workflow:
[img]http://i.imgur.com/qCxmI1J.jpg[/img]

We start off with a task in the 'Receive Task 1'. We call a Javascript webscript to move task to the next state, which calls 'signal' on the WorkFlowPath of the task. The task passes through the first ExclusiveGateway fine.
There is a Java listener on the SequenceFlow between the two ExclusiveGateways. It triggers, and sets a flow variable using DelegateExecution.setVariable(). The Listener ends, and then we see the above exception thrown.

The exception is caught by the javascript webscript's exception handler. I'm guessing that the 'signal' being called on the task when it's in the 'Receive Task 1' is contained within a transaction all the way through the two ExclusiveGateways. But why the heck is it throwing the above exception? Makes no sense to me. None of my code is in the stack trace. My listener on the SequenceFlow between the two ExclusiveGateways executes without error and sets the variable used in the next ExclusiveGateway's decision.

Any clues as to what the problem is here?

I'm getting this error after rewriting my workflow because of this error:
https://forums.alfresco.com/forum/developer-discussions/workflow/trigger-activiti-workflow-task-sitting-receivetask-causes-loop

Hopefully this thread gets a few more responses. Thanks

Outcomes