Hello Developer community,
I am trying to use the OldValue attribute to make a comparision between its old value and its actual value after an aggregation occures ( here I am using a delimited file for my tests)
The idea:
A user got a “AnteriorFonction” attribute updated, like for a job mobility.
The attribute is compared to its old value and if the value changed I want to set a new static value for this attribute. The other way I want to keep the last value of this identity attribute.
Here is my transform which cannot calculate the value of my identity attribute :
{
"attributes": {
"expression": "$fonction eq $oldfonction",
"positiveCondition": "$actualValue",
"negativeCondition": "$newValue",
"fonction": {
"attributes": {
"sourceName": "test",
"attributeName": "AnteriorFonction"
},
"type": "identityAttribute"
},
"oldfonction": {
"attributes": {
"input": {
"attributes": {
"ignoreErrors": "true",
"values": [
"$oldValue",
{
"attributes": {
"attributeName": "AnteriorFonction",
"sourceName": "test"
},
"type": "identityAttribute"
},
"none"
]
},
"type": "firstValid"
}
},
"type": "lower"
},
"newValue": {
"attributes": {
"value": "newValue"
},
"type": "static"
},
"actualValue": {
"attributes": {
"attributeName": "AnteriorFonction",
"sourceName": "test"
},
"type": "identityAttribute"
}
},
"type": "conditional",
"name": "test_oldvalue"
}
With the error : There was an exception while calculating the value for this attribute. java.lang.RuntimeException: Error running identity attribute transform:java.lang.IllegalArgumentException: Value of ‘name’ cannot be null.
Do you have some suggestion ?
Thanks.