cancel
Showing results for 
Search instead for 
Did you mean: 

Simple process with ServiceTask cannot be deployed

bram77
Champ in-the-making
Champ in-the-making
Hi,

I'm using Activiti 5.1, running on MacOS, Java 6, and using the Activity Modeler in Safari. Activiti itself and all tooling looks very interesting, but I have some issues I can use some help with:

1. I have created a very simple process in the Modeler consisting of a start event, a service task and an end event. If I save it and deploy this process in Activity Probe, it says

"One of the attributes 'class', 'delegateExpression', 'type', 'operation', or 'expression' is mandatory on serviceTask."

Is there a way in the Modeler to add this attribute? Or do I have to do that manually by editing the mytest.bpmn20.xml?

2. Each time I save the process, the process ID changes. In my Java code, I try to start the process using this ID:

ProcessInstance process = processEngine.getRuntimeService().startProcessInstanceByKey("sid-d8cb7d90-50af-41ba-bcc8-5a58179320e8");

But each time I save the process in the Modeler, its ID changes, forcing me to update the Java code each time. Can I set the process ID to a fixed, human-understandable value such as "myTestProcess"?

3. I want to add ExecutionListeners using


<extensionElements>
          <activiti:executionListener class="com.org.ProcessExecutionListener" event="start" />
</extensionElements>

Should I add these manually to the bpmn20.xml or is there a way in the Modeler to add these?

It seems to me the Modeler is meant to create and design a process only once. The process xml should then be fine-tuned and get activiti:executionisteners, a fixed Process ID and other activiti:expression attributes added. Am I correct? Or can I use the Modeler for round-trip editing; changing pieces of the bpmn20.xml and then loading it again in the Modeler?

Thanks in advance for any feedback,
regards,
Bram Rooijmans
4 REPLIES 4

tombaeyens
Champ in-the-making
Champ in-the-making
But each time I save the process in the Modeler, its ID changes

would be good if signavio connaisseurs could confirm if this is expected behavior

trademak
Star Contributor
Star Contributor
Hi Bram,

Is there a reason you especially want to use the Modeler instead of the Designer.
From your description it looks like you are already developing Java code to run the process definition. So the Designer would be a good match for that kind of development.
And also you can configure a Java class with your service task and define a process ID yourself.
The execution listener is something we are working on, and probably will be available in the next release.
Also available in the next release of the Designer is a functionality to import models from the Modeler to the Designer.
So, if you want to execute your processes in your own Java application I would recommend using the Designer instead of the Modeler.

Best regards,

bram77
Champ in-the-making
Champ in-the-making
Hi Tijs,

We had a hard time getting the Designer Eclipse plugin to work in Eclipse. Apparently, Java6 is required for this plugin, as I read here: http://forums.activiti.org/en/viewtopic.php?f=8&t=677. Running Eclipse on Java6 on MacOS used to be a problem too (http://blog.kischuk.com/2008/05/08/running-eclipse-on-macbooks-with-java-6/), but the 64 bit version of Eclipse Helios runs fine on Java6.

Anyway, I tried the Designer plugin and found out that, as you mention, there's no way (yet) to configure execution listeners. You'll have to do that by manually editing the xml. Saving the model again overwrites these changes, so there's no way to perform round-trip-editing.

Besides, the Designer palette seems to offer fewer BPMN components than the Modeler and I'm not sure yet this (sub)set will be enough to model our workflows.

Thanks for you reply,
Bram

trademak
Star Contributor
Star Contributor
Hi Bram,

If you are using an updated os x snow leopard Java 6 is installed by default so that should not be a problem.
You are right about the execution listeners and the overwriting. We are currently looking into this from two sides. I'm adding the execution listener configuration. This will be in the next release for sure. We are also trying to support round-trip in the designer and I hope this will be ready for the next release.
We chose to implement fewer BPMN components, because we stick to what the Activiti Engine supports. We currently are missing the boundary timer event, which is supported in the Activiti Engine, but that's also on our list. Let me know if you run into limitations of the Designer for functionality you really need. We can always prioritize our work based on your feedback.

Best regards,