Вопрос

Is there a way to programmatically create BPMN 2.0 via a Java API?

I'm aware that I can use a graphical modeling tool or create the BPMN XML by hand but I'm looking for a way to create it dynamically at run-time.

In my case, the BPMN will be executed through jBPM. The jBPM docs say you can use their API to define processes but they don't recommend its use "to shield yourself from internal APIs". It would be great if there were an API that wasn't tied to a specific vendor.

Это было полезно?

Решение

EasyBPMN is one option. There is no "vendor neutral" way in that Java doesn't have a standard API for the concept (unlike, say generic XML manipulation), but this would be an option which would be more portable between workflow engines and modeling tools.

Другие советы

the whole idea about the BPMN2 spec is to be vendor neutral, inside jBPM5 you have the fluent API that in some way allow you to create BPMN2 models that you can export. I'm not sure if it's up-to-date with the latest features that are supported in the XML but I'm pretty sure that you can create your own processes with it. Cheers

BPMN2 model is based on EMF model (org.eclipse.bpmn2 project, model folder, BPMN20.ecore file). You can use EMF Java Api to create, read or modify BPMN2 models.

You can use the library from activiti. here there's a blog post of one of the people behind activiti. I did a compiler that modifies a process based on this and it works.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top