Handling PropertyNotFoundException in Camunda

My issue is that i am getting org.camunda.bpm.engine.ScriptEvaluationException and org.camunda.bpm.engine.impl.javax.el.PropertyNotFoundException.

This is in a scenario when a property and its value is absent in the context/session intentionally and that the property is not initialised in the workflow.

So when the property is being sent like #{xyz} to a service task and when it is absent, customized camunda modeler is throwing this exception.

Possible workarounds as per my research is by adding a timer to this service task, but can someone please let me know if there is an actual solution or how to handle this?

Eloborating the problem :

I have a workflow in which I call a service task/service operation, which is essentially an XML file with components and models. My workflow calls this service operation and has two paths: success and error. The error path is configured to handle failure scenarios, including if the service operation takes more than n minutes to complete.

Now, when I run a scenario, this workflow gets stuck inside the service operation because I am manually deleting a row in the database, which is a property inside the working context(variable). The service operation takes a property as input, which the workflow should send from its context, and this is the property I mentioned earlier as #{xyz}. So when this property is not found, Camunda throws the error mentioned above. However, for some reason, the workflow is not handling the failure/error path that we have configured to exit after n minutes.

If we initialize the variable/property before the service operation executes, the flow works like a charm. However, my problem is that I need to find a way to handle this PropertyNotFoundException so that no matter which property is absent in the context, the flow exits gracefully.

To summarize, the workflow is throwing a Camunda PropertyNotFoundException even before calling the service operation, as it is unable to find the property in its context. I need to find a way to handle this exception. Is there a way in Camunda 7 to handle this?

The workaround I tried by adding a timer boundary event to this service operation didn’t work. As I mentioned, the flow is not reaching the failure path and gets stuck even before reaching the service operation, indefinitely.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.