Support for lazy load of variable content should be provided out of the box to allow efficient processing of variables that can take a while to load their actual content e.g. documents.
If documents are stored in ECM (e.g. google docs, dropbox, etc) they might have rather big impact on overall processing since process, task and case file variables are loaded when process instance resumes. In many cases such variable is not always needed and thus it make sense to make them lazy loading the content.
Out of the box mechanism should be provided and jbpm document module should use this by default. So document content should only be loaded when explicitly accessed otherwise it should not be read from the back end store.
Similar for storing documents it should only be stored when it actually changed. Internal tracking should be implemented in the variable type - e.g. DocumentImpl and marshalling strategy.