Previous updated/old value is not available in Flowable event listener

Hi Team,

I’m working as part of audit log functionality in my application, I need both previous and updated/old value from the event listener hook using flowable. Currently I’m getting updated value only. Is it possible to get old value from this?

public void onEvent(FlowableEvent event) {

    if (event instanceof FlowableVariableEvent) {
        if (event.getType() == FlowableEngineEventType.VARIABLE_UPDATED) {
            String processDefinitionId = ((FlowableVariableEvent) event).getProcessDefinitionId();
            String variableName = ((FlowableVariableEvent) event).getVariableName();
            Object value = ((FlowableVariableEvent) event).getVariableValue();
            String instanceId = ((FlowableVariableEvent) event).getProcessInstanceId();
        }
    }

}

Kindly respond to query. This is very urgent to us. Otherwise we need to take different design approach.

Hey @maheshus007,

Currently, the FlowableVariableEvent only has the new value of the variable and not the old one. However, we are open to reviewing a PR that would add the old value to the event as well.

Cheers,
Filip

Thanks for the reply