Adding Non-Solution Aware Flows to Solutions
    • Dark
      Light
    • PDF

    Adding Non-Solution Aware Flows to Solutions

    • Dark
      Light
    • PDF

    Article Summary

    The focus of this post is to discuss how you can get non-Solution aware Cloud flows added to Solutions and have Connections References automatically created for you, with the least amount of friction possible.

    What is a Connection Reference?

    A Connection Reference provides an abstraction between your cloud flow and a connection. This allows a cloud flow to be bound to a connection during import activities. Using Connection References allows you to leverage Managed Solution packages when deploying so that you don’t need to modify connections in the Power Automate designer in another environment, such as Production.

    Should I always start by creating a new Cloud flow in a Solution?

    When possible, yes you should do this and the related Connection References will automatically be created for you.

    Where can Connection References be created?

    Connection References are a component found in Solutions. They do not exist in non-Solution aware flows. This becomes a challenge when you start by building a Cloud flow outside of a Solution but want to use Solution packages to deploy your bots. However, the default behavior of importing a non-Solution aware flow is it will not create Connection References automatically for you. But, there is a pretty simple process to get the Connection References created following the process below:

    1. You can start with a blank solution that aligns to your naming conventions.
      1-solution(1)

    2. You may have an existing cloud flow which includes 1 or more connector actions to various systems in your environment.
      2-Cloud Flows

    3. Note, for every connector action, you will have a connection established. At this point we don’t see any Connection References since, we are currently working outside of a solution.
      3-connnections

    With our Cloud flow working, we can add it and our Desktop flow to our solution package by using the Add existing menu item. Adding a Desktop flow is a straightforward operation by just selecting it from a list of Desktop flows that you have access to.
    4-addexisting

    1. When it comes to adding a Cloud flow, we have two options where we can locate our flows. In our case, it will be in the Outside Dataverse list.
      5-addCloudFlow

    2. At this point, we have both our Desktop and Cloud flows added to our solution. However, notice we don’t have any Connection References created at this point.
      6-added

    3. To add Connection References, we need to click on the link of our Cloud flow.
      7-cloudflow

    4. When we land on the Cloud Flow properties page, we will discover that our Flow checker has determined our Cloud flow does not include Connection References. But, the good news is that we can easily fix this by clicking on the Remove connections so connection references can be added link.
      8-FlowChecker

    5. We now can validate and establish our connections. Once we have a green checkmark beside each connection, we can click on the Continue button, followed by clicking on the Save button.
      9-FixConnections

    6. We can now return to Solutions explorer and will see our Cloud and Desktop flows, but no Connection References…yet! By clicking on the … for our Cloud flow, we can add our Connection References using the Add required components link.
      10-AddComponents

    7. Click OK to continue.
      11-ok

    8. We will now discover that our Connection References have been added.
      12-added

    9. Our solution is now ready to be exported as a Managed Solution and subsequently imported it in another environment. When we do so, we will get prompted to map our Connection References to a Connection in that environment. Once we have completed our configuration of these Connection References, our Cloud flow will be ready to process new bot requests.

    Conclusion

    Connection References are really important when it comes to ALM as they ease the transition from one environment to another environment. As we learned in this post, non-Solution aware Cloud flows do not understand Connection References. Only Cloud flows in a Solution are aware of them. When possible, build your Cloud flow directly in a Solution, but when that may not be possible, such as situations like templates, then use the approach above to add Connection References.

    To see this content in video format, please visit the following YouTube video: Tips - Adding Non-Solution Aware Flows to Solutions


    Was this article helpful?