Expression for assignee with result "null" fails

Hi all,

I have a User Task (on Camunda 8) which has the assignee set via an expression based on a process variable, i.e. “= assignee”.

This works perfectly except if the variable “assignee” has the value null. I was expecting no assignee to be set in this case. However, I get
Expected result of the expression 'assignee' to be 'STRING', but was 'NULL'.

The documentation does not handle this case: User tasks | Camunda Platform 8

Any suggestions?

Kind regards

Hi @tobiasschaefer,

In Camunda 7, this can be accomplished using a create task listener but In Camunda 8 there are no listeners so this solution doesn’t apply.

But I personally vote for assignee being nullable in both versions

1 Like

Thanks @hassang for your opinion.

So we tend to agree that this is an unexpected behaviour which should be improved: the assignee should be able to handle null values.

I checked the Zeebe issues but didn’t find anything related.

Can someone from the Zeebe Team please confirm that this behaviour should be fixed. I could create an issue (and might have a look to fix it).


We’ve run into this issue again.

@Philipp_Ossler: should I create an issue?

Hi, @tobiasschaefer, You can take a look this,use If conditions.

Control flow | Camunda Platform 8 Docs Control flow | Camunda Platform 8 Docs

Hi @skayliu ,

thanks. However, I’m not sure how this is going to help.

Of course I can check for null and return a hard-coded value (if assignee then assignee else "my-default"), but if I want “null” as fallback (to not have the task assigned) it will still fail: if assignee then assignee else null.

Am I missing the obvious?

i run in to same problem. Is there some solution after year ?

Hi @Vaclav_Konecny ,

no - I don’t have a solution and IMHO this is a bug.