Can anyone please help me understand why am I getting this error in Cloud Rule?
sailpoint.tools.GeneralException:
BeanShell script error: Sourced file: inline evaluation of:
`` import sailpoint.object.*; import sailpoint.object.Pro . . . '' :
Typed variable declaration : Error in method invocation:
Static method asList( java.lang.String ) not found in class'java.util.Arrays' :
at Line: 59 : in file: inline evaluation of:
`` import sailpoint.object.*; import sailpoint.object.Pro . . . '' :
Arrays .asList(attributeValue)
BSF info: MyCloudRuleBeforeProvisioning at line: 0 column: columnNo
attributeValue is of type String
Any help is appreciated
atarodia1
(Animesh Tarodia)
July 26, 2023, 2:39pm
2
Hi @iamnithesh ,
I believe instead of String it is expecting an Array.
String a[] = new String[] { "A", "B", "C", "D" };
// Getting the list view of Array
List<String> list = Arrays.asList(a);
// Printing all the elements in list object
System.out.println("The list is: " + list);
That is what I am not able to understand why… If you look at the asList() method in Arrays class in java.util.Arrays it is
@SafeVarargs
@SuppressWarnings("varargs")
public static <T> List<T> asList(T... a) {
return new ArrayList<>(a);
}
which should accept either a String
or String[]
I am wondering if it is because of the version of SDK used by SailPoint? I tested it in SDK 1.8 @8 on Intellij and passing a String worked fine
atarodia1
(Animesh Tarodia)
July 26, 2023, 3:03pm
4
I tried the beanshell evaluator. That works fine too
This seems very strange behavior.
system
(system)
Closed
September 24, 2023, 3:04pm
5
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.