Flow triggered from another flows created RITM not triggering

Jugmaz
Kilo Sage

Hi all,

i have a situation where I should trigger FLOW for RITM within another RITM's flow.

i have both flows created, when testing they both works.

First flow runs correctly without errors, it gives positive feedback on creating second RITM, it remains correctly in Waiting state.

find_real_file.png

new ritms gets created, it has the FLOW associated but it never gets triggered.

find_real_file.png

I'm also aware of Business Rule 'Start FlowDesigner Flow' - but what comes on it triggering anything, i'm not positive, as the first RITM is not in current.stage=='request_approved' - because we don't even have that stage.

default value for stage is waiting_for_approval.

Therefore i'm quite positive that triggering is happening elsewhere, anyone ?

Thanks,
Jake

1 ACCEPTED SOLUTION

Jugmaz
Kilo Sage

Just to let you know, this is possible by using the business rule to trigger wanted flow.

Copy the code from Flow's Code Snippet (to use the internal name of the flow)

then run command:

        var inputs = {};
        inputs['table_name'] = 'Table Name';
        inputs['request_item'] = current; // GlideRecord of table: sc_req_item

        // Start Asynchronously: Uncomment to run in background.
       sn_fd.FlowAPI.startFlow('global.[internal name of flow]', inputs);
                
        // Execute Synchronously: Run in foreground.
        sn_fd.FlowAPI.executeFlow('global.[internal name of flow]', inputs);

 

View solution in original post

8 REPLIES 8

while trying, i encounter into error because there some problem on ordering. (Subflow cannot find records JUST created by main flow)

still, subflow doesn't run parallel eg. its own phase, it has approval and will be completed in any case in different time.

Main flow should be able to pass regardless of subflows and that is the thing needed here, there can be multiple RITMS/subflows created from main flow.

 

Sudhanshu Talw1
Tera Guru

Hi Jake,

Ankur is right.

You should create a subflow & call it in your Flow.

 

Thanks

Sudhanshu

Jugmaz
Kilo Sage

So the subflow would be ONLY option here ? Cant do it because original flow should be run regardless of new RITM and it's stages - the second one isn't really related anymore when created...

I like the flow and designer but there just is too many flaws which creates annoyance and delays...

 

Jugmaz
Kilo Sage

Just to let you know, this is possible by using the business rule to trigger wanted flow.

Copy the code from Flow's Code Snippet (to use the internal name of the flow)

then run command:

        var inputs = {};
        inputs['table_name'] = 'Table Name';
        inputs['request_item'] = current; // GlideRecord of table: sc_req_item

        // Start Asynchronously: Uncomment to run in background.
       sn_fd.FlowAPI.startFlow('global.[internal name of flow]', inputs);
                
        // Execute Synchronously: Run in foreground.
        sn_fd.FlowAPI.executeFlow('global.[internal name of flow]', inputs);