Expression for business key in a CallActivity: why # and not $?


when I enable the option “Business Key” in a call activity in a BPMN model, the default expression is set to “#{execution.processBusinessKey}” – so that the started process will have the same business key as the calling process.

My question is: wh does the expression use the “#” and not “$”? Does the business key get written back somehow so that the “#” is needed? Or is it just the modeler implementation, and a “$” would also be sufficient?

Thanks for the clarification!

Hi @fml2,

in Camunda there is no difference starting an expression with $ or #, as it is mentioned in the specification where one is used for pre evaluate and the other for post evaluate.

Hope this helps, Ingo

Thank you for the clarification. The difference in the standard semantics of $ and # (rvalue vs lvalue) made me think of the following possible scenario.

Process A starts a process B via a call activity specifying " #{execution.processBusinessKey}" for the business key (lvalue syntax). Process B changes its business key via API. Then it could be possible that the business key is propagated back to A.

From your post I conclude that the back-propagation does not happen. Is this conclusion correct?

@fml2, you can refer the below post for the differences between usage of # vs $ in expressions.

Hi @fml2,

yes. Expressions are only used to read data and not for writing.

Hope this helps, Ingo