Symptom
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.
Environment
- SAP Cloud Applications Studio
- SAP Cloud for Customer
Reproducing the Issue
Prerequisites:
- 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.
Cause
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.
Resolution
- 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.
Keywords
PDI, SDK, BeforeSave, AfterModify, script, ABSL, Action , KBA , AP-RC-BDS-SCR , ByDesign Studio Scripting (ABSL) , LOD-CRM-WKF , Workflow , Problem
Product
SAP Cloud Applications Studio all versions ; SAP Cloud for Customer add-ins all versions ; SAP Cloud for Customer core applications all versions