ERP5{,Type.Core}.InteractionWorkflow: Deprecate activeScript.
Replace it with a method on ERP5Type.Base so these activities get found by CopySupport.unindexObject and flushed, rather than remaining on the interaction workflow's context and failing when run. It seems a lot more likely for a document to be deleted while interactions are being spawned than an interaction workflow itself. So this should be a net benefit in activity stability.
The reason behind this change is that untitests fail en masse in beforeTearDown
when erp5_local_transaction is installed: it has an interaction which spawns an activeScript
activity, whose context is the interation workflow. Then, beforeTearDown
deletes the object before this activity could be run. Because the activity context is not the document, it does not get flushed by CopySupport.unindexObject
, so when beforeTearDown
then calls self.tic()
it fails because the activity cannot run (cannot traverse to the now-deleted document).
/cc @arnau @jerome @jm @romain (not sure who else have ideas & feedback on this topic)