Triggers Tips
Trigger Tips
Here we will show you some tips about how to use scripts.
For more information you can visit the official documentation of Soffid
Write into a sync-server log
System.out.println("what you want......");
Retrieve data from a Soffid object when synchronizing
Retrieve userName
name = source{"userName"};
Retrive a custom attribute
company = source{"attributes"}{"ATTRIBUTENAME"};
Use existing services
serviceLocator.getUserService().....
serviceLocator.getAccountService().....
serviceLocator.......
Create a new Soffid object
mailDomain = new com.soffid.iam.api.MailDomain();
newUser = new com.soffid.iam.api.User();
newRol = new com.soffid.iam.api.Role();
............
Loop an object list
for(role : roleList){
//TO-DO
out.print(" Role: " + role.roleName + "\n");
}
Recover response
if (response!=null) {
for (o : response.getObjects()) {
if (o!=null && o{"result"}!=null) {
//TO-DO
}
}
}