on 05-07-2013 9:13 AM
Hi
I took reference from the link and followed relevant steps applicable to deploy custom validation ear file
I am calling the class testcustomer.idm.impl.MyOnSubmit on user create. This onSubmit method is taken from the pdf. Here logic is to make sure that mobile phone number is prefixed with the international country code if it is missing.
When i try now to create a user it gives below error in UI
"Could not check if values are valid"
Can anyone please advice where it went wrong and how to fix it ?
Thanks
Karthik
Hi Karthikeyan,
There are two possible reasons:
- first one, as Peter says, is exception in Java class
- the second one is if you forget to add the class path in Class Path Extension (JAVA tab) configuration of IDM management console
Best regards,
Ivan Petrov
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Code is pasted as above. Not sure if there is any problem in it really as i could see in the logs following exception "Could not find validator: testcustomer.idm.impl.MyOnSubmit"
What JAVA TAB should i check here ? Is the Result Handling tab in the task or something else ? (Referencing the class from the task configuration)
Yes. I copied the code from PDF
package testcustomer.idm.impl;
import com.sap.idm.extension.TaskProcessingAdapter;
import java.util.Locale;
import com.sap.idm.extension.IdMExtensionException;
import com.sap.idm.extension.api.IdMSubmitData;
import com.sap.idm.extension.api.IdMValueChange;
import com.sap.idm.extension.api.Task;
public class MyOnSubmit extends TaskProcessingAdapter {
/**
* This onSubmit method makes sure that the mobile phone
* number is prefixed with the international country code
* if it is missing (here "+47").
*/
public IdMValueChange[] onSubmit(Locale locale, int subjectMSKEY, int
objectMSKEY, Task task, IdMSubmitData validate)
throws IdMExtensionException {
IdMValueChange[] changes = validate.getChangeList();
for (int i = 0; i < changes.length; i++) {
IdMValueChange aIdmValueToFix = changes[i];
String aAttr = aIdmValueToFix.getAttributeName();
if (aAttr.equalsIgnoreCase("MX_MOBILE_PRIMARY")) {
String aValue =
aIdmValueToFix.getAttributeValue().trim();
// Add international prefix if missing
if (!aValue.startsWith("+")) {
aValue = "+47 " + aValue;
aIdmValueToFix.setAttributeValue(aValue);
}
}
}
return changes;
}
}
Can you please advise where its going wrong here ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you copy and paste directly from the document?
I assume that the error message is the default IdMExtensionException in which case there's probably a problem with the java code...
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.