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

OleksiyK
Tera Contributor

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

See the working example here.

 

  1. different triggers expect different inputs
    1. eg. Date trigger expects none. The flow fails if you attempt to pass anything in
  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) which respects the inputs required by the trigger 
  3. just an idea: since you can't define your own trigger to ideally match your desired inputs, you perhaps can misuse placeholders available in OOTB triggers...
    1. with Yokohama custom triggers were introduced, see https://www.linkedin.com/posts/mohammad-saqib-khan-4b7820178_custom-trigger-activity-734471285744960...