[midPoint] Scripting Hook | delete attribute values after changing organization

Arnošt Starosta - AMI Praha a.s. arnost.starosta at ami.cz
Thu Oct 26 19:46:50 CEST 2017


You can use an ItemPath like this

new ItemPath(PrismConstants.EXTENSION_LOCAL_NAME, new QName('http://your
extension namespace', attributeName))

If you added your extension attribute in the example xsd provided with the
overlay project and didn't change the namespace, the default namespace is '
http://example.com/xml/ns/midpoint/schema/extension-3'.

arnost

2017-10-26 18:31 GMT+02:00 Marco Benucci <m.benucci at nsr.it>:

> Thank you for your reply.
>
> I'm doing this right now!
>
> How can I add the modificationDeleteProperty of a customAttribute? I'm
> having troubles with it ItemPath and QNames...
>
>
>
> Il 26 ott 2017 6:21 PM, Arnošt Starosta - AMI Praha a.s. <
> arnost.starosta at ami.cz> ha scritto:
>
> Hi Marco,
>
> i sometimes inject changes in the primary delta. is that a good practice?
> don't know, but it works
>
> mod = ObjectDelta.createModificationDeleteProperty(...)
> primary.swallow(mod)
>
> ?
>
> if this does not work, try to tell midpoint to recompute the context with
>
> modelContext.rot()
>
> hope this helps
>
> arnost
>
> 2017-10-26 15:42 GMT+02:00 Marco Benucci <m.benucci at nsr.it>:
>
>> Hi,
>>
>> we are running midPoint 3.6 and we'd like to remove the value of a
>> multi-valued extion-attribute named "documentalVisibility" when another
>> extension-attribute (named primaryOrganization) is changed.
>>
>> I thought that we could use https://wiki.evolveum.com/
>> display/midPoint/Scripting+Hooks.
>>
>> We can check if the attribute primaryOrganization is changed looking in
>> modelContext.getPrimaryChanges(),
>> but we cannot recreate a delete delta that can be used in the
>> modelContext.getFocusContext().swallowToSecondaryDelta()...
>>
>> Can you help me?
>>
>> Thank you,
>> Marco
>>
>>
>>
>> _______________________________________________
>> midPoint mailing list
>> midPoint at lists.evolveum.com
>> http://lists.evolveum.com/mailman/listinfo/midpoint
>>
>>
>
>
> --
>
> Arnošt Starosta
> solution architect
>
> gsm: [+420] 603 794 932 <+420%20603%20794%20932>
> e-mail: arnost.starosta at ami.cz
>
>
> AMI Praha a.s.
> Pláničkova 11
> 162 00 Praha 6
> tel.: [+420] 274 783 239 <+420%20274%20783%20239>
> web: www.ami.cz
>
>
> [image: AMI Praha a.s.]
>
> [image: AMI Praha a.s.]
> <http://www.ami.cz/reseni-a-sluzby/bezpecnost-dat/identity-management>
>
> Textem tohoto e-mailu podepisující neslibuje uzavřít ani neuzavírá za
> společnost AMI Praha a.s.
> jakoukoliv smlouvu. Každá smlouva, pokud bude uzavřena, musí mít výhradně
> písemnou formu.
>
>


-- 

Arnošt Starosta
solution architect

gsm: [+420] 603 794 932
e-mail: arnost.starosta at ami.cz


AMI Praha a.s.
Pláničkova 11
162 00 Praha 6
tel.: [+420] 274 783 239
web: www.ami.cz


[image: AMI Praha a.s.]

[image: AMI Praha a.s.]
<http://www.ami.cz/reseni-a-sluzby/bezpecnost-dat/identity-management>

Textem tohoto e-mailu podepisující neslibuje uzavřít ani neuzavírá za
společnost AMI Praha a.s.
jakoukoliv smlouvu. Každá smlouva, pokud bude uzavřena, musí mít výhradně
písemnou formu.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20171026/cad0eb63/attachment.htm>


More information about the midPoint mailing list