In Income Tax Declartion portlet workflows are getting triggered before onSave and onValidate rule execution.
Employee Central: Income Tax Declaration
Reproducing the Issue
Navigate to Admin Center -> Configure Object Definition
- Search for the object ItDeclaration
- Take Action -> Make Correction
- Assign a workflow in the field Workflow Routing
- Assign a rule to either Validate Rules or Save Rules section. This rule intends to validate and throw an error if a file has not been attached when submitting Actuals.
- Save the change.
- Search for an employee and submit an Actual without an attachment.
- Notice that firtst workflow trigger message appears and later the business rule's error message appears. This flow cannot be changed in anyhow.
First of all, we cannot use business rules in Income Tax Declaration portlet to trigger a workflow. Simply because, as per design of this portlet, the field Workflow Routing must be used to trigger a workflow.
Secondly, Income Tax Declaration portlet is a custom portlet delivered by Successfactors. We do capture all workflow related details (such as Approver details, Request comments, etc.) before saving data. Since the rule is attached in to ItDeclaration Object Definition, the rule gets triggered on save of the record. Hence, it is expected to get workflow pop up on save of record and on confirming, it will validate the rule. Based on this, either it will trigger the approval process (when the rule's conditions fail) or the error message will be shown related to rule (when the rule's conditions pass).
Currently it is not possible to trigger the error message before the workflow pop up. The engineering development team is aware of this and there is an enhnancement request (ECT-88075) for it. We do not yet have fix version available for this. When this is implemented, it'll be available in the respective release note. If you want to know status of the enhancement request, you can contact your CSM or call SAP hotline number.
ECT-88075, business rule, workflow, order, validation, validate, validating, actual, attachment , KBA , LOD-SF-EC-LOC , Localization & Country Specifics , Product Enhancement