Hi,
Below code is working when I give input format : yyyyMMdd format , but if I change the format to yyyy-MM-dd it is picking the “Laspsed” date instead of “prejoiner” state.
{
"name": "Joiner LifeCycleState Transform",
"type": "static",
"attributes": {
"mainRecord": {
"attributes": {
"attributeName": "MAIN_RECORD",
"sourceName": "SAP HR WorkFlow Source"
},
"type": "accountAttribute"
},
"lapsedDate": {
"attributes": {
"values": [
{
"attributes": {
"name": "lapseddate"
},
"type": "identityAttribute"
},
{
"attributes": {
"value": "blank"
},
"type": "static"
}
]
},
"type": "firstValid"
},
"stat2Current": {
"attributes": {
"attributeName": "STAT2_Current",
"sourceName": "SAP HR WorkFlow Source"
},
"type": "accountAttribute"
},
"stat2Next": {
"attributes": {
"values": [
{
"attributes": {
"attributeName": "STAT2_Next",
"sourceName": "SAP HR WorkFlow Source"
},
"type": "accountAttribute"
},
{
"attributes": {
"value": "blank"
},
"type": "static"
}
]
},
"type": "firstValid"
},
"massnnullcheck": {
"attributes": {
"values": [
{
"attributes": {
"attributeName": "MASSN_BEGDA",
"sourceName": "SAP HR WorkFlow Source"
},
"type": "accountAttribute"
},
{
"attributes": {
"value": "blank"
},
"type": "static"
}
]
},
"type": "firstValid"
},
"endDategreaterTNowCheck": {
"type": "dateCompare",
"attributes": {
"firstDate": {
"attributes": {
"values": [
{
"attributes": {
"input": {
"attributes": {
"sourceName": "SAP HR WorkFlow Source",
"attributeName": "MASSN_BEGDA"
},
"type": "accountAttribute"
},
"inputFormat": "yyyyMMdd",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
{
"attributes": {
"input": "19991231",
"inputFormat": "yyyyMMdd",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
}
]
},
"type": "firstValid"
},
"secondDate": {
"attributes": {
"input": {
"attributes": {
"expression": "now/d",
"roundUp": false
},
"type": "dateMath"
},
"inputFormat": "yyyy-MM-dd'T'HH:mm",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
"operator": "gt",
"positiveCondition": "true",
"negativeCondition": "false"
}
},
"begdagreaterTNowCheck": {
"type": "dateCompare",
"attributes": {
"firstDate": {
"attributes": {
"values": [
{
"attributes": {
"input": {
"attributes": {
"sourceName": "SAP HR WorkFlow Source",
"attributeName": "STAT2_BEGDA"
},
"type": "accountAttribute"
},
"inputFormat": "yyyyMMdd",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
{
"attributes": {
"input": "19991231",
"inputFormat": "yyyyMMdd",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
}
]
},
"type": "firstValid"
},
"secondDate": {
"attributes": {
"input": {
"attributes": {
"expression": "now/d",
"roundUp": false
},
"type": "dateMath"
},
"inputFormat": "yyyy-MM-dd'T'HH:mm",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
"operator": "gt",
"positiveCondition": "true",
"negativeCondition": "false"
}
},
"inactiveDate": {
"type": "dateCompare",
"attributes": {
"firstDate": {
"attributes": {
"values": [
{
"attributes": {
"input": {
"attributes": {
"name": "currentDate"
},
"type": "identityAttribute"
},
"inputFormat": "yyyy-MM-dd'T'HH:mm",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
{
"attributes": {
"input": "19991231",
"inputFormat": "yyyyMMdd",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
}
]
},
"type": "firstValid"
},
"secondDate": {
"attributes": {
"values": [
{
"attributes": {
"input": {
"attributes": {
"name": "lapseddate"
},
"type": "identityAttribute"
},
"inputFormat": "yyyy-MM-dd'T'HH:mm",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
{
"attributes": {
"input": "19991231",
"inputFormat": "yyyyMMdd",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
}
]
},
"type": "firstValid"
},
"operator": "gte",
"positiveCondition": "true",
"negativeCondition": "false"
}
},
"nowplusone": {
"type": "conditional",
"attributes": {
"firstDate": {
"attributes": {
"values": [
{
"attributes": {
"input": {
"attributes": {
"sourceName": "SAP HR WorkFlow Source",
"attributeName": "STAT2_BEGDA"
},
"type": "accountAttribute"
},
"inputFormat": "yyyyMMdd",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
{
"attributes": {
"input": "19991231",
"inputFormat": "yyyyMMdd",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
}
]
},
"type": "firstValid"
},
"secondDate": {
"type": "dateFormat",
"attributes": {
"input": {
"type": "dateMath",
"attributes": {
"expression": "now+1d/d"
}
},
"inputFormat": "yyyy-MM-dd'T'HH:mm",
"outputFormat": "ISO8601"
}
},
"expression": "$firstDate eq $secondDate",
"positiveCondition": "true",
"negativeCondition": "false"
}
},
"begdanullcheck": {
"attributes": {
"values": [
{
"attributes": {
"attributeName": "BEGDA",
"sourceName": "SAP HR WorkFlow Source"
},
"type": "accountAttribute"
},
{
"attributes": {
"value": "blank"
},
"type": "static"
}
]
},
"type": "firstValid"
},
"supervisor": {
"attributes": {
"values": [
{
"attributes": {
"attributeName": "Supervisor",
"sourceName": "SAP HR WorkFlow Source"
},
"type": "accountAttribute"
},
"Supervisor value is Null"
]
},
"type": "firstValid"
},
"personalemail": {
"attributes": {
"values": [
{
"attributes": {
"attributeName": "personalEmail",
"sourceName": "SAP HR WorkFlow Source"
},
"type": "accountAttribute"
},
"Personal Email is Null"
]
},
"type": "firstValid"
},
"value": "#if($mainRecord == 'Y' && $stat2Current =='Inactive' && $begdanullcheck =='blank' && $stat2Next == 'blank' && $endDategreaterTNowCheck == 'false' && $inactiveDate == 'false')inactive#elseif($mainRecord == 'Y' && $stat2Current =='Inactive' && $stat2Next == 'Active' && $begdagreaterTNowCheck == 'true' && (($supervisor.contains(\"Supervisor value is Null\")) || ($personalemail.contains(\"Personal Email is Null\"))) && ($begdanullcheck!='blank' || $begdanullcheck=='blank'))missing_information#elseif($mainRecord == 'Y' && $stat2Current =='Inactive' && $stat2Next == 'Active' && $begdagreaterTNowCheck == 'true' && $nowplusone =='false' && !(($supervisor.contains(\"Supervisor value is Null\")) || ($personalemail.contains(\"Personal Email is Null\"))))prejoiner#elseif($mainRecord == 'Y' && ($stat2Current == 'Active' || ($stat2Next == 'Active' && $stat2Current =='Inactive' && $nowplusone =='true')))active#elseif($mainRecord == 'Y' && $lapsedDate !='2000-02-29T00:00:00.000Z' && $inactiveDate == 'true')lapsed#end"
},
"internal": false
}