[midPoint] Trouble deleting user (v3.7.2)

Wojciech Staszewski wojciech.staszewski at diagnostyka.pl
Tue Jun 26 23:07:23 CEST 2018


Hello!

I try to delete user but I get an error.
The error comes from pre-iteration expression of one of assigned resources.

Error:
Couldn't delete user.
Message
java.lang.NullPointerException: Cannot invoke method getAt() on null
object in (new) pre-iteration expression in account(ID
{.../connector/icf-1/resource-schema-3}uid = [ 94740706 ], type 'AAA',
resource:xxx-oid-xxx(resource name))
Parameters
options   
[ModelExecuteOptions(executeImmediatelyAfterApproval=false,force=false,reconcile=false,reconcileAffected=false)]
Error
java.lang.NullPointerException: Cannot invoke method getAt() on null
object in (new) pre-iteration expression in account(ID
{.../connector/icf-1/resource-schema-3}uid = [ 94740706 ], type 'AAA',
resource:xxx-oid-xxx(resource name))

I have no "getAt()" method in the expression.
The pre-iteration expression:

            <preIterationCondition>
               <variable>
                  <name>firstname</name>
                  <c:path>$shadow/attributes/ri:firstname</c:path>
               </variable>
               <variable>
                  <name>surname</name>
                  <c:path>$shadow/attributes/ri:surname</c:path>
               </variable>
               <variable>
                  <name>login</name>
                  <c:path>$shadow/attributes/ri:login</c:path>
               </variable>
               <script xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                       xsi:type="c:ScriptExpressionEvaluatorType">
                  <code>
                      def (firstfamilyname,secondfamilyname) =
user?.getFamilyName()?.toString()?.tokenize('-');
            def templogin =
basic.norm(user?.getGivenName()?.toString()?.replace("Ł","L")?.replace("ł","l")?.toString()?.take(1))?.toUpperCase()
+
basic.norm(firstfamilyname?.replace("Ł","L")?.replace("ł","l"))?.toString()?.toUpperCase()
+ iterationToken;
            return midpoint.isUniqueAccountValue(resource, shadow,
'login', templogin);
        </code>
               </script>
            </preIterationCondition>

This expression takes first letter of the user given name, whole first
family name (both normalized), example: Anna Smith-Wilson = ASMITH and
checks if this calculated login exists in the resource.

The resource has "disable instead delete" mechanism applied taken from
training labs materials.

Questions:

1) Why midPoint tries to delete account from this resource instead
disable and unassign it (disable instead delete)?
2) Why midPoint runs the pre-iteration condition on delete operation?
Isn't it a create operation specific expression?
3) Where to find getAt() method, as it is not present in the expression?

Thanks!
Wojciech Staszewski



More information about the midPoint mailing list