0

I currently have a flow, which calls an apex class on completion.

This class changes my Status/Path of the lead.

I want to refresh the path (lighting component), when my flow finishes or when the apex class is ran.

How can this be achieved?

1 Answer 1

1

It could be done by using platform events. Let's assume, you have a lighting component flow starting point. High level of steps are listed as above:

  1. use lightning:empApi component to subscribe to platform events
  2. When the flow starts apex execution, publish event with some status = Started in this case show spinner for a user, that process is performing on background
  3. On apex code, when it is finished. publish event with some status =finished
  4. Handle event caught in lightning component by means of lightning:empApi and refresh view as necessary.

topics that are useful: How to use Platform Event in lightning by using lightning:empApi Emp API

You must log in to answer this question.