getRunner

Kim Kronborg
Kilo Expert

Hi,

Has anyone tried to use the new functionality getRunner.withInputs functionality in the FlowAPI on Paris ?

I get an error like this : 

com.glide.plan.runners.FlowObjectAPIException: The inputs provided to the flow: TestFlow_27072020 within application scope: global are incorrect, please refer to the definition

and my code for calling the flow looks like this :

var inputs = {};
inputs['sys_id'] = '123445';

var result = sn_fd.FlowAPI.getRunner()
.flow('global.testflow_27072020')
.inBackground()
.inDomain('global')
.withInputs(inputs)
.run();

Should the input object not be like the one shown above ?

Thanks

5 REPLIES 5

Sam Ogden
Tera Guru

Hi Kim,

is it because your inputs is expecting a 16 digit sysId and instead you are passing in only 6 digits?

The error seems to be referring to the syntax of the input you have provided compared to what the flow/subflow is expecting.

@Chuck Tomasi current community live stream has an example which is using the new getRunner function

Thanks

Sam

Hi Sam,

Thanks - I'll try that 🙂

Regards

Kim

vanajagurram199
Tera Contributor

is this issue resolved?, I am facing the same issue

The inputs you pass must match with those the flow trigger expects.

See the working example here.

 

(The question is, how to create a trigger which accepts my desired inputs. More on that perhaps later, if I manage to find out 🙂 )

 

Update: yes, right, 

  1. different triggers expect different inputs
  2. you can generate sample script with a call to your flow (... in the top right, then "Create code snippet" <- available only after you activate your flow)
  3. you can't define your own trigger to ideally match your desired inputs, but you perhaps can misuse available placeholders <- I won't go that far because I found an OOTB trigger which fits well