Demand Approval by Stakeholders

mike_bush
Kilo Guru

I'm starting to get to grips with Fuji Demand Management but wonder if am missing something?

I can attach Stakeholders based on the Portfolio - good.

These people can be marked as "Assessment Recipient" and they are sent questionnaires during the "Screening" stage - excellent.

They can also be marked as "Approvers" - BUT - I can find no way of getting Approvals sent out to them automatically when I move to "Qualified"?

So - what am I missing?

Mike

1 ACCEPTED SOLUTION

amkatulak
Giga Expert

Actually, I remember having the same issue.   There is a business rule that runs on the task table called 'Moot Approvals Upon Cancellation' that cancels approvals when the state of a task record changes to '4'.   '4' is usually 'Closed Complete' but for the demand table it is 'Qualified'.   I edited that business rule's condition to tell it to not run if the task_type is demand.   Try that out and see if it works for you as well.


View solution in original post

9 REPLIES 9

amkatulak
Giga Expert

Actually, I remember having the same issue.   There is a business rule that runs on the task table called 'Moot Approvals Upon Cancellation' that cancels approvals when the state of a task record changes to '4'.   '4' is usually 'Closed Complete' but for the demand table it is 'Qualified'.   I edited that business rule's condition to tell it to not run if the task_type is demand.   Try that out and see if it works for you as well.


Brilliant!



AND there is a "rogue" BR which was killing my Workflow - "Cancel Workflows Upon Cancellation" which has a long list of excluded tables for state=4 and needed dmn_demand added.



(They've basically screwed the design up at this point if you'll excuse my language)



Anyway, thanks again, have more brownie points


m_murphy
ServiceNow Employee
ServiceNow Employee

To leverage the approval settings for Demand stakeholders, here's a step-by-step guide to configure approval requests using the OOB approval engine (once a Demand moves to the Qualified state)



Step 1 — Approval Engine
Navigate to System Properties -> Approval Engines
Update Demand Approval Engine to: Approval Rules



Step 2 — Create Business Rule (Demand Approval Request)
Table: dmn_demand
When to Run: (After) State changes to Qualified
Advanced Script:


var grStakeHolder = new GlideRecord('dmn_stakeholder_register');


grStakeHolder.addQuery('portfolio',current.portfolio);


grStakeHolder.addQuery('approver','yes');


grStakeHolder.query();


while (grStakeHolder.next()) {


  //gs.log('Found an approver for demand ' + current.name);


  var grApproval = new GlideRecord('sysapproval_approver');


  grApproval.initialize();


  grApproval.approver = grStakeHolder.user;


  grApproval.state = 'requested';


  grApproval.sysapproval = current.sys_id;


  grApproval.insert();


}



Step 3 — Create Business Rule (Set Demand to Approved)


Table: dmn_demand
When to Run:
(After) Approval changes to Approved
Set Field Values: State to Approved




Step 4   (Optional) — Add Approvers Related list to Demand Form


On the Demand form, click the action icon and select Configure -> Related List


Add the Approvers list to the Selected column.


I know this is an old post but I was looking for information for approvers. In order to approve demand, do we need any role like a business stakeholder?

Marco Nappo_
Mega Guru

Thank you murphy, I wrote an article about that in the community with an update set related implementation: https://community.servicenow.com/community?id=community_article&sys_id=7165e88ddbc663c0fb4ae15b8a961...