Getting error while using flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2022 05:08 AM
I need to approve the task for storing it into table. So for that I have created a custom button in UI action. Here in UI action I am calling flow designer which has all the logic. In flow designer I am passing a single input in form of JSON stringified array of all the fields and in script I am parsing and separating each variable.
I have taken approval field as reference and given reference to sys_user_group table. But I guess the problem is here.
I am getting this error after execution :- Operation failed with error: com.snc.process_flow.exception.OpException: Record in sys_user_group table does not exist or is unreadable.
Script for UI action :-
var product = current.product_name + '';
var release_type = current.release_type + '';
var release_short_description = current.release_short_description + '';
var release_priority = current.release_priority + '';
var epic_description = current.epic_description + '';
var epic_priority = current.epic_priority + '';
var story_description = current.story_description + '';
var story_priority = current.story_priority + '';
var story_long_description = current.story_long_description + '';
var approvers = current.approvers.name + '';
gs.info("Approvers ="+approvers) ;
this.call = new calling_Flow_Designer();
var inputs = {};
var inputParams = {};
inputParams['product'] = product;
inputParams['release_type'] = release_type;
inputParams['release_short_description'] = release_short_description;
inputParams['release_priority'] = release_priority;
inputParams['epic_description'] = epic_description;
inputParams['epic_priority'] = epic_priority;
inputParams['story_description'] = story_description;
inputParams['story_priority'] = story_priority;
inputParams['story_long_description'] = story_long_description;
inputParams['approvers'] = approvers;
inputs['input_parameters'] = JSON.stringify(inputParams);
try{
var runner = sn_fd.FlowAPI.executeSubflow('x_797879_l_d_relea.create_product_and_release', inputs);
runner.run();
}
catch(ex)
{
gs.info(" exception = "+ex);
}
Script used in flow designer :-
(function execute(inputs, outputs) {
try
{
gs.info("In flow designer");
var inputParams = JSON.parse(inputs.inputs);
outputs.product = inputParams.product;
outputs.release_type = inputParams.release_type;
outputs.release_short_description = inputParams.release_short_description;
outputs.release_priority = inputParams.release_priority;
outputs.epic_description = inputParams.epic_description;
outputs.epic_priority = inputParams.epic_priority;
outputs.story_description = inputParams.story_description;
outputs.story_priority = inputParams.story_priority;
outputs.story_long_description = inputParams.story_long_description;
outputs.approvers = inputParams.approvers;
gs.error("The output product name is "+ouputs.product);
}
catch(ex)
{
gs.error('Exception occured while fetching input ='+ex);
}
})(inputs, outputs);
- Labels:
-
flow designer