Execution variable becomes null after Intermediate Signal Catching Event

Hi All,

I’m Working on a flowable solution where it has a intermediate signal catching event. Process resumes after signaling event received.
There is an object named obj which is not serializable and it’s been wrapped in a serializable object and being saved in the execution.

    @Getter
    @AllArgsConstructor
    public class TestObj implements Serializable {
        private transient Object obj;
    }
execution.setVariable("objVar", new TestObj(nonSerializeObject));

Value saved to execution could be accessed by,

execution.getVariable("objVar");

When the flowable process pauses from the signal catching event and then it resumes after the signaling event, even though the saved variable could be accessed by,

execution.getVariable("objVar");

Inside the TestObj private transient Object obj; is null. This is only when process is resumed after the signaling event. Before the signaling event value is not null and returns the value as expected.
What is the impact on resuming the flow has to the execution variables. Is this an expected behavior or is there any workaround to avoid this, since it’s mandatory to resume the flow using a signal catching event as per the design.

Hey @mchathuranga4,

There is no need to cross post here and in the issue tracker. You also created flowable/flowable-engine#2548.

My answer from there is

If by pausing and resuming you mean between different wait states / transactions then it is clear why this doesn’t work. Flowable persists the variable in the Database. When a variable is Serializable then we store its bytes in the DB. When the process resumes we read the bytes from the DB and construct TestObj . Since your obj field is transient it is not in the bytes. Thus leading to it be null when the object is deserialized from the DB.

Thank you. That was the reason. solution was making the object serializable