- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2020 05:59 AM
Hi All,
I've created a flow that calls several subflows. This executes on insert of a record in a custom application. We are getting end users to create the record on the portal via a record producer. The first few steps are executing as expected, but when it gets to the 5th step a create task action is giving an error when an end user create the request - the create task function is in a subflow, but the subflow is set to run as system.
If I fill in the record producer in as an admin the create task action is working as expected. Also if I test the flow it works as expected.
The record producer creates a record in work request table. The flow then creates several work tasks. The flow fails at point 5 when trying to create a work task. The flow has already created 2 tasks in this table. The error in the context shows as prohibited by security rules. Any idea why the flow would have created 2 records in the table and fail on this one?
Any help as to why it would not work for an end user, when the subflow is set to run as system.
Solved! Go to Solution.
- Labels:
-
flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2020 02:06 PM
Quoting what
"Hi Surya, I eventually got this working after raising a HI ticket. The issue was I initially had set the sunflower to run as user who initiates and had published both the flow and sub flow. Although I changed the property on the sub flow to run as system, and made a few other changes and re-published the sub flow it was not working. It turned out that when you publish the main flow it builds the flow execution record. Making the change to the sub flow was not properly updating this record so although in the flow context it appeared to be running as system in truth it wasn’t. I needed to deactivate the main flow that calls the sub flow and make a small change such as adjusting an annotation then save the main flow and re publish it. This apparently rebuilds the execution record correctly. Let me know if this helps in your instance and mark as helpful or correct if so. Thanks Sam"
Hopefully you can mark this as solved so others can find this post.
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2020 06:25 AM
did you check the "Create" operation ACL on that table ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2020 06:27 AM
I've not changed that yet, but the flow is has already created 2 tasks on that table in earlier steps (all flows and subflows set to run as system).
I don't get therefore why I would need to change the create ACL if it has already created 2 tasks in the table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2020 06:48 AM
I've ameded the create ACL and it is now working, but I don't understand why the previous 2 tasks were both working without having this amendment in place.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2020 07:03 AM
not exactly sure,
the first time it has executed ,what exactly have you selected in run as "system" or "user who initiate the session" ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2020 04:02 AM
When I first created the subflow I had accidently saved and published as to execute as 'user who initiate the session'.
I then realised the error after the flow had executed. So I changed the execution to be run as 'system'.
When it runs, it says it has run as system, but then I've been hitting these errors. It almost seems like it is saying it is running as system but is in fact still running as user who initiated?