[midPoint] simpleWorkflowNotifier sends 3 emails. How to only send 1 email?

Hsin-Fang Hsu hsin-fang.hsu at itconcepts.ch
Wed Nov 23 08:09:19 CET 2022


Hi Rok,

Thank you very much. This is exactly what I need!

Best regards,
Hsin-Fang

From: midPoint <midpoint-bounces at lists.evolveum.com> On Behalf Of Rok Mori via midPoint
Sent: Wednesday, November 23, 2022 7:17 AM
To: midPoint General Discussion <midpoint at lists.evolveum.com>
Cc: Rok Mori <Rok.Mori at cablex-group.com>
Subject: Re: [midPoint] simpleWorkflowNotifier sends 3 emails. How to only send 1 email?

Hello.

Maybe this will help you. By default the simpleWorkflowNotifier is quite spammy, for example the assignee will get two notifications: case open and case assigned. This is the configuration I use that only sends notification to the assignee when they get assigned a case and to the original requestor once it's finished.

            <simpleWorkflowNotifier>
                <name>Work completion notifier</name>
                <description>Initiator of request is notified when a approval or manual case is ended.</description>

                <category>workflowProcessEvent</category>
                <expressionFilter>
                    <script>
                        <code>event.isDelete()</code>
                    </script>
                </expressionFilter>

                <transport>file</transport>
                <!--                <transport>mail</transport>-->
            </simpleWorkflowNotifier>

           <simpleWorkflowNotifier>
                <name>Work assigned notifier</name>
                <description>Person who gets assigned for a task (approval case or manual work item) gets notified.
                </description>

                <category>workItemAllocationEvent</category>
                <expressionFilter>
                    <script>
                        <code>event.isAdd()</code>
                    </script>
                </expressionFilter>

                <transport>file</transport>
                <!--                <transport>mail</transport>-->
            </simpleWorkflowNotifier>



From: midPoint <midpoint-bounces at lists.evolveum.com<mailto:midpoint-bounces at lists.evolveum.com>> On Behalf Of Fabian Noll-Dukiewicz via midPoint
Sent: Tuesday, November 22, 2022 3:53 PM
To: midPoint General Discussion <midpoint at lists.evolveum.com<mailto:midpoint at lists.evolveum.com>>
Cc: Fabian Noll-Dukiewicz <fabian.noll-dukiewicz at veryfy.gmbh<mailto:fabian.noll-dukiewicz at veryfy.gmbh>>
Subject: Re: [midPoint] simpleWorkflowNotifier sends 3 emails. How to only send 1 email?

Hi,

the <simpleWorkflowNotifier> is used to send the default mails. One mail is send to the approver and one mail is send to the requester. I think if there are more than one approver, every approver will receive an email notification. See the documentation: Workflow notifications<https://docs.evolveum.com/midpoint/reference/cases/workflow-3/workflow-notifications/#some-examples>.

Kind regards,
Fabian

Fabian Noll-Dukiewicz
Spezialist Identity & Access Management | Geschäftsführer
Tel.: +49 152 244 63 211
Email: fabian.noll-dukiewicz at veryfy.gmbh<mailto:fabian.noll-dukiewicz at veryfy.gmbh>
Web: https://veryfy.gmbh


Von: midPoint <midpoint-bounces at lists.evolveum.com<mailto:midpoint-bounces at lists.evolveum.com>> im Auftrag von Hsin-Fang Hsu via midPoint <midpoint at lists.evolveum.com<mailto:midpoint at lists.evolveum.com>>
Datum: Dienstag, 22. November 2022 um 15:26
An: midPoint General Discussion <midpoint at lists.evolveum.com<mailto:midpoint at lists.evolveum.com>>
Cc: Hsin-Fang Hsu <hsin-fang.hsu at itconcepts.ch<mailto:hsin-fang.hsu at itconcepts.ch>>
Betreff: [midPoint] simpleWorkflowNotifier sends 3 emails. How to only send 1 email?
Hi,

I set up a <simpleWorkflowNotifier> but it always sends 3 emails every time a role that requires approval is requested.
I tested with <simpleFocalObjectNotifier> for role and it only sends 1 email as expected.

Does anyone know how to make simpleWorkflowNotifier only send 1 email?

Thanks for your help in advance!

Best regards,
Hsin-Fang

Here is the code:
<handler>
    <simpleWorkflowNotifier>
        <name>send update</name>
        <operation>add</operation>
        <recipientExpression>
            <value>idm at example.com</value<mailto:idm at example.com%3c/value>>
        </recipientExpression>
        <subjectExpression>
            <value>case event</value>
        </subjectExpression>
        <bodyExpression>
            <script>
                <code>
                    return "here is send update body"
                </code>
            </script>
        </bodyExpression>
        <transport>mail</transport>
    </simpleWorkflowNotifier>
</handler>


<handler>
    <simpleFocalObjectNotifier>
        <name>role change</name>
        <focusType>RoleType</focusType>
        <recipientExpression>
            <value>idm at example.com</value<mailto:idm at example.com%3c/value>>
        </recipientExpression>
        <subjectExpression>
            <value>role event</value>
        </subjectExpression>
        <bodyExpression>
            <script>
                <code>
                    return "here is role change body"
                </code>
            </script>
        </bodyExpression>
        <transport>mail</transport>
    </simpleFocalObjectNotifier>
</handler>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20221123/488cbfe6/attachment-0001.htm>


More information about the midPoint mailing list