We developed a web services adapter with some operations, add, modify
and delete using TDI and ADT. But the reconciliation will be done
manually, with CSV file.
But this service has a multi-value attribute, named "groups". I'd
like to know how should I implement this in TDI.
I tried a lot of options, but without success. I can't reconciliate
an account with its groups (multi-value).
Thanks,
Rodrigo
I am going to assume your trying to create a multi-value attribute in
the CSV output, if so..have a look at this..
The following Advanced Attribute script could be used to accomplish
this.
------------ Example Script ------------
//Attribute is multivalue. We will pipe the values
var Array = work.getAttribute("objectclass");
var String = "";
if (Array !=null && Array.size()>0)
{
String = Array.getValue(0);
for (i=1;i<Array.size();i++)
{
var role = Array.getValue(i);
String = String + "," + role;
}
}
ret.value = String;
----------------------------------
Hi,
Actually, I'm reading a multi-value attribute separated by "|" from a
CSV file and the output is a LDAP
conector to ITIM account schema. How will be the script?
Sorry, I'm not very good in TDI (yet)! :-)
Thanks,
Rodrigo
Here is an example map in JavaScript:
---
// for example, the "mail" attribute here
mail = system.newAttribute("mail");
mailField = conn.getString("Email");
values = system.splitString(mailField, "|");
for (mailVal in values)
mail.addValue(mailVal);
ret.value = mail;
---
Hope this helps!
-Eddie
It works, but I have to implement some modifications:
mail = system.newAttribute("mail");
mailField = work.getAttribute("Email").getValue(0);
values = system.splitString(mailField, "|");
for (mailVal in values)
mail.addValue(mailVal);
ret.value = mail;
Thanks you!
Rodrigo