Process Definition Deployment without JavaCode

273 views
Skip to first unread message

Iryna Feuerstein

unread,
Jun 5, 2015, 10:45:44 AM6/5/15
to camunda-...@googlegroups.com
Hi dear Camunda-Devs,

I would like to try out the following:

- My Process Definition consists of 2 script tasks and a user task between them (it's pretty simple).
- The start node and the user task nodes should be triggered via rest call
- I don't want to implement any functionality in java code (the sript tasks are implemented in javascript)
- I use camunda-tomcat-package

So my project structure looks like:

- war
  |
  --- META-INF
  --- WEB-INF
      |
      --- classes
          |
          --- META-INF
              |
              --- process.xml
          --- my-process-definition.bpmn


The war-file gets deployed on the tomcat, but not the process definition.

Dou I have to define a java class with @ProcessApplication to get my process definition deployed on the process engine? Can I somehow avoid defining java classes at all?

Any hints?

Thx,
Iryna.

Daniel Meyer

unread,
Jun 5, 2015, 11:21:50 AM6/5/15
to camunda-...@googlegroups.com
Unfortunatley you need a java class with @ProcessApplication if you want
to deploy a process application.

What you could do is deploy the process using api:
http://docs.camunda.org/7.3/api-references/rest/#deployment-post-deployment

Regards,
Daniel
> --
> You received this message because you are subscribed to the Google
> Groups "camunda BPM users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to camunda-bpm-us...@googlegroups.com
> <mailto:camunda-bpm-us...@googlegroups.com>.
> To post to this group, send email to camunda-...@googlegroups.com
> <mailto:camunda-...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/camunda-bpm-users/46f2f0ca-0981-4828-b477-2b8bdb0bf6a4%40googlegroups.com
> <https://groups.google.com/d/msgid/camunda-bpm-users/46f2f0ca-0981-4828-b477-2b8bdb0bf6a4%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Iryna Feuerstein

unread,
Jun 5, 2015, 1:37:33 PM6/5/15
to camunda-...@googlegroups.com
Hallo Daniel,

using the rest-api for deployment could be a good solution for me. Unfortunately I can't get rid of it. May be you could give me a hint.

I'm using the Postman rest client to create and send my post request. That's what postman is generating for me:

POST /engine-rest/deployment/create HTTP/1.1
Host: localhost:8080
Content-Type: application/xml
Cache-Control: no-cache

----WebKitFormBoundaryE19zNvXGzXaLvS5C
Content-Disposition: form-data; name="deployment-name"

test
-bestellprozess
----WebKitFormBoundaryE19zNvXGzXaLvS5C
Content-Disposition: form-data; name="data"; filename="test-bestellprozess.bpmn"
Content-Type:


----WebKitFormBoundaryE19zNvXGzXaLvS5C

I get the following response:

  1. Status Code: 405 Method Not Allowed
  2. Allow: HEAD, DELETE, GET, OPTIONS
  3. Content-Length: 0
  4. Date: Fri, 05 Jun 2015 17:33:02 GMT
  5. Server: Apache-Coyote/1.1
Do I have to configure camunda/tomcat to allow a post request on deployment/create?

Thank you for your help!

Greetings,
Iryna.

Valentin Vago

unread,
Jun 8, 2015, 5:02:27 AM6/8/15
to camunda-...@googlegroups.com, iryna....@gmail.com
Hi,

have you tried to use in your headers?
Accept: application/hal+json, application/json; q=0.5

All the best,
Valentin

Iryna Feuerstein

unread,
Jun 8, 2015, 8:56:48 AM6/8/15
to camunda-...@googlegroups.com, iryna....@gmail.com
Hello Valentin,

I've pasted this line in my header. Unfortunately it didn't help.

Valentin Vago

unread,
Jun 9, 2015, 1:24:22 AM6/9/15
to camunda-...@googlegroups.com, iryna....@gmail.com
Hi,

I searched a bit and was able to deploy a process with postman. The setup is the following:

POST /engine-rest/engine/default/deployment/create HTTP/1.1
Host: localhost:8080
Cache-Control: no-cache
Postman-Token: f33244a6-263c-e8ab-c5fe-c7262ccc3e72
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="deployment-name"

dep
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="data"; filename="fox-invoice_generated_forms.bpmn"
Content-Type:


----WebKitFormBoundary7MA4YWxkTrZu0gW
And then I got the expected response:

{
   "links": [
       {
           "method": "GET",
           "rel": "self"
       }
   ],
   "id": "6cab3230-0e66-11e5-8b8a-a44e31a96f6c",
   "name": "dep",
   "deploymentTime": "2015-06-09T07:14:37"
}

I used the distro available here:
http://camunda.org/release/camunda-bpm/tomcat/7.3/camunda-bpm-tomcat-7.3.0.tar.gz

I don't know what kind of setup you have.. it's maybe related.
So I changed the endpoint to reflect yours (/engine-rest/deployment/create) and even that worked.

Have a nice day,
Valentin
Reply all
Reply to author
Forward
0 new messages