Flow Designer - Process on Action error

Str
Mega Contributor

Hello,

When an error occurs in Action, the entire flow ends with an error without any further action being performed.

In the image below, the next "Log" will not be executed if the "SendMail" error occurs.

Is it not possible to branch the process if the Action is an error?

find_real_file.png

Any help would be appreciated, thanks.

16 REPLIES 16

Dorian11
Tera Contributor

Flow doesn't have native error handling (like other BPA) yet.

 

I would recommend the following:

* Create a subflow with inputs (one being a field of type email)

* Create a custom action that validates the email address (regex maybe?) that outputs if it is valid or not (true/false)

* make a flow logic to decide if it should proceed or not based on if it is a valid email.

* Put the subflow in the main flow.

 

Let me know if that helps. 

Matthew Swarts
Tera Guru

I know this is older but hopefully it will help others.  The table sys_flow_context can be used to trigger notifications or even another Flow when an existing Flow goes into and Error state.  You can use a Business Rule to trigger an event or utilize the Flow API pretty easily.

Hopefully in the near future, Native Error handling will be available in Flow Designer without having to do this type of workaround.

find_real_file.png

Alright, but how to know record/workflow triggered it? Suppose there is one  incident that triggers the flow designer.. but there is an error while transacting with 3rd party..At that moment the flow will say it has failed but i dont even know which incident actually triggered it?

You can use the 'Source Table' and 'Source Record' fields on the Flow engine contexts table to know which record triggered it:

 

Screenshot 2023-07-07 154101.png 

If this answer is helpful please mark correct and helpful!

Regards,
Chris Perry

Nicolas17
Tera Expert

Hello,

I'm also facing a scenario like this one. My flow's purpose is to fully create a new user in AD, his home folders, configure his mailbox, assign an O365 licence in Azure,... Something that takes 15 minutes to an agent to execute manually.

All actions work fine. But for some reason, sometimes, one action fails. I don't really understand why. I suspect the MID servers are not fast enough between two actions. Here are some examples:

System.InvalidOperationException: Connector: *****.** is busy.
at Microsoft.MetadirectoryServices.Scheduler.Scheduler.StartSyncCycle(String overridePolicy, Boolean interactiveMode)
at SchedulerUtils.StartSyncCycle(SchedulerUtils* , Char* policyType, Int32 interactiveMode, Char** errorString)
HRESULT: [-2146233087]

or

Exception calling "InvokeSet" with "2" argument(s): "There is no such object on the server.
"
HRESULT: [-2146233087]

Stack Trace:

or

replace
HRESULT: [-2146233087]

Stack Trace:

It's every time the same error code, but with different messages (sometimes no message at all)

Here's my Flow, calling a subflow that executes all PowerShell and REST actions:

find_real_file.png

And here's the subflow:

find_real_file.png

And even when it fails in the subflow, the flow stops and remain in the Error state... This is very frustrating.