留言板

Liferay workflow user notification

thumbnail
Zsolt - Jácint Balogh,修改在8 年前。

Liferay workflow user notification

Junior Member 帖子: 91 加入日期: 13-10-9 最近的帖子
Hi all,

I have a custom entity and the workflow is enabled for that.
When a new item is created a new user notification is created.
When a user with the required role approves the modifications on the object the user notification remains there.
How can I remove the old read user notifications?

Regards,
Zsolt
thumbnail
Zsolt - Jácint Balogh,修改在8 年前。

RE: Liferay workflow user notification (答复)

Junior Member 帖子: 91 加入日期: 13-10-9 最近的帖子
Issue resolved with dynamic query.

        String searchKey = "%\"entryClassPK\":\"" + resourcePrimKey + "\"%";
        DynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass(UserNotificationEvent.class);
        dynamicQuery.add(RestrictionsFactoryUtil.like("payload", searchKey));


Items removed with:

UserNotificationEventLocalServiceUtil.deleteUserNotificationEvents


I think a job would be handy to clear the usernotificationevent table from time to time because that is growing fast.
Maíra Araújo,修改在7 年前。

RE: Liferay workflow user notification

New Member 帖子: 10 加入日期: 16-4-18 最近的帖子
Hi, Zsolt.

You solved the following scenario: you have more than one user with a role and when one of them approves (or do something on workflow), you delete the notification of the others users, right?