Run-after: cum gestionezi erorile elegant

Power Automate intermediar

Dani Kahil

Solution Architect | Microsoft MVP

Power Automate nu are try-catch

nanobanana: A clean flat minimalist illustration on a pure white background. On the left, the text "try / catch" written in a red strikethrough font, faded. On the right, a single action card labelled "Send an email" with four small status pills underneath labelled "Success", "Failed", "Skipped", "Timed out", with checkmark and X icons in DataCamp green and red. A bold arrow points from left to right.

 

  • Nu există cuvântul-cheie try / catch
  • Fiecare acțiune are o setare run-after
  • Run-after = ce stări ale pasului anterior declanșează acest pas
Power Automate intermediar

Cele patru stări run-after

nanobanana: A clean flat illustration on a pure white background showing four equally sized horizontal pill-shaped status badges in a row. Each pill is labelled, in order: "is successful" (DataCamp green with a checkmark), "has failed" (red with an X), "is skipped" (grey with a dash), "has timed out" (amber with a clock icon). Minimalist, no shadows, equal weight on all four.

 

  • is successful — starea implicită
  • has failed — acțiunea a generat o eroare
  • is skipped — o Condition sau un Scope a omis-o
  • has timed out — a depășit limita de timp
Power Automate intermediar

Ramurile paralele ca model de gestionare a erorilor

$$

mermaid: green-navy: Send an email branching into a success path and a parallel failure-handler logging to SharePoint

 

  • Adaugă o ramură paralelă după acțiunea riscantă
  • Setează run-after pe has failed SAU has timed out
  • Ramura originală păstrează valoarea implicită is successful
Power Automate intermediar

Cea mai frecventă greșeală de run-after

 

screenshot_run_after_dialog_default_is_successful: Power Automate run-after configuration dialog with four checkboxes for is successful, has failed, is skipped, has timed out - only is successful is checked, with a callout highlighting it as the default that needs to change

 

  • Un handler de erori cu setarea implicită nu se declanșează niciodată
  • Ramurile noi moștenesc is successful
Power Automate intermediar

Reîncercări: ramurile paralele oferă redundanță

nanobanana: A clean flat illustration on a pure white background showing one action card labelled "Send an email — primary" with a downstream "Send an email — backup connector" beneath it, connected by a dashed arrow labelled "has failed". The backup card has its own downstream "Log success" pill. DataCamp green and navy. Minimalist.

 

  • Folosește run-after ca să înlănțui o reîncercare pe alt conector
  • O ramură paralelă păstrează traseul original independent
Power Automate intermediar

Hai să exersăm!

Power Automate intermediar

Preparing Video For Download...