mule-studiomulesoftmule4anypoint-studioanypoint-platform

Unable to add additional flows to MuleSoft generated API Proxy Code


I have a mulesoft proxy code that I generated by configuring an HTTP proxy in CloudHub and then downloading it.

The Anypoint Studio project has 3 mule files,

The http-proxy.xml has the proxy flow inbuilt while the other 2 files have global configuration settings.

When I add a 4th Mule file with a new flow to my project, the new API endpoint is not discovered by my Mulesoft project. It simply doesn't acknowledge any code outside the 3 files mentioned above. However, if I copy the same flow in http-proxy.xml the flow starts working.

Essentially, the project doesn't' recognize any other file except the 3 files mentioned in above. What could be the reason for that? I can't find any setting that says that only the 3 files generated by Mule can be used and another Mule file added to the project is not recognized at all.


Solution

  • I see that an autogenerated proxy explicitly lists the XML Mule configuration files that it uses in the file mule-artifact.json of the source project:

      "configs": [
        "inbound-config.xml",
        "outbound-config.xml",
        "http-proxy.xml"
      ],
    

    By default applications created in Anypoint Studio don't explicitly list files so they can be added freely.

    You can modify the existing files as you did or add new ones and edit the config list to add them.

    Having said that it may be better to use Anypoint Platform features for health check than trying to implement custom ones.