Camunda Spring shared container is not working


#1

It seems that the Spring framework examples for shared container is not working as expected.

ntext: no processes deployed with key ‘loanApproval’: processDefinition is null
org.camunda.bpm.engine.exception.NullValueException: no processes deployed with key ‘loanApproval’: processDefinition is null

I have confirmed that the loanApproval.bpmn process key are correct (I’ve updated it with “loanApproval”)

loanApproval.bpmn ::
<bpmn2:process id=“loanApproval” name=“loanApproval”


#2

Hi @Brandon,

which example are we talking about exactly?

Cheers,
Askar


#3

https://docs.camunda.org/get-started/spring/shared-process-engine/#alternative-configuration-using-shared-process-engine

I have updated the process key to “loadApproval” same as Started class “runtimeService.startProcessInstanceByKey(“loanApproval”);”

I am running vanilla tomcat 7.6 from camunda.


#4

Hi @Brandon,

is loadApproval a typo?

Cheers,
Askar


#5

Hi

I have double check in the code, there are no typo:

Starter.class - public void afterPropertiesSet()
runtimeService.startProcessInstanceByKey(“loanApproval”);

loanApproval.bpmn:
<bpmn2:process id=“loanApproval” name=“loanApproval” isExecutable=“true”>

It still not deploying the process definition


#6

HI @Brandon,

could you attach your process definition file here please.

Cheers,
Askar


#7

loanApproval.bpmn (2.9 KB)


#9

hi @aakhmerov

I did not generate a business key. What I did is download the spring framework sample (shared container) and update the loanApproval.bpmn and run it in vanilla tomcat.

The sample is here:camunda-get-started-spring-Bonus.zip
https://github.com/camunda/camunda-get-started-spring/archive/Bonus.zip


#10

Hi @Brandon,

yes I’ve realized that, and deleted my question already :slight_smile:
I can start your process definition fine in a unit test. Could you please may be publish your project on github? Looks like your process definition is not getting deployed for some reason.

Cheers,
Askar


#11

hi @aakhmerov


#12

I tried running the embedded application it is OK running fine. But as soon as I modify to use shared runtime, it hit the same problem. process definition is null


#13

Hi @Brandon,

I think you should delete processes.xml, since you declare SpringProcessApplication in your context. You have to decide for one of those, not use both of them.

Cheers,
Askar


#14

hi @aakhmerov

thanks for the pointer. i guess the doc site need to be updated.


#15

Yes @Brandon,

thanks for pointing out, I have created a ticket for it CAM-7570.

Cheers,
Askar


#16

hi @aakhmerov,

Just tried out your suggestion, deleted the processes.xml but i still have the same issue.

init method failed; nested exception is org.camunda.bpm.engine.exception.NullValueException: no processes deployed with key ‘loanApproval’: processDefinition is null


#17

Hey @Brandon,

could you try to extend you implement your own process application and start process instance there instead of starter bean?

Here is an example https://github.com/camunda/camunda-bpm-examples/blob/master/deployment/spring-servlet-pa-jboss/src/main/java/org/camunda/bpm/example/spring/servlet/pa/SpringServletProcessApplication.java

Cheers,
Askar.


Spring MVC for external forms
#18

Hello,

Today,i have tried to integrate the spring framework with camunda follwing the camunda docs

ended up the same error as follows,
org.camunda.bpm.engine.exception.NullValueException: no processes deployed with key ‘loanApproval’: processDefinition is null

could you please help?


#20

There is a general misunderstanding on the tutorial side. If you are using camunda modeler to design model, you need to type processId instead of bpmn file name here. That’s why most people confusing this.

@EventListener
private void processPostDeploy(PostDeployEvent event) {
    runtimeService.startProcessInstanceByKey(**"Process_0ot7fe4"**)
}

#21

Was anyone able to resolve this issue? I’m also receiving — no deployed process definition found with id ‘loanApproval’: processDefinition is null. I followed https://github.com/camunda/camunda-get-started-spring

Thanks.