SAP Knowledge Base Article - Public

2428928 - How to configure Event Derivation XML to trigger for a BOOLEAN field

Symptom

We need to trigger the Event Derivation (XML based) to select a specific Event Reason based on the change to a Boolean field

"Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental."

Environment

Employee Central

Resolution

For this to work correctly you need to configure the rules as follows (in the following order) in your Event Derivation XML. Because you cannot check for "false" value, only "true" value, the 1st rule will check whether the Boolean field value is true and is changed. The 2nd rule will check if the field value changed but not the value itself as "false" cannot be checked (and because of the 1st rule, this would mean it would only trigger if the boolean field value is not "true"). The last is the typical Data Change rule.

NOTE If you configure value="false" for a Boolean field, the system will not read this value. So for example value="false" compareToNew="true" would in fact only execute the compareToNew="true" part of the rule and not do the value check, so be careful in the ordering and logic otherwise you can end up that one of the rules catches all instead of the typical catch all rule doing this job. Therefore do follow the example below:

Example (stick to this configuration and order):

 <!-- Triggers a Part Time to Full Time Event Reason-->

<rule id="rule-21">
 <trueoutput>JOBPTFT</trueoutput>
 <conditions>
        <and>  
                 <equal id="jobInfo.is-fulltime-employee" value="true"/>
                 <equal id="jobInfo.is-fulltime-employee" inverse="true"/>  
          </and>
 </conditions>
</rule>

 <!-- Triggers a Full Time to Part Time Event Reason-->

<rule id="rule-22">
 <trueoutput>JOBFTPT</trueoutput>
 <conditions>
        <or>   
                 <equal id="jobInfo.is-fulltime-employee" inverse="true"/>   
          </or>
 </conditions>
</rule>

<!-- Triggers a Catch All - Data Change Event Reason-->

<rule id="rule-23">
 <trueoutput>DATACHG</trueoutput>
 <conditions>
        <or>    
                     
          </or>
 </conditions>
</rule>

For example:

Working_Example2.jpg

Keywords

Event Derivation, XML, Event Reason, Employee Central, is-fulltime-employee , KBA , LOD-SF-EC-JOB-RUL , Job Info Business Rules , How To

Product

SAP SuccessFactors HCM Core all versions