-
Bug Report
-
Resolution: Unresolved
-
L3 - Default
-
None
-
7.17.0
-
None
Environment (Required on creation):
Camunda 7.17.0, all distros
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):
Calling `getFormService().getStartFormKey(processDefinitionId)` for a process definition with multiple start events leads to (on JDK 17):
Caused by: java.lang.NullPointerException: Cannot invoke "org.camunda.bpm.engine.impl.form.FormDefinition.getFormKey()" because "formDefinition" is null at org.camunda.bpm.engine.impl.cmd.GetFormKeyCmd.execute(GetFormKeyCmd.java:84) at org.camunda.bpm.engine.impl.cmd.GetFormKeyCmd.execute(GetFormKeyCmd.java:40) at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28) at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110) at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70) at org.camunda.bpm.engine.impl.interceptor.CommandCounterInterceptor.execute(CommandCounterInterceptor.java:35) at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33) at org.camunda.bpm.engine.impl.FormServiceImpl.getStartFormKey(FormServiceImpl.java:99) ... user code
Steps to reproduce (Required on creation):
- Deploy a process definition with multiple start events
- Call getFormService().getStartFormKey(processDefinitionId) for that process definition
Observed Behavior (Required on creation):
NPE as described above
Expected behavior (Required on creation):
A meaningful NullValueException as thrown in GetStartFormCmd for example in the same setting
Root Cause (Required on prioritization):
- In GetFormKeyCmd lines 83 and 84, we expect there always to be a FormDefinition, which is not the case in 7.17.0 given the preconditions above.
FormDefinition formDefinition = processDefinition.getStartFormDefinition(); formKeyExpression = formDefinition.getFormKey();
Solution Ideas (Optional):
- Throw a NullValueException stating the absence of a form definition for the start event
Hints (optional):
- The "get form key" behavior changed with regards to 7.16, where you would receive "null" instead of an NPE
- Other form data related methods/commands throw NullValueExceptions in such setups
This is the controller panel for Smart Panels app
[CAM-14533] NullPointerException calling getStartFormKey for multi-start event processes
Assignee | New: Tobias Metzke-Bernstein [ tobias.metzke ] |
Link | New: This issue is related to CAMTEAM-233 [ CAMTEAM-233 ] |
Summary | Original: NullPointerException calling getStartFormKey | New: NullPointerException calling getStartFormKey for multi-start event processes |
Hey boris,
thanks for creating this ticket, looking into it now.
Best,
Tobias