Flow Designer Scripting: sc_task

Swagata Banerje
Kilo Explorer

Hi,

I've prepared a flow for a catalog item  as below. The RITM having total 14 sequential tasks in which one pair of parallel tasks (a glimpse of the flow as below):-

find_real_file.png

 

May I have the code please with which I can mitigate the number of steps of the same flow.

1. I can use subflow, but I want to know the code I can use in below to create and close the sequential catalog tasks.

2. May I get the code to close the previous task to trigger a new task.

 

find_real_file.png

 

 

 

 

1 ACCEPTED SOLUTION

Hi Swagata,

Please define one more Flow variable same as Assignment group and add the SD values and retrieve same as Group sys_id step. 


Thanks & Regards,
Vasanth

View solution in original post

8 REPLIES 8

Vasantharajan N
Giga Sage
Giga Sage

Please add flow variables to handle the different assignment group and loop count (I've given 3 so my flow creates 2 catalog task in sequence) as shown in the screen. I assumed assignment group is a different for all task.

find_real_file.png

Use the below steps

1. Use Do until flow logic to iterate through

find_real_file.png

2. Create task to generate the task

Using the scripting I'm taking the value of assignment group sys_id

find_real_file.png

3. Set Flow variables to increment the value of variable loop count

find_real_file.png

Final Flow will look like the one given below,

find_real_file.png


Thanks & Regards,
Vasanth

Hi,

Thanks a lot for your response. Please share the below full code. Its hidden after flow_var.ld.

 

 

find_real_file.png

Hi,

Please use the below code,

var grp_sys_id= fd_data.flow_var.assignment_groups[fd_data.flow_var.loop_count];
return grp_sys_id;

Thanks & Regards,
Vasanth

Hi Vasantharajan N,

 

Many thanks for your support. Its working now.

I need one more help. In my flow the short description and Description will be different for all the sequential task.

 

Like:-
1. 1st Task
SD: Device not working
Description:- Device not working

2. 2nd Task
SD:- Assignment of New device

Description:- Assignment of New device

Could you please suggest here?