LOA LCS Rule not triggering when user goes on LOA

Hi Team,

I have the attached rule for LOA that works as expected when moving a user to LOA manually but I need it to execute automatically when the attributes LOA_START and LOA_END in Workday is populated. Any ideas what I may be missing. Rule attached.
Rule - IdentityAttribute - Rule - AG Calculate Lifecycle State.xml (3.8 KB)

Hello Marvin,

Did you try to use a transform to set the lifecycle state instead of using a rule? It is much easier to debug and is working really fine and with just a first valid to get first the LOA date and then the date if it is not populated you will get it.

Hope it helps,
Pablo

Hi Pablo,

Thanks for chiming in. I have a LCS transform but it’s not putting users in the LCS.


{
    
    "name": "Testing Transform",
    "type": "static",
    "attributes": {
        "isTermed": {
            "attributes": {
                "negativeCondition": "no",
                "positiveCondition": "yes",
                "firstDate": "now",
                "secondDate": {
                    "attributes": {
                        "input": {
                            "attributes": {
                                "values": [
                                    {
                                        "attributes": {
                                            "attributeName": "CONTRACT_END_DATE",
                                            "sourceName": "Workday HCM"
                                        },
                                        "type": "accountAttribute"
                                    },
                                    {
                                        "attributes": {
                                            "value": "12/31/2099"
                                        },
                                        "type": "static"
                                    }
                                ],
                                "ignoreErrors": "true"
                            },
                            "type": "firstValid"
                        },
                        "inputFormat": "MM/dd/yyyy",
                        "outputFormat": "ISO8601"
                    },
                    "type": "dateFormat"
                },
                "operator": "gt"
            },
            "type": "dateCompare"
        },
        "loaStart": {
            "attributes": {
                "negativeCondition": "no",
                "positiveCondition": "yes",
                "firstDate": {
                    "attributes": {
                        "input": {
                            "attributes": {
                                "values": [
                                    {
                                        "attributes": {
                                            "attributeName": "LOA_START",
                                            "sourceName": "Workday HCM"
                                        },
                                        "type": "accountAttribute"
                                    },
                                    {
                                        "attributes": {
                                            "value": "12/31/2099"
                                        },
                                        "type": "static"
                                    }
                                ],
                                "ignoreErrors": "true"
                            },
                            "type": "firstValid"
                        },
                        "inputFormat": "yyyy-MM-dd",
                        "outputFormat": "ISO8601"
                    },
                    "type": "dateFormat"
                },
                "secondDate": "now"
            },
            "loaEnd": {
                "attributes": {
                    "negativeCondition": "no",
                    "positiveCondition": "yes",
                    "firstDate": {
                        "attributes": {
                            "input": {
                                "attributes": {
                                    "values": [
                                        {
                                            "attributes": {
                                                "attributeName": "LOA_END",
                                                "sourceName": "Workday HCM"
                                            },
                                            "type": "accountAttribute"
                                        },
                                        {
                                            "attributes": {
                                                "value": "12/31/2099"
                                            },
                                            "type": "static"
                                        }
                                    ],
                                    "ignoreErrors": "true"
                                },
                                "type": "firstValid"
                            },
                            "inputFormat": "yyyy-MM-dd",
                            "outputFormat": "ISO8601"
                        },
                        "type": "dateFormat"
                    },
                    "secondDate": "now"
                },
                "isNewEmployee": {
                    "attributes": {
                        "negativeCondition": "no",
                        "positiveCondition": "yes",
                        "firstDate": "now",
                        "secondDate": {
                            "type": "dateMath",
                            "attributes": {
                                "input": {
                                    "attributes": {
                                        "input": {
                                            "attributes": {
                                                "values": [
                                                    {
                                                        "attributes": {
                                                            "attributeName": "HIREDATE",
                                                            "sourceName": "Workday HCM"
                                                        },
                                                        "type": "accountAttribute"
                                                    },
                                                    {
                                                        "attributes": {
                                                            "value": "12/31/2099"
                                                        },
                                                        "type": "static"
                                                    }
                                                ],
                                                "ignoreErrors": "true"
                                            },
                                            "type": "firstValid"
                                        },
                                        "inputFormat": "MM/dd/yyyy",
                                        "outputFormat": "ISO8601"
                                    },
                                    "type": "dateFormat"
                                },
                                "expression": "-7d/d",
                                "roundUp": "false"
                            }
                        },
                        "operator": "gte"
                    },
                    "type": "dateCompare"
                },
                "status": {
                    "attributes": {
                        "value": "active"
                    },
                    "type": "static"
                },
                "value": "#if($loaStart == 'yes')loa#elseif($loaEnd == 'yes')newEmployee#elseif($isTermed == 'yes')deprovisioning#elseif($isNewEmployee == 'yes')newEmployee#else$status#end"
            },
            "internal": false
        }
    },
    "internal": false
}

Hello Marvin, can you try the following:

{
    "name": "Testing Transform",
    "type": "static",
    "attributes": {
        "isTermed": {
            "attributes": {
                "negativeCondition": "no",
                "positiveCondition": "yes",
                "firstDate": "now",
                "secondDate": {
                    "attributes": {
                        "input": {
                            "attributes": {
                                "values": [
                                    {
                                        "attributes": {
                                            "attributeName": "CONTRACT_END_DATE",
                                            "sourceName": "Workday HCM"
                                        },
                                        "type": "accountAttribute"
                                    },
                                    {
                                        "attributes": {
                                            "value": "12/31/2099"
                                        },
                                        "type": "static"
                                    }
                                ],
                                "ignoreErrors": "true"
                            },
                            "type": "firstValid"
                        },
                        "inputFormat": "MM/dd/yyyy",
                        "outputFormat": "ISO8601"
                    },
                    "type": "dateFormat"
                },
                "operator": "gt"
            },
            "type": "dateCompare"
        },
        "loaStart": {
            "attributes": {
                "negativeCondition": "no",
                "positiveCondition": "yes",
                "firstDate": {
                    "attributes": {
                        "input": {
                            "attributes": {
                                "values": [
                                    {
                                        "attributes": {
                                            "attributeName": "LOA_START",
                                            "sourceName": "Workday HCM"
                                        },
                                        "type": "accountAttribute"
                                    },
                                    {
                                        "attributes": {
                                            "value": "12/31/2099"
                                        },
                                        "type": "static"
                                    }
                                ],
                                "ignoreErrors": "true"
                            },
                            "type": "firstValid"
                        },
                        "inputFormat": "yyyy-MM-dd",
                        "outputFormat": "ISO8601"
                    },
                    "type": "dateFormat"
                },
                "secondDate": "now",
                "operator": "lt"
            },
            "type": "dateCompare"
        },
        "loaEnd": {
            "attributes": {
                "negativeCondition": "no",
                "positiveCondition": "yes",
                "firstDate": {
                    "attributes": {
                        "input": {
                            "attributes": {
                                "values": [
                                    {
                                        "attributes": {
                                            "attributeName": "LOA_END",
                                            "sourceName": "Workday HCM"
                                        },
                                        "type": "accountAttribute"
                                    },
                                    {
                                        "attributes": {
                                            "value": "12/31/2099"
                                        },
                                        "type": "static"
                                    }
                                ],
                                "ignoreErrors": "true"
                            },
                            "type": "firstValid"
                        },
                        "inputFormat": "yyyy-MM-dd",
                        "outputFormat": "ISO8601"
                    },
                    "type": "dateFormat"
                },
                "secondDate": "now",
                "operator": "lt"
            },
            "type": "dateCompare"
        },
        "isNewEmployee": {
            "attributes": {
                "negativeCondition": "no",
                "positiveCondition": "yes",
                "firstDate": "now",
                "secondDate": {
                    "type": "dateMath",
                    "attributes": {
                        "input": {
                            "attributes": {
                                "input": {
                                    "attributes": {
                                        "values": [
                                            {
                                                "attributes": {
                                                    "attributeName": "HIREDATE",
                                                    "sourceName": "Workday HCM"
                                                },
                                                "type": "accountAttribute"
                                            },
                                            {
                                                "attributes": {
                                                    "value": "12/31/2099"
                                                },
                                                "type": "static"
                                            }
                                        ],
                                        "ignoreErrors": "true"
                                    },
                                    "type": "firstValid"
                                },
                                "inputFormat": "MM/dd/yyyy",
                                "outputFormat": "ISO8601"
                            },
                            "type": "dateFormat"
                        },
                        "expression": "-7d/d",
                        "roundUp": "false"
                    }
                },
                "operator": "gte"
            },
            "type": "dateCompare"
        },
        "status": {
            "attributes": {
                "value": "active"
            },
            "type": "static"
        },
        "value": {
            "type": "expression",
            "attributes": {
                "value": "#if($loaStart == 'yes')loa#elseif($loaEnd == 'yes')loa#elseif($isTermed == 'yes')deprovisioning#elseif($isNewEmployee == 'yes')newEmployee#else$status#end"
            }
        }
    },
    "internal": false
}

Regards, Pablo

Hi Pablo, Thanks for this. I am seeing the error “expression” is not a valid transform type.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.