This happens because setMetadata has a replacement rather than a merge policy and because set metadata is invoked in the start task listener of a nested task that was partially completed in the previous execution and later invoked when one of the nested task is restored.
My doubt is if that nested start task listener should be called at all, since the task was already started in previous execution. Probably yes, since it makes sense to invoke start task for a non nested task that was not completed, it will be kind of inconsistent to change that policy for nested ones that were not completed.
Need to to think in a good solution for this one
This happens because setMetadata has a replacement rather than a merge policy and because set metadata is invoked in the start task listener of a nested task that was partially completed in the previous execution and later invoked when one of the nested task is restored.
My doubt is if that nested start task listener should be called at all, since the task was already started in previous execution. Probably yes, since it makes sense to invoke start task for a non nested task that was not completed, it will be kind of inconsistent to change that policy for nested ones that were not completed.
Need to to think in a good solution for this one