cancel
Showing results for 
Search instead for 
Did you mean: 

Service task problem with rc1

frauke
Champ in-the-making
Champ in-the-making
Hello everybody,

after I switched to the new version 5.0-rc1 I get the following error message with a serviceTask:

org.activiti.engine.ActivitiException: 'class', 'type', or 'expression' attribute is mandatory on serviceTask | de/vps/act/process/ButtonTestProcess3.bpmn20.xml | line 34 | column 69
But the BPMN definition did not change and it was ok with beta2.
Here is the definition:

        <serviceTask id="t3" name="T3" activiti:class="de.vps.act.process.DummyActivitiTask" />
Do you have any idea what the problem could be?

Frauke
7 REPLIES 7

frederikherema1
Star Contributor
Star Contributor
No need to use the activiti-namespace prefix on attributes anymore. Just use this:

<serviceTask id="t3" name="T3" class="de.vps.act.process.DummyActivitiTask" />


Woops, was too fast. This comment only applies for custom activiti-elements

frederikherema1
Star Contributor
Star Contributor
The custom BPMN extentions-namespace uri has switched from "http://activiti.org/bpmn-extensions" to "http://activiti.org/bpmn"

Be sure to use this in your root element:

<definitions
  xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
  xmlns:activiti="http://activiti.org/bpmn"
  targetNamespace="Examples">

frauke
Champ in-the-making
Champ in-the-making
ok, that works.
I hope you don't do that with every new release, though  Smiley Wink

frederikherema1
Star Contributor
Star Contributor
We won't I promise Smiley Wink

Since this was the RC1-release, this was the right time to make sure we are pleased with how everything is named. After the GA we want to keep all this core-stuff as stable as possible.

asbachb
Champ in-the-making
Champ in-the-making
I'm afraid that i am facing the same problem - but can not solve it with the tips in this thread:

My XML:

<?xml version="1.0" encoding="UTF-8"?>
<definitions id="definitions"
  xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
  xmlns:activiti="http://activiti.org/bpmn"
  targetNamespace="Examples">
<process id="helloworld" name="helloworld">
  <startEvent id="startevent1" name="Start"></startEvent>
  <serviceTask id="servicetask1" name="Service Task"
   activiti:class="de.asbach.alldeakz.bpmn.task.HelloServiceTask"></serviceTask>
  <sequenceFlow id="flow1" name="" sourceRef="startevent1"
   targetRef="servicetask1"></sequenceFlow>
  <sequenceFlow id="flow2" name="" sourceRef="servicetask1"
   targetRef="endevent1"></sequenceFlow>
  <endEvent id="endevent1" name="End"></endEvent>
</process>
</definitions>

Inovking with:
public void testBPMNProcess() throws Exception {
  ProcessEngine processEngine = new ProcessEngineBuilder()
  .configureFromPropertiesResource("activiti.properties")
  .buildProcessEngine();

  RepositoryService reposity = processEngine.getRepositoryService();
  reposity
   .createDeployment()
   //.addClasspathResource("example.xml")
   .addClasspathResource("step_by_step.bpmn20.xml")
   .deploy();
 
  ProcessInstance pi = processEngine
   .getRuntimeService()
   .startProcessInstanceByKey("helloworld");

But get the error:
org.activiti.engine.ActivitiException: 'class' or 'expr' attribute is mandatory on serviceTask

May you can give me a hint.

jbarrez
Star Contributor
Star Contributor
Which version of Activiti are you using?

The error seems to be the output of an exception from a previous release, while the namespace declaration is the latest one.

asbachb
Champ in-the-making
Champ in-the-making
Thanks for your suggestions. I updated the designer but forget to update the version in the pom file. Sorry for that.
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.