You have scheduled a Workflow to trigger based on conditions. These conditions are met in custom code logic in your Add-On Solution but the Workflow is not triggered as expected.
- SAP Cloud Applications Studio
- SAP Cloud for Customer
Reproducing the Issue
- You have a Custom/Extension Business Object in your Add-On Solution.
- You have a BeforeSave script for your Business Object (BO).
- You are meeting the conditions in code logic during execution of the BeforeSave script.
Workflow scheduling/execution is called before the execution of the BeforeSave script. This behavior means that any change made in the BeforeSave is not relevant for Workflow conditions.
- If the BeforeSave change is made to the same BO, you can try to set the Workflow to scheduled after [unit of time] .
- If the BeforeSave change is made to a second BO (and the Workflow is for this second BO), you need to move the logic to the AfterModify script.
PDI, SDK, BeforeSave, AfterModify, script, ABSL, Action , KBA , AP-RC-BDS-SCR , ByDesign Studio Scripting (ABSL) , LOD-CRM-WKF , Workflow , Problem