Flow error when creating a managed package with a VF component that refers to a flow without namespace
|Knowledge Article Number||000240904|
In a DE org
1. Create a flow and activate it
2. Create a VF component to use the flow where name = "FLOWDEVNAME"
3. Create a VF page(testMPKNamedSubflowWithVF) to use the vf component
4. Enable the namespace and create a managed package, add the vf page in step3
In an EE org,
Install the managed package
[Expect] Install succeeds
[Actual] Install fails with GACK
moduleapi.isv.packaging.exception.PackageInstallException: 00Dx0000X00WQuG: Multiple install problems encountered [testMPKNamedSubflowWithVF: Flow "FLOWDEVNAME" is not found or doesn't have an active version.: testMPKNamedSubflowWithVF: Flow "FLOWDEVNAME" is not found or doesn't have an active version., null: Flow "FLOWDEVNAME" is not found or doesn't have an active version.: TestPage: Flow "FLOWDEVNAME" is not found or doesn't have an active version.]
The issue occurs because once a VF page/component references a flow by its name, and then namespace is enabled, the Apex code still only has the flow name without the namespace. This causes an error when installing a managed package, since the namespace is absent in the code, and the installer can't find the flow that's referenced. A workaround is going back to the apex code and adding the namespace to the flow name before uploading or upload again after.
Check the "Other Limitations" section in the below article about the same