Knowledge Article expiry notification process - new author issue

Rob Sestito
Mega Sage

Hey SN Comm Team,

So, I had opened a case with SN on this one since it is all an OOTB process. They got back to me with a proposed solution. Basically, they said that normally their best practice for article author is for that never to change. That is why OOTB the author field is hidden - but I feel that the author changing is pretty normal. When someone moves on out of the company or to another group, an article they created and became author for may not apply to them anymore when they change groups/positions/etc.. And of course if they leave the company then the article has nothing to do with them at all.

There is also a before inset business rule that controls the auto-subscription when someone becomes the author, reviser, and group owner.

Name: Auto subscribe author, reviser, & kb owner

(function executeRule(current, previous /*null when async*/) {
	
	if(gs.getProperty('glide.knowman.enable_km_subscription', 'true') == 'false') 
		return;
		
	var context = new ActivitySubscriptionContext();
	if(!current.article_id.nil()) {
		var knowledge_gr = new GlideRecord('kb_knowledge');
		knowledge_gr.addActiveQuery();
		knowledge_gr.setWorkflow(false);
		knowledge_gr.addQuery('article_id',current.article_id);
		knowledge_gr.orderByDesc('sys_created_on');
		knowledge_gr.query();
		if(knowledge_gr.next()){
			var subscription_gr = new GlideRecord('sn_actsub_subobject_stream');
			subscription_gr.addQuery('sub_obj_id',knowledge_gr.sys_id);
			subscription_gr.query();
			while(subscription_gr.next()) {
					context.getSubscriptionService().subscribeUser('7d8f537453003200fa9bd7b08cc5872c',current.sys_id,subscription_gr.subscriber_id.document);	
			}
			context.getSubscriptionService().subscribeUser('7d8f537453003200fa9bd7b08cc5872c',current.sys_id,current.revised_by);
		}
	}
	else {
		// for the newly created articles
		context.getSubscriptionService().subscribeUser('7d8f537453003200fa9bd7b08cc5872c',current.sys_id,current.author);
	}

})(current, previous);


SN has informed me of their suggestion that I can unhide the author name (already a thing for us), but it still does not apply with the business rule doing its job.

So, anyone know what I can do to this business rule to include when/if the author changes to someone new?

We would like to keep this process as it works very well, just not when the author changes which I feel is pretty common (with my given scenarios above).

Thank you in advance,

-Rob

1 ACCEPTED SOLUTION

Hey Lesley,

I built a Flow from Flow Designer and needed help. With the help of @Logan Poynter and his blog post Flow Designer Demo: Automate Knowledge Expiration Warning - I was able to achieve what I wanted and needed.

Highly, highly recommend it - this way is nice and clean, and able to hit current author. A lot of users that revise articles are just helping out and do not need to know what an article is retiring. So with this, we can just have the author and knowledge group managers know which articles are coming up for retirement.

Many do not like the auto-subscription method. Does not make sense in our world - but, this is personal preference.

Check out the post I reference, and let me know if you need additional help.

Cheers,

-Rob

View solution in original post

7 REPLIES 7

Hey Lesley, (sorry for the delay)

I received some help on this and am taking a different route.

We designed a Flow Designer workflow to handle the process now. I am still in testing mode, but it will certainly take care of sending the notification to the current author which was a huge deal.

We are in talks with the rest of the teams that use this process, to make sure all who receive the notification via OOTB process, still want to receive these.

Author is the main person who should, manager of the group is another main person (maybe). A person who revises an article does not need this notification. We have some people who may help out authors and change one small thing to an article. After that, they do not need to know when it is expiring.

So, I am looking to retire (no pun intended - haha) the OOTB process and use the Flow Designer workflow created instead.

Thanks,

-Rob

Haha great "retire" pun.

This sounds very interesting, Rob. Would love to hear what kind of worklfow you're thinking of if you're willing to share and testing is successful. 

Hey Lesley,

I built a Flow from Flow Designer and needed help. With the help of @Logan Poynter and his blog post Flow Designer Demo: Automate Knowledge Expiration Warning - I was able to achieve what I wanted and needed.

Highly, highly recommend it - this way is nice and clean, and able to hit current author. A lot of users that revise articles are just helping out and do not need to know what an article is retiring. So with this, we can just have the author and knowledge group managers know which articles are coming up for retirement.

Many do not like the auto-subscription method. Does not make sense in our world - but, this is personal preference.

Check out the post I reference, and let me know if you need additional help.

Cheers,

-Rob