- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2023 07:46 AM - edited 09-07-2023 07:47 AM
Hello,
I am working on a Flow for a HRSD Process. I have an lifecycle event which has an HR service configured to go through a process. The HR service is configured to just create a new Case and the Flow will take it from there. Once the case is created, the Flow is supposed to be triggered base on the HR Service that created that case. and it should run the actions I will add. I have configured my flow to trigger on a created, with the condition of the HR service being the one in the lifecycle event. When I test the Flow in the designer, it seems to reach the case and goes through the actions. When I activate the flow it it not triggered at all.
Some Trouble Shooting: I noticed that when I pick a case that does not meet the condition, the flow also excutes which is making me wonder if my trigger is not setup correctly.
Please see pictures and advise how I can solve this issue.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2023 10:24 AM - edited 09-10-2023 10:27 AM
@mlamin Since your flow is not triggering on the case creation on its own, there is a workaround to fix this issue which can be applied.
1. As a part of the first step, you can create a business rule on HR Core case table (sn_hr_core_case) and it should be onAfter Insert business rule. Add a condition where HR Service is <Your HR Service Name> this will make the business rule to trigger only when the HR Service is the Service where you would like to trigger the flow.
2. In step 2, before moving on to the Advanced tab, open the flow designer in a separate tab and open your flow.
3. Open the context menu and choose Create code snippet option.
Put this code in advanced tab of the business rule created in step 1.
Since you need to provide the current record as input in the flow, make the following changes in the script.
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
(function() {
try {
// Start Asynchronously: Uncomment to run in background.
// sn_fd.FlowAPI.getRunner().flow('sn_hr_core.sample_flow').inBackground().run();
// Execute Synchronously: Run in foreground.
var inputs = {};
inputs['current'] = current; // GlideRecord of table:
inputs['table_name'] = current.getTableName();
sn_fd.FlowAPI.getRunner().flow('sn_hr_core.sample_flow',inputs).inForeground().run();
} catch (ex) {
var message = ex.getMessage();
gs.error(message);
}
})();
})(current, previous);
Make sure to replace flow name in the following line here it is mentioned as sample_flow
sn_fd.FlowAPI.getRunner().flow('sn_hr_core.sample_flow',inputs).inForeground().run();
Save the BR and create another case to see if the flow triggers.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2025 03:26 AM
Before proceeding with the Business Rule (BR), verify if there are any issues with the Flow Designer by checking the Flow executions and identifying the root cause. One common error to look out for is: 'The requested flow operation was prohibited by security rules.' This issue can often be resolved by updating the Flow Properties, such as setting the 'Run As' field to 'System User.' Ensure all flow settings align with the required permissions before continuing.