Unable to Send notification when the knowledge article is outdated

Snehal Madakatt
Mega Sage

Hi All,

How is the workflow article state set to outdated? from where is this happening?

I want to trigger notification when the article becomes outdated, I tried all the ways but as the system fields are not updated when the workflow changes to outdated, I am unable to trigger this notification, 

 

Note: the outdated notification should trigger on the most recent kb that became outdated,

 

can someone help me on this. I tried below, but its not working.

SnehalMadakatt_1-1693216251601.png

 

SnehalMadakatt_0-1693216234581.png

 

 

4 REPLIES 4

manjusha_
Kilo Sage

@Snehal Madakatt 

 

Why you need business rule to trigger notification?

You can simply configure a notification with condition as workflow changes to Outdated 

Whenever an article is outdated a notification will get triggered.

 

In your business rule condition you mentioned workflow changes to published ,actually it should be workflow changes to outdated 

 

If you want to go with business rule ,use async business rule not after rule as user does not need to wait for its execution.

 

Let me know if you need more help

 

If my answer solved your issue, please mark my answer as Correct & 👍Helpful based on the Impact

 

Thanks,

Manjusha Bangale

 

 

Why you need business rule to trigger notification? -- as the system fields are not getting updated(sys_updated_on)

You can simply configure a notification with condition as workflow changes to Outdated --I had tried this but its not working as the sys_updated_on is not getting updated.

 

In your business rule condition you mentioned workflow changes to published ,actually it should be workflow changes to outdated -- I have tried this, but not getting triggered, so what i am doing is when the article is published, check for KB with same number with outdated state, and pick the topmost KB.

 

Can u try to configure this outdated notif, u will come to know what i mean.

 

Harish Kota
Kilo Sage

Hi @Snehal Madakatt 

 

Please change the When to run condition to - Workflow Changes to Outdated.

Outdated will happen once you are republishing the Article or after Retirement you are going to Publish again, between these a New version of Article will create and old version KB will outdated then the notification will trigger.

 

OR based on valid date also, it will outdate.

 

If you found this Information is useful, Please Accept as solution and hit like.

 

Thanks

Harish Kota

_Saqlain_
Tera Contributor
 Write After BR to check KB articles with outdated versions and trigger event for latest outdated one PFB script:

var kbNumber = current.number;

 

    var latestVersion = new GlideRecord('kb_knowledge');
    latestVersion.addQuery('number', kbNumber);
    latestVersion.addQuery('active', true);
    latestVersion.orderByDesc('sys_created_on');
    latestVersion.setLimit(1);
    latestVersion.query();

 

    if (latestVersion.next()) {
        var outdatedVersion = new GlideRecord('kb_knowledge');
        outdatedVersion.addQuery('number', kbNumber);
        outdatedVersion.addQuery('sys_id', '!=', latestVersion.sys_id);
        outdatedVersion.addQuery('active', true);
        outdatedVersion.orderByDesc('sys_created_on');
        outdatedVersion.setLimit(1);
        outdatedVersion.query();

 

        if (outdatedVersion.next()) {
            gs.eventQueue('Event_name', outdatedVersion, outdatedVersion.sys_id, outdatedVersion.version.getDisplayValue());
        }
    }
 
If you found this Information is useful, Please Accept as solution and hit like.