[midPoint] Template modification
Jan Kaspar
Caspi at seznam.cz
Tue Jan 23 07:32:00 CET 2018
Hi Oskar, all,
Yes i tryed this, but it didnt work. with that code:
<code>
import com.evolveum.midpoint.xml.ns._public.common.common_3.
AssignmentType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.
ObjectReferenceType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.RoleType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.OrgType;
import java.util.*;
log.warn("XXX assigning from SAP role {}" , ADGroup)
if (ADGroup != null){
orgName = ADGroup;
org = midpoint.searchObjectByName(RoleType.class, orgName);
if (org != null)
{
log.info("org {}" , org)
orgOrt = new ObjectReferenceType();
orgOrt.setOid(org.getOid());
orgOrt.setType(RoleType.COMPLEX_TYPE);
AssignmentType assignment = new AssignmentType();
assignment.asPrismContainerValue()
assignment.setTargetRef(orgOrt);
return assignment
}
}
</code>
I got error:
Operation
Reconcile user (Gui): {0}
Message
Couldn't reconcile user user:08c284d4-8bc8-4b1a-a598-785773c51d62(ales.
levinsky).
Error
groovy.lang.MissingMethodException: No signature of method: org.codehaus.
groovy.jsr223.GroovyScriptEngineImpl.If() is applicable for argument types:
(java.lang.Boolean, Script31$_run_closure1) values: [true, Script31$_run_
closure1 at 2eb5683] Possible solutions: find(), any(), is(java.lang.Object),
wait(), dump(), grep() in expression in mapping in inbound expression for
{http://midpoint.evolveum.com/xml/ns/public/resource/instance-3}memberOf in
resource:746ecf5e-3e8c-11e6-b2f9-3c970e44b9e2(BLUED (LDAP))({.../common/
common-3}input=CN=POS_AX_ADMINS,OU=Groups,OU=CZ,DC=domain,DC=local; ) in
expression in mapping in inbound expression for {http://midpoint.evolveum.
com/xml/ns/public/resource/instance-3}memberOf in resource:746ecf5e-3e8c-11e
6-b2f9-3c970e44b9e2(BLUED (LDAP))
Any idea? I fouind some things on internet about bug in groovy. But without
solution for now.
Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20180123/74e7594a/attachment.htm>
More information about the midPoint
mailing list