AnsweredAssumed Answered

Simple process with ServiceTask cannot be deployed

Question asked by bram77 on Jan 20, 2011
Latest reply on Jan 20, 2011 by trademak

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

          <activiti:executionListener class="" event="start" />

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,
Bram Rooijmans