cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Java Service Task

ryanberg1
Champ in-the-making
Champ in-the-making
I have a java service task defined as below (based on the User Guide):

<serviceTask id="javaService2" name="Second Java Service" activiti:class="com.ryanberg.TestActivityBehavior"/>

When I try to deploy this process, I receive an exception saying:

org.activiti.ActivitiException: couldn't parse InputStream: The prefix "activiti" for attribute "activiti:class" associated with an element type "serviceTask" is not bound.

Is this a bug, or am I not specifying the correct attribute with my fully qualified class name?

Thank you.
-Ryan
2 REPLIES 2

ryanberg1
Champ in-the-making
Champ in-the-making
By doing a little digging through your parse code. I was able to determine that I needed to include this namespace in my <definitions> tag:

xmlns:activiti="http://activiti.org/bpmn-extensions"

The tag now looks like this:

<definitions id="definitions"
             xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
             xmlns:activiti="http://activiti.org/bpmn-extensions"
             targetNamespace="http://www.activiti.org/bpmn2.0">

.. I am now able to deploy this process.

jbarrez
Star Contributor
Star Contributor
You are right, this is not covered in the userguide. Thanks for finding this!