OMT to TNI (Flow to Subflow)

Community Alums
Not applicable

Hi Team,

 

I need to create subflows to instantiate XYZ (device)

 

I will get 5 variables/values(a,b,c,d,e) from main flow, using those inputs, my subflows has to instantiate XYZ(device)

 

Questions :

How to read these variables/values in subflows?

 

Once read those inputs I need to check all inputs has value or not, if all have value, sub flow needs to create XYZ

if c,d are blank, then we need to look for value e, based on that subflows need to generate XYZ1(instance)

 

How to achive this using flow designer subflow?

 

Please advise!

 

 

 

 

2 REPLIES 2

Vinay2509
Tera Contributor

@Aneesh-D Can you please help here please?

Aneesh-D
Tera Guru
Tera Guru

Hey @Vinay2509 ,

Assuming XYZ and XYZ1 are two type of device and you have templates available for them

 

you can have two subflows: 

1) accepts the inputs and validate them and sets the template or equipment type.

2) accepts the template details and create the equipment.

 

in the #1 subflow: 

you can declare inputs and output and set the template name:

AneeshD_0-1709775050907.png

AneeshD_1-1709775102476.png

AneeshD_2-1709775133727.png

and then you can call the other subflow based on the criteria.

 

in the #2 subflow, i assume you already have a way to use these inputs are create the device. so you can write that logic action. 

 

Then subflow 2 can be called from subflow 1.

 

if you want re-use the oob "create equipment from template" then checkout script include "TNITemplateService" and method createCIFromTemplate().

 

Thanks,

Aneesh D