Workflow

roomawakar
Tera Contributor

Hi All,

 

I have a requirement to trigger a task in the workflow once all the below conditions are matched:

 

1. TASK A gets completed

2. TASK B gets completed

3. TASK C gets Completed (if triggers) - This task triggers based on the user selected of Yes/No. If Yes is selected then only TASK C triggers.

4. TASK 4 gets Completed (if triggers) - This task triggers based on the some question choice selection. For 2 choices, it triggers for other 4 doesn't.

 

How to achieve this requirement in the workflow. Can someone please help me out.

 

Thanks,

Rooma

5 REPLIES 5

Quinten
Tera Guru

One way to achieve this would be to use a variable hidden on the request form, then use a catalog UI policy to hide/show the variables (run on sc_task). So the variable would only be visible/available on the catalog task.

IMPORTANT: When trying to use the value in the flow, you MUST use the get catalog variables again after updating the value and use the correct output to make use of it. It won't automatically update in your previously fetched variables.

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @roomawakar 

 

First, instead of using Workflow, try using Flow Designer. Second, what have you done so far on this? If you're looking for a complete solution, that’s fine, but it’s always good to explore options. The community is very helpful, so if you get stuck, share your screen and the team will assist.

Now, at a high level:

Trigger: Catalog item

Actions:

  1. Create Catalog Task 1
  2. Create Catalog Task 2
  3. Get Catalog Variable (In this step, get the value of Yes/No)

Logic:

  • If value = Yes:
    • Action: Create Catalog Task 3
  • If value = No:
    • End

Logic:

  • Get Catalog Variable (Choices)
    • Action: If choice is A or B:
      • Action: Create Catalog Task 4
    • Else:
      • End"

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

@Dr Atul G- LNG Thanks for your reply. This is just one part of the workflow where I am enhancing it. It is not new workflow which I am building it from scratch.

 

As mentioned in the description, I need to triggers a TASK called ABC once all the 4 tasks gets triggers.

All those 4 tasks are already there in the WF.

 

but here the challenge which I am facing here is: the 3rd and 4th task doesn't trigger always.

I used join to wait for condition so that once all the 4 tasks gets completed then the ABC tasks gets triggered. But this scenario is only possible once all 4 tasks gets triggered.

 

How to achieve this if only 2 tasks or 3 tasks gets triggered? Wait for condition will wait for all 4 tasks to get completed and it will never go beyond this activity.

 

Hi @roomawakar 

 

This looks good, appreciate the details you've shared. So currently, tasks 3 and 4 are also getting triggered, and you want to wait until the 2nd task is closed before creating tasks 3 and 4? Could you please share the workflow screenshot and also explain how you are retrieving the variables in the workflow to check the condition for tasks 3 and 4?

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************