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

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

Hi Vasantharajan N,

Yes I did it and its also working (different short description/description).

 

The actual flow is a combination of sequential and parallel tasks.

like
1. Task 1

2. Task 2

3. Task 3

4. Task 4

5. Parallel task 6 and 7

To move forward both the parallel tasks should be closed complete

6. Task 8

7. Task 9

8.  Parallel task 10 and 11

To move forward both the parallel tasks should be closed complete

9. Task 12

10. Task 13

11. Task 14


Is there a way to create both the pair of parallel tasks (sl no 5 & 8 in above) also in the same "Do the Following until" and continue to the last task 14.
If I take count 15 but how I create the parallel tasks?

OlaN
Giga Sage
Giga Sage

Hi,

I'm trying to understand what you are asking for really, but no, you need to explain some more. 🙂

1 There is no code you can write that replaces the action in a Flow to create a Task. Sure you can create your own custom action and in script create a record, but what would be the point in doing so?
If you want to create multiple tasks without the waiting for the previous task to be completed, you can simply uncheck the "Wait" property when creating those tasks.

2 What are you asking here? Either you wait for the task to be completed, or not. Why would you like to script to close a specific task? You can use the wait for condition action to have the flow close the previous task if some specific event occurs, and then create a new task after the waiting is completed.
Please explain your use case.

Hi,

My requirement is to create first task, wait to close the task, create 2nd task, wait to close the 2nd task, create 3rd task, wait to close the 3rd task and so on....

I dont want to use 'if' , 'else if' flow logic every time. This will leads a high numbers of steps and the flow designer property restricts me to create these much of steps in one single flow.

To minimise this we can use subflow. But I want to know the other way and code to minimise the number of steps. 

 

 

Thanks,

Swagata