flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2024 04:16 AM
Hi all,
I need a help . I got a requirement from client to create the following use cases via flow designer.
1. There is a variable in the catalog form called "xyz" with choices "abc" , "def" , "ghi". (xyz is a list collector). Once the user fills all the fields and submit the request , it will create an ritm. After submitting the request,
If "xyz" is "abc" then it should create one catalog task.
If "xyz" is "abc" , "def" then it should create 2 catalog tasks.
If "xyz" is "abc" , "def" , "ghi" then it should create 3 catalog tasks.
2. Once all the tasks are closed complete then it should trigger 3 level approvals.
Can someone help me on this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2024 08:22 AM
Hi @karunasrikuna,
Create Catalog Tasks Based on List Collector Choices:
Create a Flow:
- Go to Flow Designer > Designer and create a new flow.
- Set the trigger to Catalog Item Requested for the specific catalog item.
Add an Action to Create Tasks:
- Add a Script action.
- Use this script to create tasks based on the selected values of the "xyz" variable:
(function execute(inputs, outputs) {
var xyzValues = inputs.xyz.split(','); // Assuming xyz is a comma-separated string
var taskCount = xyzValues.length;
for (var i = 0; i < taskCount; i++) {
var task = new GlideRecord('sc_task');
task.initialize();
task.short_description = 'Task for ' + xyzValues[i];
task.request_item = inputs.request_item_sys_id;
task.insert();
}
})(inputs, outputs);
Use Case 2: Trigger 3-Level Approvals When All Tasks are Complete
Wait for Tasks to Complete:
- Add a Wait for Condition action.
- Set the condition to wait for all sc_task records related to the RITM to be Closed Complete.
Add Approval Actions:
- Add three Create Approval actions, one for each level of approval.
- Configure each action with the appropriate approvers.
Thank you, please make helpful if you accept the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2024 08:56 AM
You can follow the below image and Here I have taken List collector table as group table(in the field creation)
Thanks and Regards
Sai Venkatesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2024 06:42 AM
Drop downs of the variables are not visible in the "if" condition. Can you help me on this?
Thanks,
Karuna.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2024 09:12 PM
did you use the get catalog variables to fetch all the variables
thanks and regards
Sai venkatesh