[CST-5251] Improved builder's cleanup to avoid consumers executions

This commit is contained in:
Luca Giamminonni
2022-02-10 16:11:07 +01:00
parent 579d926e95
commit 35179b535e
19 changed files with 19 additions and 0 deletions

View File

@@ -60,6 +60,7 @@ public class ProcessBuilder extends AbstractBuilder<Process, ProcessService> {
@Override
public void cleanup() throws Exception {
try (Context c = new Context()) {
c.setDispatcher("noindex");
c.turnOffAuthorisationSystem();
// Ensure object and any related objects are reloaded before checking to see what needs cleanup
process = c.reloadEntity(process);