Earlier in the movie, you may recall that Lorraine had brief psychic glimpses of what Isla was up to whenever she laid hands on a cursed individual. It happened when she touched David and Arne, but linking with the corpse of Jessica Strong gives her the biggest clues of all.
After Lorraine uses her psychic abilities to relive the tragic death of Katie by visiting the murder site, she not only discovers that Katie did indeed perish at the hands of her friend Jessica, but that Jessica threw herself over a nearby cliff following the murder. This confirms that Arne isn't exactly in the clear, which is why he continues to be plagued by the demon in prison — it wants to drive him to suicide in order to complete the task it was summonsed for.
There's also moment when Lorraine theorizes that these demons aren't acting of their own free will and suggests that touching the corpse of the curse-afflicted Jessica Strong may once again give her a glimpse into Isla's lair with the mysterious altar. Her theory proves to be correct, but that glimpse comes with a price. The connection works both ways, you see — so when Lorraine uses her clairvoyant abilities to touch Jessica's corpse and see what Isla is up to, Isla also senses Lorraine's psychic presence and can see what she sees. Think of it as a two-way crystal ball. This possibly explains why Isla sent flowers to the Warren household. While it's never exactly clear as to how long she's been aware of the Warrens' meddling, one can assume that inflicting Ed with the curse was a sort of payback, and he just so happened to conveniently fit the bill for her third required sacrifice, the holy man.
In fact, Isla's plans may have gone down in an entirely different way had the Warrens never intervened in the first place. Once can assume that David Glatzel was originally intended to be the child of purity sacrifice, followed by Arne, the lover. But when Arne pleaded for the demon to take him, Isla had to improvise and sought out a fresh new virgin victim with Jessica Strong. It's also quite possible that Father Gordon or even her own estranged daddy, Father Kastner, could've easily been the originally intended holy man, but when those meddling Warrens spoiled her plans, she chose to inflict Ed, who is certainly a man of faith. Either way, Isla had options, and she's clearly the puppet master controlling the demon's every move, and she can strike any cursed individual at any time — as long as she's at her infernal altar, that is.