Dynamically execute a Flow for Sla Trigger
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2022 03:34 AM
Dear All,
I need to dynamically trigger a flow for sla, without updating the flow field in sla , since these sla's are used by different regions I need to trigger the flow , ITried to trigger the flow from business rule with no luck. Please help.
Thanks & Regards,
Kavya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2022 04:45 AM
If you want run flows from script you should look at the scriptableFlowRunner api. see:
However. Thinking at your requirement.
You could also just create multiple different SLA records for 1 for each region and ensure the trigger conditions are so the right on is triggered. This has major benefits like:
- Staying within OOTB logic, no customization needed (with all the upgrade and test things issues)
- Visibility, on the SLA triggered you can directly see which SLA has been triggered, including flow. It is not hidden in the 'black box' part.
- It will also work when SLA is changed. for example if prio or region so is changed. With your br solution you will run into issues af.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2022 06:21 AM
Hi Jorn,
I tried to write a script for task sla table, but its accepting the inputs if i provide the sys_id..Please help. It says input is invalid.Please help, trigger of my flow is task sla.
var inputs = {};
inputs['sys_id'] = '23f306c4dbc7c1d0f328a05605961910';
var result = sn_fd.FlowAPI.getRunner()
.flow('global.test123')
.inBackground()
.withInputs(inputs)
.run(); //
var contextId = result.getContextId();
gs.info(contextId);