If there are multiple steps with Recipients as Agent Determination by BAdi, the pre-conditions associated with the steps need to be considered in the BADI Implementation as well.
Again in case of BADI agent determination rule, the number of steps defined in the workflow configuration should be equal to or less than the number of approval level implemented in BADI agent determination rule.
Custom Pre-conditions in apps for Manage Workflow for Purchase Requisitions
BADIs SWF_WORKFLOW_CONDITION_DEF(Providing additional conditions for scenarios) and SWF_WORKFLOW_CONDITION_EVAL(Value evaluation of additional conditions for scenarios) are available for adding and evaluating custom pre-conditions for flexible workflow scenarios.
Manage conditions for re-start of flexible workflow
BADI MM_PUR_S4_PR_WFL_RESTART(Define Conditions to Restart Flexible Workflow) is available to define your own conditions to restart the approval workflow in purchase requisitions. Critical changes made to the existing purchase requisitions will restart the approval process. You can use this BAdI to overwrite the configurations defined in configuration step Manage Conditions to Restart Flexible Workflow in app Manage Your Solution.