class HooksPhaseGetter {

    public List<HookPhase> getHookPhasesBeforeStop(SyncFlowableStep syncFlowableStep, ProcessContext context) {
        if (syncFlowableStep instanceof BeforeStepHookPhaseProvider) {
            return ((BeforeStepHookPhaseProvider) syncFlowableStep).getHookPhasesBeforeStep(context);
        }
        return Collections.singletonList(HookPhase.NONE);
    }

}