Extension properties and deployment cache

I’m researching the question of accessing a Task’s extension properties (this is a second topic, but not quite… plus the old one didn’t get any response… sooooo).

I was able to make a direct call from a custom endpoint, utilizing

	private final RepositoryService repositoryService;
	private final TaskService taskService;
	private final SpringProcessEngineConfiguration processEngineConfiguration;

From where I went the road of
processId → repositoryService → process definition entity
processId → taskService → task entity

and from there I looked up how to get to extension properties.
I went for the processEngineConfiguration.getDeploymentCache, from where I got BpmnModelInstance → BpmnElementModelInstance → ExtensionProperties and so on.

After that some sunlight shed through the window and I said “hurrah!”. But, before committing, I restarted the app and tried to make the first call to get those properties.

And this is where I am now:

	at org.camunda.bpm.engine.impl.persistence.deploy.cache.ProcessDefinitionCache.getManager(ProcessDefinitionCache.java:37)
	at org.camunda.bpm.engine.impl.persistence.deploy.cache.ResourceDefinitionCache.findDeployedDefinitionById(ResourceDefinitionCache.java:49)
	at org.camunda.bpm.engine.impl.persistence.deploy.cache.ModelInstanceCache.findBpmnModelInstanceForDefinition(ModelInstanceCache.java:58)
	at org.camunda.bpm.engine.impl.persistence.deploy.cache.DeploymentCache.findBpmnModelInstanceForProcessDefinition(DeploymentCache.java:121)

Of course, if I deploy the bpmn file it starts to function again. But that’s not an option.

I have a “last resort” of doing a Listener for bpmn file deployment and from there store that data manually… but this is something I wish I could avoid (I feel like I’m trying to going outdoors to make a fire in order to heat up water for my tea… just because I don’t know how to use an electric water heater).

Some help, please!


To make things more interesting… I restart the app, make an api call to get those properties.
Get the error.

Open Camunda’s tasklist (simply the /camunda/app/tasklist) and do nothing. Make the api call again - mmphh, it works.

It looks to be that I’m missing cache creation step, which is triggered during tasklist call.