[midPoint] Workflow notification sending duplicate emails

Jussi Jokela jussi.jokela at fiarone.com
Thu Mar 31 10:06:47 CEST 2022


Okay, seems like the AllocationEvent works, but LifecycleEvent doesn't. midPoint gives the following error when trying to use LifecycleEvent:

"Cannot find enum value for string 'WorkItemLifecycleEvent' in class com.evolveum.midpoint.xml.ns._public.common.common_3.EventCategoryType"

However, I got the mails working now, using AllocationEvent as a second category. Here is the working config:

    <notificationConfiguration>
        <handler>
            <simpleWorkflowNotifier>
                <category>workflowProcessEvent</category>
                <transport>mail</transport>
            </simpleWorkflowNotifier>
        </handler>
        <handler>
            <simpleWorkflowNotifier>
                <category>workItemAllocationEvent</category>
                <transport>mail</transport>
            </simpleWorkflowNotifier>
        </handler>
    </notificationConfiguration>


So the first handler sends mail to requester, and the second sends mail to approver (allocated). Not sure if this the correct way, but atleast it works and removed the duplicate mails.

Thanks guys!


Best regards,
Jussi Jokela
________________________________
From: midPoint <midpoint-bounces at lists.evolveum.com> on behalf of Pavol Mederly via midPoint <midpoint at lists.evolveum.com>
Sent: Thursday, March 31, 2022 10:49
To: midpoint at lists.evolveum.com <midpoint at lists.evolveum.com>
Cc: Pavol Mederly <mederly at evolveum.com>
Subject: Re: [midPoint] Workflow notification sending duplicate emails


This is really strange. Categories of workItemAllocationEvent and workItemAllocationEvent should definitely work.

If not, please file a jira issue<https://docs.evolveum.com/midpoint/reference/diag/creating-a-bug-report/>.


Best regards,

--
Pavol Mederly
Software developer
evolveum.com

On 31/03/2022 09:43, Jussi Jokela via midPoint wrote:

Hi Pavel,

Yes, but those work item event categories don't work anymore (for filtering), and I still don't understand why the approver receives two mails when the work item is completed? Here is a screenshot with all the mails the approver receives during the process:

[cid:part1.RwUHAyf0.oYWRwKAd at evolveum.com]
​

Best regards,
Jussi Jokela
________________________________
From: midPoint <midpoint-bounces at lists.evolveum.com><mailto:midpoint-bounces at lists.evolveum.com> on behalf of Pavol Mederly via midPoint <midpoint at lists.evolveum.com><mailto:midpoint at lists.evolveum.com>
Sent: Thursday, March 31, 2022 10:10
To: midpoint at lists.evolveum.com<mailto:midpoint at lists.evolveum.com> <midpoint at lists.evolveum.com><mailto:midpoint at lists.evolveum.com>
Cc: Pavol Mederly <mederly at evolveum.com><mailto:mederly at evolveum.com>
Subject: Re: [midPoint] Workflow notification sending duplicate emails


Jussi,


have you read this? https://docs.evolveum.com/midpoint/reference/cases/workflow-3/workflow-notifications/


It may be slightly out of date but I hope it will answer your questions.


Best regards,

--
Pavol Mederly
Software developer
evolveum.com

On 31/03/2022 09:04, Jussi Jokela via midPoint wrote:
Hi Richard,

With the following configuration, the requester receives mail when the workflow process has started and finished, but the assignee still receives duplicate mails when the work item is started and also when finished (four mails total).

<notificationConfiguration>
    <handler>
        <simpleWorkflowNotifier>
            <transport>mail</transport>
        </simpleWorkflowNotifier>
    </handler>
</notificationConfiguration>

Seems like the requester receives the mail based on the workflow process ("Workflow process has been started/finished"), and the assignee based on the work item ("Work item has been created/allocated/completed")?

And we are using midPoint version 4.3.


Best regards,
Jussi Jokela
________________________________
From: Richard Richter <virgo at evolveum.com><mailto:virgo at evolveum.com>
Sent: Wednesday, March 30, 2022 17:57
To: midPoint General Discussion <midpoint at lists.evolveum.com><mailto:midpoint at lists.evolveum.com>
Cc: Jussi Jokela <jussi.jokela at fiarone.com><mailto:jussi.jokela at fiarone.com>
Subject: Re: [midPoint] Workflow notification sending duplicate emails

Hi Jussi

Please, send the relevant portion of the configuration and also state the version of midPoint used.

Thanks

Richard Richter
Software Developer
Evolveum

________________________________
From: "midPoint General Discussion" <midpoint at lists.evolveum.com><mailto:midpoint at lists.evolveum.com>
To: "midPoint General Discussion" <midpoint at lists.evolveum.com><mailto:midpoint at lists.evolveum.com>
Cc: "Jussi Jokela" <jussi.jokela at fiarone.com><mailto:jussi.jokela at fiarone.com>
Sent: Wednesday, March 30, 2022 2:12:09 PM
Subject: [midPoint] Workflow notification sending duplicate emails

Hi everyone,

We want to implement automated emails when users request new role assignments and I have used https://docs.evolveum.com/midpoint/reference/misc/notifications/configuration/ as an example.

However, when sending requests, the approver receives two different emails per request, titled "A new work item has been created" and "Work item has been allocated to you". also, the requester/requestee receives two emails when the request is approved/rejected, titled "Work item has been completed".

I have tried different status, category, operation etc. filters but without result. Any tips?


Ystävällisin terveisin / best regards,


Jussi Jokela
IAM Lead Developer
mobile: +358 50 511 3306
email: jussi.jokela at fiarone.com<mailto:jussi.jokela at fiarone.com>


Fiarone Oy
https://www.fiarone.com<https://www.fiarone.com/>
Postikatu 2
20250 Turku

[cid:part2.FhxkgnnJ.2BhCmu35 at evolveum.com]


_______________________________________________
midPoint mailing list
midPoint at lists.evolveum.com<mailto:midPoint at lists.evolveum.com>
https://lists.evolveum.com/mailman/listinfo/midpoint



_______________________________________________
midPoint mailing list
midPoint at lists.evolveum.com<mailto:midPoint at lists.evolveum.com>
https://lists.evolveum.com/mailman/listinfo/midpoint




_______________________________________________
midPoint mailing list
midPoint at lists.evolveum.com<mailto:midPoint at lists.evolveum.com>
https://lists.evolveum.com/mailman/listinfo/midpoint

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20220331/935c5df1/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 32316 bytes
Desc: image.png
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20220331/935c5df1/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-4vvulxqp.png
Type: image/png
Size: 15648 bytes
Desc: Outlook-4vvulxqp.png
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20220331/935c5df1/attachment-0003.png>


More information about the midPoint mailing list