Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

Why arguements passed into creatAccount() of JarConnector are not replaced with actual values?

alc
Regular Contributor
Regular Contributor

Hello Saviynt Expert,

I am trying to use JarConnector to implement in house application account provisioning.

I wanted to check what arguments will be passed in from Saviynt to my custom class. Here is my configuration which exactly follow the JarConnector documentation at: createAccoutJSON:

CreateAccountJSON
{
"fullyQualifiedClassName": "com.connector.MyConnector",
"methodName": "createAccount",
"arguments": {
"TARGET_HOST": "${connectionJSON.TARGET_HOST}",
"TARGET_ADMIN": "${connectionJSON.TARGET_ADMIN}",
"TARGET_ADMIN_PASSWORD": "${connectionJSON.TARGET_ADMIN_PASSWORD}",
"LOGONID": "${accounts.name}",
"USERNAME": "${users.username}",
"NAME": "${users.cn}",
"empNumber": "${users.empId}"
}
}

Here is the passed in arguments when I print them out:

Argument: TARGET_HOST | propertyType: java.lang.String | propertyValue: ${connectionJSON.TARGET_HOST}
Argument: TARGET_ADMIN | propertyType: java.lang.String | propertyValue: ${connectionJSON.TARGET_ADMIN}
Argument: TARGET_ADMIN_PASSWORD | propertyType: java.lang.String | propertyValue: ${connectionJSON.TARGET_ADMIN_PASSWORD}
Argument: LOGONID | propertyType: java.lang.String | propertyValue: ${accounts.name}
Argument: username | propertyType: java.lang.String | propertyValue: ${users.username}
Argument: NAME | propertyType: java.lang.String | propertyValue: ${users.cn}
Argument: empNumber | propertyType: java.lang.String | propertyValue: ${users.empId}

My question is why I cannot see the actual value? How can I convert ${users.username} to the actual user's attribute values? I expect Saviynt conduct the convertion and pass me the values so I can use the values create account at target system.

Could you please guide me here? I want to get attribute values from user, account arsTask and user update rule which trigger account update etc. Where can I find the attribute names of these entities to configure createAccountJSON? and get their actual values during provisioning job execution?

Thanks!

4 REPLIES 4

alc
Regular Contributor
Regular Contributor

Anybody can take a look please? I am waiting your kind help online. It is very simple but not sure what was going on at backend. Current method have nothing but just print out the passed in argument and expect Saviynt convert the variables with actual values when it pass those parameters into creatAccount method.

prasannta
Saviynt Employee
Saviynt Employee

Can you try using the "LOGONID": "${accounts}" instead of "LOGONID": "${accounts.name}" in your JSON? Also, can you elaborate more on your requirement to use a custom jar instead of OOB connectors?

alc
Regular Contributor
Regular Contributor

Hello Prasannta,

There is no out of box connector available for our in house legacy application.

In the JSON configuration, no matter what bindings variable we use. it always just pass in whatever we input literally.  Can you try on your end with a very simple createAccount method that just print argument map?  the createAccount method and print argument code as below:

public String createAccount(Map<String, Object> args){
printArgumentData(args, "createAccount");
return "{\"message\":\"Failure\",\"description\":\"Failed on purpose\"}";
}
public void printArgumentMapData(Map<String, Object> mapData) {
StringBuffer sb = new StringBuffer("MyConnector.printMapData: \r\n");
if(mapData == null || mapData.isEmpty()) {
sb.append("passed in map object is empty");
}else {
Iterator<String> keyIterator = mapData.keySet().iterator();
while(keyIterator != null && keyIterator.hasNext()) {
String key = keyIterator.next();
Object obj = mapData.get(key);
String objClassName = obj.getClass().getName();
String objValue = obj.toString();
sb.append("argumentName: ").append(key).append(" | ")
.append("argumentType: ").append(objClassName).append(" | ")
.append("argumentValue: ").append(objValue).append("\r\n");
}
}
System.out.println(sb.toString());
}

prasannta
Saviynt Employee
Saviynt Employee

Have added anything in your connection JSON? The createaccountJson will pick values target host, admin, password from that and pass the value to createaccountJson. I am attaching a sample customConnector for your reference. You can also refer this for development.