One Identity Manager - Send Email On Deletion of PersonHasQERResource

I need to send a email when a QERResource assignment is deleted. So I made a email template using PersonHasQERResource and my first thought was to assign it to a custom process for PersonHasQERResource on the Delete event. However, its deleted before this is triggered - so the email template fails. So I tried the Remove event but its still deleted before the email is called as the QBMDBQueueProcess fires before anything else. Now I am thinking I will have to write a script to send the email. How can I send a email in a script using the email template? I do not see that documented or in the provided script examples. Or is there a another way to trigger the SendRichMail option with a deleted resource assignment?

This is OneIM 8.1.5

  • Did you mark the table PersonHasQERResource with "Assign by event" in the Designer?

    Or, if you want to use information from the already deleted entry in the email template, you need to assign an ObjectSnapshot instead of the XObjectKey in the process step parameter BaseObject.

    You should find an example in the process "VI_ESS_PersonWantsOrg send mail when step not granted".

    The snapshot will be generated in the pre-script of the process like this:

    Values("originalPersonHasQERResource") = EntityPatch.Create(Entity, Session.MetaData(), DiffMode.AllContent).ToXml()

    And the parameter BaseObject at the process step is then defined as:

    Value = Values("originalPersonHasQERResource")