In general marshaling strategy that deals with process and task variable persistence invokes marshall method too many times. For a process that when started with:
- create process instance
- create user task
will call marshall method 4 times:
- once for process instance
- once for user task instance
- twice for work item instance
only two first should be actually invoked as work item level variables does not have any effect on the engine so persisting them does not bring any value.