/deployment vs /process-definition

790 views
Skip to first unread message

Mehran Ziadloo

unread,
May 6, 2015, 7:40:09 AM5/6/15
to camunda-...@googlegroups.com
I'm a little confused! What's the difference between /deployment and /process-definition ?

AFAIK, in BPMN we have process definitions (.bpmn files) that are deployed to BPM engine and then we can create instances of them. But in REST API we can list deployments and we can list process definitions and they are not the same! Also we can create a new deployment but not a process definition (using REST API).

Could someone please explain this to me?

thorben....@camunda.com

unread,
May 6, 2015, 8:52:46 AM5/6/15
to camunda-...@googlegroups.com
Hi Mehran,

There is a section in the user guide [1] that explains the difference (a little hidden though ;):

The RepositoryService is probably the first service needed when working with the Camunda engine. This service offers operations for managing and manipulating deployments and process definitions. Without going into much detail here, a process definition is a Java counterpart of BPMN 2.0 process. It is a representation of the structure and behavior of each of the steps of a process. A deployment is the unit of packaging within the engine. A deployment can contain multiple BPMN 2.0 xml files and any other resource. The choice of what is included in one deployment is up to the developer. It can range from a single process BPMN 2.0 xml file to a whole package of processes and relevant resources (for example the deployment 'hr-processes' could contain everything related to hr processes). The RepositoryService allows to deploy such packages. Deploying a deployment means it is uploaded to the engine, where all processes are inspected and parsed before being stored in the database. From that point on, the deployment is known to the system and any process included in the deployment can now be started.

I hope that helps.

Cheers,
Thorben

[1] http://docs.camunda.org/latest/guides/user-guide/#process-engine-process-engine-api-services-api

Mehran Ziadloo

unread,
May 6, 2015, 9:04:05 AM5/6/15
to camunda-...@googlegroups.com
Thanks, it's clear to me now but is there anyway to create an instance out of a deployment? I've got an arbitrary list of .bpmn files with no ServiceTask in them and thus packing them in a WAR file adds them nothing. Is there anyway I can upload them and instantiate new flows without deploying any new WAR files? Perhaps I can create process definitions out of uploaded deployments?

Sebastian Menski

unread,
May 8, 2015, 11:20:26 AM5/8/15
to camunda-...@googlegroups.com, mehran...@gmail.com
Hi Mehran,

you can use the REST API /deployment/create and add multiple process to the request body. Isn't that what you want?

Cheers,
Sebastian

Mehran Ziadloo

unread,
May 9, 2015, 1:02:12 AM5/9/15
to camunda-...@googlegroups.com, mehran...@gmail.com
Hi Sebastian,

Yes, that's exactly what I was looking for. What I didn't know was that if some process is not marked as "executable", once uploaded it will only create a "deployment" but if it is "executable" a process definition is created based on it as well. I think it is worth mentioning this in documentation (for /deployment/create).

Thanks,
Mehran
Reply all
Reply to author
Forward
0 new messages