Is there any size limit of objects to be kept in the execution?

Dear All,

Before starting flowable process, I am stuffing some data into execution to be used later in the workflow.
One of the data is a file content.

This is how the code looks like.

Line1: String procesName = “myProcessName”;
Line2: String tenantId = “myTenantId”;
Line3: Document transactionDoc = //load document from file system.

Line4: Map<String, Object> variableMap = new HashMap<String, Object>();
Line5: variableMap.put(“INPUT_DOC”, transactionDoc);
Line6: variableMap.put(“DOC_TYPE”, “XML”);

Line7: RuntimeService runtimeService = processEngine.getRuntimeService();

Line8: ProcessInstance processInstance =
runtimeService.startProcessInstanceByKeyAndTenantId(processName, variableMap,tenant_id);

=================================================

This works fine if the transactionalDoc file size is upto 200kb, but if it is more than that the process fails to start at line number 8.
It throws “java.lang.StackOverflowError”. I even tried increasing my stack space of the jvm, but it still fails.

Is there any size limit of object to be loaded in the execution? if yes, can it be modified?

Appreciate your help!!

Thanks!
Sunny

Hi Sunny,

Could you attach stacktrace?
(anyway I would not store whole document in the process -> I would just keep a reference to it)

Regards
Martin

Hi Martin,

Appreciate your quick response!
I have shared the full stack trace here.
https://drive.google.com/open?id=1NSEbmbjfUNje1xQxzTIsFc6gVQGm_uHj

Thanks for your suggestion to keep a reference of the file rather than putting it in execution, but actually we had such requirements where the document has to go through many phases and in each phase it will be modified/updated. Hence decided to keep it in execution.

Thanks once again for your response.
Please let us know if you find something after looking at the stack trace.

Best Regards,
Sunny

Hi Sunny.
The stack trace did not help. The only advice which I have is to put a breakpoint somewhere in
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1028) [rt.jar:1.8.0_66]
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496) [rt.jar:1.8.0_66]
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) [rt.jar:1.8.0_66]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) [rt.jar:1.8.0_66]
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548) [rt.jar:1.8.0_66]
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509) [rt.jar:1.8.0_66]
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) [rt.jar:1.8.0_66]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) [rt.jar:1.8.0_66]