AnsweredAssumed Answered

Generating process diagram from Java code

Question asked by alexbt on Jan 1, 2012
Latest reply on Jan 2, 2012 by tiesebarrell
Hi folks,

My question is about generating Activiti BPMN 2.0 XML.
Based on user interaction with our UI we need:
1) Create in-memory representation of a BPMN process,
2) Out of those Java objects generate an Activiti BPMN 2.0 xml that will/can be imported into Activiti Designer for  further enhancements.

The generated process will be a sequence of simple tasks, so there will be no forks/joins, splits, etc. (at least at the first stage of this module development)
E.g. startState->taskA->taskB->taskC->taskD->endState

I've looked at classes in org.activiti.engine.impl.pvm.process package and it seems I understand how to create such an in-memory process representation, but I'd prefer to get some direction from you, guys, to be on the safe side.
Moreover, I didn't find a way to generate XML representation out of Java objects.
Can you please suggest the way to make it?
It would be even better if I could add graphics related data (x and y points of a task square) to the generated XML, so that when importing it into the Activiti Designer I'd get a more or less good looking process graphic representation and not a mess of all tasks in the same place.

Thanks in advance,
Alex

Outcomes