IBM Support

How to update erlaststatuschangedate through a TDI HR feed

Troubleshooting


Problem

When updating the Person status to a value of 1 to suspend a user, via a TDI based HR feed, it only updates the "erpersonstatus" attribute.

Symptom

The "erlaststatuschangedate" attribute doesn't get updated when the "erpersonstatus" attribute is updated via a TDI based HR feed.

Cause

This is working as designed.

Environment

TDI 7.X

Diagnosing The Problem

The "erlaststatuschangedate" attribute doesn't reflect an updated value as a result of an HR feed designed to update the "erpersonstatus" attribute.

Resolving The Problem

In order to resolve this issue it is necessary to add logic to the HR feed AssemblyLine to set the date based on the Person status change. If the "erpersonstatus" attribute value is being modified then the "erlaststatuschangedate" attribute should also be updated to contain the date of the HR feed. To accomplish this use ibmditk to execute the following steps:

  1. Open the Assembly Line
  2. Add a Work attribute called "erlaststatuschange" to the Input Map
  3. Define the "erlaststatuschange" Work attribute with the following script (considering your appropriate input schema file attribute name, where it's 'status' in the below example)
      if(conn.getAttribute("status")!=null){
      if(conn.getString("status").equals("1")) {
      var mydate = new Date();
      localOffset = mydate.getTimezoneOffset() * 60000;
      myTZ = mydate + localOffset;
      var myTZStr = new java.text.SimpleDateFormat("yyyyMMddHHmm").format(myTZ);
      var myTZStrZ = myTZStr + "Z";
      ret.value=myTZStrZ;
      }
      else
      ret.value="";
      }

The script includes logic for time zone, if this is needed.

[{"Product":{"code":"SSRMWJ","label":"IBM Security Identity Manager"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Server","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"6.0;5.1;7.0","Edition":"","Line of Business":{"code":"LOB24","label":"Security Software"}}]

Product Synonym

ITIM Identity Manager TIM TDI Tivoli Directory Integrator ISIM SIM

Document Information

Modified date:
16 June 2018

UID

swg21575825