Workflow: don't change REQUEST when passing transition
The new workflow implementation from df85ef46 (ERP5Workflow: DC Workflows are now ERP5 objects (!1378)., 2020-11-18) had a different behavior in the implementation of _executeTransition, it was setting all kwargs from the transition in REQUEST. The reasons for this are unclear, it seem to come from the first Workflow implementation, 81784db4 (Initial Import of ERP5Workflow porduct., 2010-10-15) The side effects are that calling a workflow method, for example: document.edit(key=value) would also alter the global request to set key=value in REQUEST, for the rest of the current request. It was causing subtle issues, especially in tests where the REQUEST lifetime is long.
Showing
Please register or sign in to comment