Symptom
Add a Workflow rule in Manage Business Configuration with Event Type other than onSave. The validation error doesn't appear.
Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
Environment
SAP SuccessFactors Employee Central - workflow
Reproducing the Issue
- Create a Business rule to trigger workflow using scenario as 'Basic'.
- Go To Manage Business Configuration
- Go To HRIS Element
- Add the rule with Event Type other than onSave i.e OnInit/On View
- Save the changes
- Changes will get saved without any validation error and Workflow will also not trigger.
Cause
- Workflow scenario rule works for Event Type onSave.
2. Validation error will trigger only for Workflow rules created with Rule Scenario as 'Trigger Workflows'-
Resolution
- Create a business rule using the scenario Trigger Workflows.
We recommend that you use the Trigger Workflows scenario while creating new rules instead of the Basic scenario. This special-purpose business rule scenario Trigger Workflows, helps to create rules more easily because it provides useful guidance at various steps. - Specify the workflow to be triggered in the wfConfig field of the business rule.
- Assign the business rule to the target data object, either an Employee Central object or an MDF object.
Note : To make workflows work for an MDF data object, change its Pending Data attribute to Yes. Otherwise, any change to the object takes effect immediately, without triggering any workflow assigned to the object. - Initiate a data change. For example, edit fields of the object on the UI or import data for the object.
Example:
1) Go To Configure Business Rule.
2) Create new rule
3) Go To Employee central Core-> choose 'Trigger workflow'
4) Create a rule using any base object of HRIS Elements. Give the conditions and save.
5) Add the rule in Manage business Configuration under the particular HRIS Element as 'OnInit', OnView' etc. You'll be able to see the validation error-:
-
The event type should be onSave for the rule "Rule-name" defined in "HRIS Element", as the selected workflow rule only supports onSave Event Type.
FAQ - Additional Information
Q) Where can I get information on this from the Guide?
A) Guide:Implementing and Managing Workflows
See Also
Keywords
ECT‑145671, Workflow Rule Validation rule, workflow rule for Business Configuration UI, workflow validation, workflow, Trigger Workflows , rule , KBA , LOD-SF-EC-WFL , Workflows - Configuration, Tools, Objects & Rules , Problem