How to add wait condition in flow designer until variable in sc_task table get updated?

Gopinath Krish1
Tera Contributor

Hi,

I have requirement to generate approval for sc_task, if variable in sc_task updated as 'true' then I should generate group approval for that task using flow designer. Can anyone help me to add wait condition until  variable got updated in sc_task?

Thanks in advance.

7 REPLIES 7

Kai Tingey
Tera Guru

if you are using a flow to create the catalog task:

 

set the create catalog task activity with wait = false, so it will proceed to the next step of the flow

add a wait for condition activity where it looks at the sc_task record and the condition is (your variable = whatever)

 

e.g.

KaiTingey_0-1698104705758.png

it will wait until that field is updated to the value you specify and then move on to the next activity, which you can make an ask for approval activity, and set the group accordingly.

 

Because 'wait' was deselected in the task creation, if noone is going to be actioning the catalog task beyond the approval, then you'll need to add an activity to update that record to state = complete or whatever fits your requirements.

 

if there is no flow until approval is required, then you can just set the trigger to record updated , table = sc_task, filter (your variable = whatever).

 

hope that helps

I am trying to find a replacement for the SCTask that I was initially using. The client doesn't like sctasks and wants everything to be done on the ritm. I cannot use the wait for condition traditionally as you have to use a record to wait for a field to be a certain value and catalog variables although linked to ritms they aren't on that table. I don't want to use a BR to update a ritm field as I don't want to add custom fields or use an oob one to fill this purpose. I cannot find a way to pause (in effect) the flow while the needed catalog variables are not yet updated. 

I still think business rule is the better option. You cant access the variables in the wait for condition action gui. You may be able to use the script editor in the wait for condition action, but just playing around with it now - i didn't have much success - it doesn't seem to be very straightforward, but you may have more luck than me.

 

There are lots of OOB fields on sc_req_item you could populate with some hidden value. You dont need to build a new field for it. Pick one that is not visible on the form design and noone will ever know šŸ™‚ It could be as simple as changing something that isn't being used like 'billable' to true when the variable is filled, and then switching it back to false in the flow immediately after the wait for condition action has completed. The perfect crime šŸ™‚