Skip to main content

Hi guys,

I found in Winter23 and Spring23 that all flows wrapped in aura component are unexpectedly restarting after finish, even if you preperly handle the status change "FINISH" behaviour by destroying your flow.

Many of you may have not notice that, because often there are no DML nor Apex Action before the first screen paused element, but for those who make those actions, you may have notice some inserted/updated records misteriously.

 

There's a Known Issue still in reviewing as today

https://trailblazer.salesforce.com/issues_view?id=a1p4V00000141TsQAI&_ga=2.141440308.743216347.1674808421-1462538401.1669386389

 

Luckily I have found 2 solutions to this behaviour:

  1. You just edit your flow and add a screen as first action, asking the operator to click next
  2. You use the new LWC lightning-flow instead of old Aura (that seems to be broken)
    1. You don't have to Switch to replace your entire Aura, just inside aura use <lightning-flow...>
    2. instead of <lightinig:flow...>
    3. The behaviour is little different, you don't use "flow.start()" action but you pass flow apiname and variables with aura attributes (input variables attribute as type="Map[]") and instead of using flow.destroy() on finish, you just set right away flow-finish-behavior="NONE"

 

I prefer 2nd solution, it's more elegant, it's actually not a workaround but you are just using the new element (more stable and updated) so you can keep it even when they fix old <lightning:flow>.

Not a workaround but you are keeping your developments fresh and up to the new release.

 

Hope this helps

1 réponse
0/9000