BPMN not deployed in springboot application

Hello,

I have created a BPMN process and started my springboot application.Then I try to trigger the process by calling the Rest API
localhost:8090/rest/process-definition/key/processName/start
Then I get following error

After I pushed changes to remote branch one of my colleague started the spring boot application and tried to start the process(no changes made in the branch) then it works…He was able to start the process

What could be the possible reason here it dont work only in my machine ?

{
“type”: “RestException”,
“message”: “No matching process definition with key: processName and no tenant-id”
}

Thanks,

hi @sajeeshmurali
Would you mind sharing you BPMN file and also {key} you’re using in POST /process-definition/key/{key}/start call?

localhost:8090/rest/process-definition/key/outgoingReimbursementCaseworkAltinnClaimSetProcess/start

if i try to get localhost:8090/rest/process-definition

it returns empty list

Spring boot application started I had two process definitions in resources and I dont find it in get Rest API

It could be that you did not deploy the process itself to Camunda.
image
Look for the “Deploy current diagram” button in the bottom left corner of Camunda Modeler.

I am running springboot application in vagrant/linux machine but created BPMN in windows machine.
Then I just copied BPMN file to my intellij resource folder…

In case of springboot is it required to deploy separately ? my understanding is that when the springboot application starts it automatically picks the file from resources folder and deploys to camunda
otherwise this would have not run for my colleague

do you use the @EnableProcessApplication annotation in your application?

yes…we do…I noticed that there was no deployments even after starting the application after logging into camunda endpoint…not sure why it did not deploy it automatically
so deployed manually…then get endpoint returns the process definition but when I try to start the process still get above error

get endpoint returned
[
{
“id”: “d77acd55-b034-11ec-9369-02cac18d6bcd”,
“key”: “outgoingReimbursementCaseworkAltinnClaimSetProcess”,
“category”: “http://bpmn.io/schema/bpmn”,
“description”: null,
“name”: “Outgoing ReimbursementCasework AltinnClaimSetProcess”,
“version”: 1,
“resource”: “OutgoingReimbursementCaseworkAltinnClaimSetProcess.bpmn”,
“deploymentId”: “d756f1a2-b034-11ec-9369-02cac18d6bcd”,
“diagram”: null,
“suspended”: false,
“tenantId”: “tenant”,
“versionTag”: null,
“historyTimeToLive”: null,
“startableInTasklist”: true
}
]

then tried to start

localhost:8090/rest/process-definition/key/outgoingReimbursementCaseworkAltinnClaimSetProcess/start

but got

{
“type”: “RestException”,
“message”: “No matching process definition with key: outgoingReimbursementCaseworkAltinnClaimSetProcess and no tenant-id”
}

@EnableProcessApplication annotation disables the SpringProcessEngineConfiguration auto-deploy feature and instead uses the required META-INF/processes.xml as an indicator for resource scanning. This also allows all processes.xml configuration features described here: The processes.xml Deployment Descriptor

https://docs.camunda.org/javadoc/camunda-bpm-platform/7.16/org/camunda/bpm/spring/boot/starter/annotation/EnableProcessApplication.html

1 Like

Ok.Thanks …but can u let me know why it still do not work after deploying manually via camunda ui…after deployment

get endpoint returned
[
{
“id”: “d77acd55-b034-11ec-9369-02cac18d6bcd”,
“key”: “outgoingReimbursementCaseworkAltinnClaimSetProcess”,
“category”: “http://bpmn.io/schema/bpmn”,
“description”: null,
“name”: “Outgoing ReimbursementCasework AltinnClaimSetProcess”,
“version”: 1,
“resource”: “OutgoingReimbursementCaseworkAltinnClaimSetProcess.bpmn”,
“deploymentId”: “d756f1a2-b034-11ec-9369-02cac18d6bcd”,
“diagram”: null,
“suspended”: false,
“tenantId”: “tenant”,
“versionTag”: null,
“historyTimeToLive”: null,
“startableInTasklist”: true
}
]

then tried to start

localhost:8090/rest/process-definition/key/outgoingReimbursementCaseworkAltinnClaimSetProcess/start

but got

{
“type”: “RestException”,
“message”: “No matching process definition with key: outgoingReimbursementCaseworkAltinnClaimSetProcess and no tenant-id”
}

What if you try it like?

POST /process-definition/key/outgoingReimbursementCaseworkAltinnClaimSetProcess/tenant-id/tenant/start

Thanks…It worked using above URL…but one more question…When I initially created BPMN in modeler if I remember I have not provided any tenant id…

This was manually deployed and camunda asked for tenant id during deployment…where can I see tenant id in modeler? if there is no tenant id then can use below URL right ?
localhost:8090/rest/process-definition/key/outgoingReimbursementCaseworkAltinnClaimSetProcess/start

You can see a tenant id in Modeler when you actually deploy it, after pressing the deploy button

thanks for your help…But regarding why it dont getting deployed automatically when springboot application starts should we try to remove @EnableProcessApplication and try ? We have other applications which has this annoation @EnableProcessApplication but still it is getting auto deployed

I would suggest you to read a few links like EnableProcessApplication and processes.xml
Usage of EnableProcessApplication annotation does not meat that you can’t auto deploy but it means you need to properly configure it with “processes.xml”.

Please mark one of the answers as a Solution so the comunity knows that issue was solved.

Thanks…will check :slight_smile: