Template Exception in Transform

Hi Team,

I have created below transform for an attribute with logic as :
• For employee, will be set to NULL
• For non-employees, will be set to 12 months since user’s effective start date or (if
effective date is not available) to 12 months since user’s AD account provisioning
date

{
    "attributes": {
        "expression": "$emptype eq true",
        "positiveCondition": "$emp",
        "negativeCondition": "$nonemp",
        "emptype": {
            "attributes": {
                "sourceName": "Test Source (Delimited File)",
                "attributeName": "CW_EMPLOYEE_TYPE"
            },
            "type": "accountAttribute"
        },
        "emp": {
            "attributes": {
                "value": "NULL"
            },
            "type": "static"
        },
        "nonemp": {
            "attributes": {
                "values": [
                    {
                        "attributes": {
                            "expression": "+12M/h",
                            "roundUp": true,
                            "input": {
                                "attributes": {
                                    "sourceName": "Test Source (Delimited File)",
                                    "attributeName": "HIREDATE"
                                },
                                "type": "accountAttribute"
                            }
                        },
                        "type": "dateMath"
                    },
                    {
                        "attributes": {
                            "expression": "+12M/h",
                            "roundUp": true,
                            "input": {
                                "attributes": {
                                    "input": {
                                        "attributes": {
                                            "sourceName": "Active Directory",
                                            "attributeName": "whenCreated"
                                        },
                                        "type": "accountAttribute"
                                    },
                                    "inputFormat": "MMM dd yyyy, HH:mm:ss.SSS",
                                    "outputFormat": "ISO8601"
                                },
                                "type": "dateFormat"
                            }
                        },
                        "type": "dateMath"
                    }
                ]
            },
            "type": "firstValid"
        }
    },
    "type": "conditional",
    "name": "Account Expire Transform"
}

I am getting error on this above transform as “There was an exception while calculating the value for this attribute. com.sailpoint.seaspray.template.TemplateException: Error rendering template: $nonemp”
I am unable to figure out the error and the resolution. If you can help me for the same would be appreciated.

Thanks,
Mahak

Looks like nonemp is not getting a value from your firstValid transform. To debug this, I suggest you isolate your two values into separate transforms and see what kind of results you are getting. Either the two account attribute don’t contain a value for the particular account you are testing against, or there are issues with your dateMath/dateFormat logic preventing a successful conversion of the date.