How to set Approve on Order Guide - Request?

toneyvecchio1
Tera Expert

Greetings!

 

I was wondering if I could get any insight of how to work towards setting an approver prior to an Order Guide kicking off its child Request Items/Catalog Items. I know I can set workflows at the Catalog Item but that can give 4 separate approvals with 4 different items in some scenarios - I am looking to gate the request until approval.

 

I have added a ref field on the Req to show the originating Order Guide (Based on: » This Blog post)

SN-1-OrderGuideField.png

I went to System Policy > Rules > Approval where I constructed a new Approval Rule, with first Order

SN-1-ApprovalRule.png

I even had my ah-hah moment when I found a setting and thought I had it @ Catalog Policy > Properties

SN-1-ApprovalOn.png

 

Yet my Request ends up with State "Approved". Am I approaching this the wrong way? Missing something?

3 REPLIES 3

BryanS413339635
Tera Guru

Did you ever get a solution for this? I have a very similar requirement.


Unfortunately no new info, we ended up changing focus of SN development towards other modules and hope to return to Order guides and Service Catalog in the future.


Bishnu Prasad
Kilo Explorer

It’s a workaround instead of configuring approval on Request level.

Lets say we have 2 RITMs under an Order guide, you want to run the approvals/not to set approvals of 2nd RITM based on first RITM.

Create a business rule to query the current request number in requested item table, condition =   after update.

Sample  :

var item1 = current.cat_item.getDisplayValue();

                if (item == 'First item name where you want to put approval’)

                                {

                                                var REQ = current.request.sys_id;

                                                var stage = current.stage;

                                               

                                                if(stage == 'fulfillment')

                                                                {

                                                                                var item2 = new GlideRecord('sc_req_item');

                                                item2.addQuery('request',REQ);

                                                item2.addQuery('short_description','2nd item name, where ');

                                                item2.query();

                                                if(item2.next())

                                                                {

                                                                               

                                                                                var number = item2.number;

                                                                                item2.state = '168'; // it will set the 2nd RITM’s state into In progress

                                                                                item2.update();

                                                       }

                                                      }

 Now in 2nd RITM’s workflow, put a timer of your choice, and check for the condition (if state == ‘In progress), so once the first RITM will be approved, it will set the 2nd RITM state into In progress and hence your tasks will be triggered without asking for any approval.

 

 

find_real_file.png

So, in short you will have to approve your One RITM , and for rest of RITMs you can directly create catalog tasks.