IdentityNow LCS Transform

Hi Sailpoint,

I’m setting up a Lifecycle state in IDN for the users that go on LOA. I created the below transform logic to achieve this. The expected outcome is for the life cycle state to be set to onleave if the condition criteria is met. The issue that I’m having is that when I do the mapping in the identify profile I get the following error: Can someone please advise.

There was an exception while calculating the value for this attribute. com.sailpoint.seaspray.template.TemplateException: Error rendering template: #if($ON_LEAVE==‘1’)ONLEAVE#{else}active#end

Transform

{

“attributes”:{

"OnLeave":{

"attributes":{

"attributeName":"ON_LEAVE",

"sourceName": "Workday-Sandbox"

},

"type":"accountAttribute"

},

"value":"#if($ON_LEAVE=='1')onleave#{else}active#end"

},

"name":"Transform - LifeCycleState Mapping",

"type":"static"

}

@adyer, it appears that you are referencing the wrong variable name in your VTL. Notice in the example below, the variable “workerType” is defined and then referenced in the VTL, not the source attribute name like you are doing in your code.

{
  "attributes": {
    "workerType": {
      "attributes": {
        "sourceName": "HR Source",
        "attributeName": "empType"
      },
      "type": "accountAttribute"
    },
    "value": "#if($workerType=='Employee')Full-Time#{else}Contingent#end"
  },
  "type": "static",
  "id": "Test Static Transform"
}

I believe you need to change the “value” attribute to #if($OnLeave=='1')onleave#{else}active#end

Reference this Compass article for more information.

Hi Christina,

Thank you, this really helped. I was able to make it work. I kept the value attribute and passed the empty variable in the logic. So the logic looks like this:

{

“attributes”:{

"EMP_LOA":{

"attributes":{

"sourceName": "Workday-Sandbox",

"attributeName":"ON_LEAVE"

},

"type":"accountAttribute"

},

"value": "#if($EMP_LOA=='1')ONLEAVE#{else}active#end"

},

"type":"static",

"name":"Test LifeCycleState Mapping"

}

can we retrieve list value from transform inside VTL ?