Hi,
I am writing a lifecycle state transform and getting below error:
There was an exception while calculating the value for this attribute. java.time.format.DateTimeParseException: Text ‘none’ could not be parsed at index 0
Transform is as below:
{
"name": "Determine Workday LCS",
"type": "static",
"attributes": {
"requiresPeriodicRefresh": "true",
"activestate": {
"attributes": {
"firstDate": "now",
"secondDate": {
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"attributeName": "HIREDATE",
"sourceName": "WorkDay_Test"
}
},
"inputFormat": "MM/dd/yyyy",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
"operator": "GTE",
"positiveCondition": "yes",
"negativeCondition": "no"
},
"type": "dateCompare"
},
"prehire": {
"attributes": {
"firstDate": {
"attributes": {
"expression": "now+45d/d",
"roundUp": false
},
"type": "dateMath"
},
"secondDate": {
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"attributeName": "HIREDATE",
"sourceName": "WorkDay_Test"
}
},
"inputFormat": "MM/dd/yyyy",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
"operator": "GTE",
"positiveCondition": "yes",
"negativeCondition": "no"
},
"type": "dateCompare"
},
"onleave": {
"attributes": {
"values": [
{
"attributes": {
"attributeName": "ON_LEAVE",
"sourceName": "WorkDay_Test"
},
"type": "accountAttribute"
},
{
"attributes": {
"value": "none"
},
"type": "static"
}
]
},
"type": "firstValid"
},
"inactivestate": {
"attributes": {
"firstDate": "now",
"secondDate": {
"type": "firstValid",
"attributes": {
"values": [
{
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"attributeName": "TERMINATION_DATE",
"sourceName": "WorkDay_Test"
}
},
"inputFormat": "MM/dd/yyyy",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
{
"attributes": {
"value": "none"
},
"type": "static"
}
]
}
},
"operator": "GT",
"positiveCondition": "yes",
"negativeCondition": "no"
},
"type": "dateCompare"
},
"value": "#if(($inactivestate == 'no' || $inactivestate == 'none') && $activestate == 'yes' && ($onleave == 'none' || $onleave == '0'))active#elseif($activestate == 'no' && $prehire == 'yes' && $onleave != '1')prehire#elseif($onleave == '1')leaveOfAbsence#elseif($inactivestate == 'yes')inactive#{else}UNKNOWN#end"
}
}
The error is coming from inactive tag but not sure the location of specific error as it is not able to pick ‘none’ for the inactive tag.