plexiti / camunda-grails-plugin

Integrates Camunda BPM with the Grails framework.
http://grails.org/plugin/camunda
Apache License 2.0
18 stars 8 forks source link

Auto reload/redeploy when *.bpmn changes in grails-app/processes directory #21

Closed behrad closed 10 years ago

behrad commented 10 years ago

Thank you for your nice work, two quick questions:

1) I couldn't find out how to configure camunda cockpit, etc. to run in my grails app 2) How can we hot reload ProcessEngine/RuntimeService when .bpmn changes in processes directory.

martinschimak commented 10 years ago

Hi @behrad,

1) The plugin just works with an embedded engine, so there is no easy way to configure cockpit to work right inside your grails app. One possibility would be to do it with a customised overlay, the probably better possibility nowadays is to install your grails app side by side with a camunda standalone webapp http://docs.camunda.org/latest/guides/installation-guide/standalone/ and point it to the same database - I haven't tried that myself so far.

2) Interesting question, currently not supported. I am not aware whether camunda has done something in that area, so maybe you want to ask the question as a general camunda related question in their user forum, too. Can you describe your use case in a bit more detail?

behrad commented 10 years ago

Thank you @martinschimak My main concern was fastening process development/debug time, however we also would be able to refine/define new process flows without restarts in production.

martinschimak commented 10 years ago

I allowed myself to change the title of this request.

martinschimak commented 10 years ago

The plugin should automatically reload and redeploy '.bpmn' process definitions placed beneath 'grails-app/processes'. When changing the process definition while one is running the grails application with 'run-app', it should be redeployed to the process engine.

One should be able to turn this feature on/off explicitely by Config.groovy configuration:

camunda {
  deployment.autoreload = true // (or false)
}

The autoreload feature is probably best by default enabled for grails 'dev' and 'test' environments. For all other environments it should by default be disabled.

martinschimak commented 10 years ago

@behrad I just pushed an initial implementation of this feature. It would be very helpful if you could try whether that works for you and/or give any comments. You would need to configure a custom repository like

repositories {
    mavenRepo "http://repository-plexiti-foss.forge.cloudbees.com/snapshot/"
}

and should then be able to use the latest and greatest 0.3.0-SNAPSHOT

plugins {
    compile ':camunda:0.3.0-SNAPSHOT'
}

Many greetings, Martin.

behrad commented 10 years ago

@martinschimak Thank you, I'm gonna test it.