Initiator Process Variable - Flowable Upgrade

Hi @joram @martin.grofcik and others!

I see some of our existing processes do not work after upgrade to flowable which had references to ${initiator} expression in start event.

Below use to work fine in activiti 5.15 - debugging through the code looks like below property is not resolved at all and fails with errors

ex.

[Request processing failed; nested exception is org.flowable.common.engine.api.FlowableException: Error while evaluating expression: ${initiator}] with root cause org.flowable.common.engine.impl.javax.el.PropertyNotWritableException: Cannot write property: initiator
at org.flowable.common.engine.impl.javax.el.CouldNotResolvePropertyELResolver.setValue(CouldNotResolvePropertyELResolver.java:55)

Workaround for the same is to use activiti:initiator=“initiator” - any reason initiator expressions are not resolved in startevent?

Thanks!

How does your xml for the start event looks like? How do you start the process instance?

If you have flowable:initiator=${initiator}, it’s actually trying to resolve the expression to a string variable name. The correct usage is without ${} to indicate a variable name.

Hi @joram

Looks like the XML snippet in previous post got truncated.

This one works
" startEvent id=“sid-4C7C5325-DABF-4ADD-9AA0-FC9B5B6B33D3” activiti:initiator=“initiator”
startEvent"

Below with expression doesn’t work in flowable 6.5 but use to work in activiti5 - and in the code I see it tries to evaluate the below expression and probably its not ready?

" startEvent id=“sid-4C7C5325-DABF-4ADD-9AA0-FC9B5B6B33D3” activiti:initiator="${initiator}"
startEvent"

We start the process instance invoking the org.flowable.rest.service.api.form.FormDataResource#submitForm API which internally starts the process instance using org.flowable.engine.impl.util.ProcessInstanceHelper#startProcessInstance.

Thanks!

Initiator variable value is not initialized at the beginning of the process instance. activiti:initiator is used to name variable to store user who started the process instance.

Ok - some reason expressions in startevent worked fine in activiti 5.15 - anyways thanks we will need to change existing processes to reflect this new change.