Getting error while calling subflow from UI action

Shubham15
Kilo Contributor

I need to get approval from a group so for that I have a created a UI action. So when the UI Action is clicked by the user I need to call the SubFlow which will do further process but I am getting error in calling subflow from flow designer.

I am using server side UI action

Code for UI action :-

var inputs {};

inputs['name'] = 'Shubham';

try{


var result = sn_fd.FlowAPI.getRunner().action('x_797879_l_d_relea.create_product_and_release').inForeground().withInputs(inputs).run();

}

catch(ex)

{

gs.info(ex);

}

 

Exception I am getting :- java.lang.IllegalArgumentException: flow object does not exist

 

Can anyone please help ?

1 REPLY 1

OlaN
Giga Sage
Giga Sage

Hi,

Is it a SubFlow or a Flow action you are calling?

In your question you described it as a Subflow, but in your code, you are calling an action.

So maybe change your code like this:

sn_fd.FlowAPI.getRunner().subflow('sub_flow_name'...