This is a new take on my earlier project Reloadable Visualforce Lightning Component, whose purpose was to provide a way to display a Flow on a Lightning Record Page and have that Flow dynamically sync itself with any data changes made on the page.

That first project cobbled together a myriad of concepts, and although functional, it still didn’t render the Flow in Lightning Runtime 😦

With Winter ’18Β we now have the <lightning:flow> component. We no longer need an <iframe> or Visualforce page to embed our Flow!


Get the Component

Installation instructions are available on the project page.

Techno Mumbo Jumbo

Although this version is nicer because no Visualforce, iframes, or fancy messaging are necessary to make it work, I’m not able to use the <lightning:flow> component in my markup as the one liner I had hoped it to be. I ran into an issue where once the flow was started, telling the flow to start again had no effect. Not being able to force the flow to restart (which in turn causes its first element to fire and load any data again from the database) on demand defeats the purpose of this project.

I brought up my use case to product management in the org62 group Lightning Components – TrailblazersΒ to find out if this is “by design” or if we can get a way to force the flow component to restart.

As workaround, I dynamically create the lightning:flow component in my JavaScript helper and add it to the page. Same end effect, just not as smooth as I was hoping for.