Check if a property is there?

Ok, this should be easy for the developers to answer.

We want to check to see if a property is in a payload i.e

${key != null}

This is what we get back

“message”: “Internal server error”,
“exception”: “Unknown property used in expression: ${key != null}”

How can one actually check if a property exist?

In bpmn, you can add ${execution/task.getVariable(‘key’) != null} (task when using it in a task listener). In cmmn, you’d do ${caseInstance.getVariable(‘key’) != null}.

1 Like