finallyAfterTaskExecution

hook that is guaranteed to be called, even when a task throws an exception which will cause afterTaskExecution to not be called.

As an example you can clear the security context here if you set it in the beforeTaskExecution hook.

Parameters

e

Will be not null if the task failed with an exception.

stage

The stage for the task execution.

task

The task that is being handled.

taskResult

Will be null if the task failed with an exception.