Deploy BPMN Files with JAVA API fails

Hey Guys,

i’m working with camunda grails plugin and want to deploy bpmn files without restart my web application. Under development conditions (means: with IntelliJ) all bpmn files within classpath will be autodeployed correctly but not when its executed as WAR on tomcat.

I found out that i can deploy ressources manually with:

    Bpmn.validateModel(modelInstance)
    Bpmn.writeModelToFile(file, modelInstance)
       //name is processid
    repositoryService.createDeployment().name("DaguDeployment").addModelInstance(name,modelInstance).deploy()

It runs without any errors and camunda insert a new entry in ‘act_re_deployment’ but no entry in ‘act_re_procdef’. Result is, i can’t get the updated process definition.

Beleg_Workflow_201607250335.bpmn (6.4 KB)

Can u give me a hint why it fails?

Thank you for support
Uwe

Hi Uwe,

the name argument of the addModelInstance call must end on .bpmn or .bpmn20.xml or else the BPMN deployer won’t pick it up.

Cheers,
Thorben

Thank your very much :slight_smile:
I tried different stuff but not that. Works fine for me.

Cheers,
Uwe